The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
show hitpoints on items
Author Message
dabritmusic
Journeyman
*

Posts: 50
Likes Given: 8
Likes Received: 2 in 1 posts
Joined: Nov 2013
Reputation: 0



Post: #1
show hitpoints on items
if i were to add a sysmessage to show the hitpoints of an item when clicked
how would i show the percentage instead of just the number? i used

on=@click
message @0487 [Unique: Level 10]
message @0481 <name> +25
src.sysmessage @0481 Hitpoints = <hitpoints>

i was thinking like <hitpoints/hitpoints> or something. just cant figure it...
02-12-2014 04:24 PM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #2
RE: show hitpoints on items
Simplemath. Hits/maxhits × 100. Or look at muldiv at sphere wiki.
Code:
local.x=<eval (hits/maxhits) ×100>
src.sysmessage <dlocal.x>%
(This post was last modified: 02-12-2014 05:19 PM by Alaric.)
02-12-2014 05:18 PM
Find all posts by this user Like Post Quote this message in a reply
dabritmusic
Journeyman
*

Posts: 50
Likes Given: 8
Likes Received: 2 in 1 posts
Joined: Nov 2013
Reputation: 0



Post: #3
RE: show hitpoints on items
(02-12-2014 05:18 PM)Alaric Wrote:  Simplemath. Hits/maxhits × 100. Or look at muldiv at sphere wiki.
Code:
local.x=<eval (hits/maxhits) ×100>
src.sysmessage <dlocal.x>%

Simple math lol. thanks... works great!
02-12-2014 05:46 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #4
RE: show hitpoints on items
<eval (<hits>*100)/<maxhits>>

Sent from my GT-I9505 using Tapatalk

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
02-12-2014 07:09 PM
Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #5
RE: show hitpoints on items
Ye, always forget that.Smile good point
02-12-2014 08:46 PM
Find all posts by this user Like Post Quote this message in a reply
Avatar
Journeyman
*

Posts: 172
Likes Given: 6
Likes Received: 27 in 12 posts
Joined: Apr 2012
Reputation: 5

The North Shield

Post: #6
RE: show hitpoints on items
Hi guys, i dont want to create new topic as my request is similar with this topic. The point i would like to ask is regarding showing message on player about how much they get and give damage. I actually made this with sendpacket. By default my 6x client does not show damage given and gotten to player. As the case like this, i used sendpacket. The problem is i cant achieve changing color of message sent to top of player. Given damage and gotten have same color and this situation makes confusion.

Under @gethit trigger,

sendpacket 0bf w11 w022 01 d<uid> <args>

I used that packet. If anyone knows how to change color , I would be really happy Smile Couldnt find related packet...
(This post was last modified: 02-13-2014 04:22 AM by Avatar.)
02-13-2014 04:20 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Alaric
Journeyman
*

Posts: 227
Likes Given: 7
Likes Received: 9 in 4 posts
Joined: Oct 2012
Reputation: 7



Post: #7
RE: show hitpoints on items
Code:
on=@gethit
   trysrc <uid> message @55 <argn1> //show to receiver
   message @55 <argn1> //show to attacker
or
Code:
on=@gethit
   trysrc <uid> messageua 55,0,0,0,<argn1>
   messageua 55,0,0,0,<argn1>

the three zeroes are talkmode,font,lang. You must try to put some numbers there... I dunno, just try itSmile

E: Or the default aos show damage in sphere.ini. It should work for 6, even v7 clients.

You can't change colour in the packet.
(This post was last modified: 02-13-2014 04:52 AM by Alaric.)
02-13-2014 04:37 AM
Find all posts by this user Like Post Quote this message in a reply
Avatar
Journeyman
*

Posts: 172
Likes Given: 6
Likes Received: 27 in 12 posts
Joined: Apr 2012
Reputation: 5

The North Shield

Post: #8
RE: show hitpoints on items
Bro, i know what you are exactly showing to me. However, what I'm using is sendpacket it shows number like moving from to down. Smile This is not what I'm looking for. If you are just tying my sendpacket, you will see difference btw classic message and sendpacket. Sendpacket accelerates numbers, therefore it is looking good actually.


AOS show damage is what I'm looking for. Thanks.

Is it FEATURE_AOS_DAMAGE 08 right ? Or am I wrong.
(This post was last modified: 02-14-2014 05:00 AM by Avatar.)
02-14-2014 04:58 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
dabritmusic
Journeyman
*

Posts: 50
Likes Given: 8
Likes Received: 2 in 1 posts
Joined: Nov 2013
Reputation: 0



Post: #9
RE: show hitpoints on items
(02-12-2014 07:09 PM)Extreme Wrote:  <eval (<hits>*100)/<maxhits>>

Sent from my GT-I9505 using Tapatalk

THIS DOESNT SHOW THE PERCENTAGE OUT OF. OR IS IT JUST STATING OUT OF 100? SO HYPOTHETICALLY IF IT WAS DAMNAGED ITD JUST SAY 84... AND THEY CAN REPAIR BACK TO 100?
02-27-2014 10:29 AM
Find all posts by this user Like Post Quote this message in a reply
Awaken
Apprentice
*

Posts: 30
Likes Given: 10
Likes Received: 4 in 4 posts
Joined: Sep 2013
Reputation: 0



Post: #10
RE: show hitpoints on items
I have something in my PC.

Try with some like this
Code:
LOCAL.Percent=<muldiv <Hitpoints.Lo>,100,<Hitpoints.Hi>>
SYSMESSAGE <dLOCAL.Percent>
(This post was last modified: 02-27-2014 09:14 PM by Awaken.)
02-27-2014 09:14 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)