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
floating text
Author Message
Soulless
Super Moderator
****

Posts: 335
Likes Given: 29
Likes Received: 49 in 27 posts
Joined: Jun 2012
Reputation: 12

Ye Olde Sphere

Post: #1
floating text
Does anyone know how to make messages float overhead for a second and dissapear, much like the damage numbers from the AOS features. any thoughts on this? it would help my level system look less irritating when your gaining xp from multiple things.
07-09-2012 06:19 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Shaklaban
Master
**

Posts: 378
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Mar 2012
Reputation: 8

DOT

Post: #2
RE: floating text
07-09-2012 07:14 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Soulless
Super Moderator
****

Posts: 335
Likes Given: 29
Likes Received: 49 in 27 posts
Joined: Jun 2012
Reputation: 12

Ye Olde Sphere

Post: #3
RE: floating text
It seems that i just freeze myself up. i dont often work with packets so clearly ive done something wrong.

[FUNCTION float_text]
SENDPACKET 00B D<UID> 10

this freezes up the client. im using 5.0.9.1 and the latest sphere version
07-10-2012 06:02 AM
Visit this user's website 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: floating text
(07-10-2012 06:02 AM)Soulless Wrote:  It seems that i just freeze myself up. i dont often work with packets so clearly ive done something wrong.

[FUNCTION float_text]
SENDPACKET 00B D<UID> 10

this freezes up the client. im using 5.0.9.1 and the latest sphere version
I tested it, I can't send text in this packet...
To work with numbers
sendpacket 00B D<UID> 00 01
It will send the number 1 above the head.
Try change the last '01' to another number.
Prepare for lost of crash =D

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.
07-10-2012 07:12 AM
Find all posts by this user Like Post Quote this message in a reply
Soulless
Super Moderator
****

Posts: 335
Likes Given: 29
Likes Received: 49 in 27 posts
Joined: Jun 2012
Reputation: 12

Ye Olde Sphere

Post: #5
RE: floating text
SO ive got it so it displays the numbers correctly. (But...)

sendpacket 00B D<UID> w<ARGV[0]>

however, i need it to say "gained" "xp" also, and is there a way to make this a different color somehow??
im not very good with send packets but i assume this is the only way to do what i want.



Thanks,
07-10-2012 07:36 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #6
RE: floating text
That's not possible (unfortunately), the client does not allow manipulations of the packet. If the <UID> matches the recipient of the packet, the number will display yellow, if not it will display red. there is no way to add in a string or change the color, it's all built-in to the client. Just the way it is.
Message display is an option setting the client stores, it's all client-side. You can send a MESSAGE or SYSMESSAGE, other than that it won't make much sense... I can suggest a timer to store the experience you are gaining, maybe based on every 5 seconds to display the most recent experience gained? That'll help 'unjumble' your level system. An example:
Code:
[function exp] //used to give experience
if !(<tag0.exp_recent>)
timerf 5, f_display_exp
endif
tag0.exp_recent += <argn1> //considering <argn1> is the experience gained -- .exp <amount>
tag0.exp += <argn1> //add actual experience

[function f_display_exp]
sysmessage @99 You recently gained <dtag0.exp_recent> experience.
tag.exp_recent= //reset

Just a little make-shift idea of how you can do it.
Maybe make the message of gaining experience from monsters instant and other type of gained experience delayed (@hit, @skillmakeitem, etc etc).

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
(This post was last modified: 07-10-2012 08:10 AM by Skul.)
07-10-2012 08:05 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Soulless
Super Moderator
****

Posts: 335
Likes Given: 29
Likes Received: 49 in 27 posts
Joined: Jun 2012
Reputation: 12

Ye Olde Sphere

Post: #7
RE: floating text
Thats a pretty good idea, that should unjumble it. it will keep it from spamming over the chars head
that will work just fine.

Thanks Skul Smile
07-10-2012 09:22 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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