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
Flying text - sendpacket
Author Message
ThatSide
Apprentice
*

Posts: 17
Likes Given: 5
Likes Received: 0 in 0 posts
Joined: Feb 2015
Reputation: 0



Post: #1
Flying text - sendpacket
Ive got a working custom combat system on the server I am working at the moment. Only thing that I don't like about it is that damage dealt by anyone is displayed as a message.
So I've been wondering- is it possible to make a flying text (similar like in AOS combat sys) with a sendpacket. I know with a command ID 0C0 I can make cool effects with a flying objects. But what about text?
If it is possible I could use it for my hp, mana, stam potions etc...
08-03-2015 07:37 PM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #2
RE: Flying text - sendpacket
the combat engine uses a exclusive packet 0b to show this damage, something like

Code:
[FUNCTION DisplayDamage]
SENDPACKET 0b D<value>

it only works on clients > 4.0.7a so if your server allow clients older than this, you must add something to check the client version and send a simple "MESSAGE <value>" instead this packet to these old clients
08-09-2015 09:35 PM
Find all posts by this user Like Post Quote this message in a reply
Shamino
Noob Scripter
*

Posts: 57
Likes Given: 5
Likes Received: 15 in 11 posts
Joined: Mar 2012
Reputation: 0

Exilio UO

Post: #3
RE: Flying text - sendpacket
Dat text can be colored?

"My world is hell for the infidels. My blood pleasure of the immortals"
[Image: 2ec003662b15c61da117767a59bb99bao.jpg]
08-09-2015 10:40 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
ThatSide
Apprentice
*

Posts: 17
Likes Given: 5
Likes Received: 0 in 0 posts
Joined: Feb 2015
Reputation: 0



Post: #4
RE: Flying text - sendpacket
(08-09-2015 09:35 PM)Coruja Wrote:  the combat engine uses a exclusive packet 0b to show this damage, something like

Code:
[FUNCTION DisplayDamage]
SENDPACKET 0b D<value>

it only works on clients > 4.0.7a so if your server allow clients older than this, you must add something to check the client version and send a simple "MESSAGE <value>" instead this packet to these old clients

Does not work for me... I tried to enable aos damage (thought this might be a problem) but same thing - client freezes and doesn't display anything. After .fix it's normal again.
Also I can't find this packet in JUOPackets.doc (thought maybe there's some additional information)

Update:
After enabling AOS damage, i realized that it displays the damage that my combat system is calculating...
Don't know why I didn't check it earlier - thought if I am going to enable it it will use the AoS sys...
Only thing - I wanted to use this sendpacket for my potions, bandages and other stuff that gives you hits, stam, mana (only in different colors)
(This post was last modified: 08-10-2015 12:02 AM by ThatSide.)
08-09-2015 11:49 PM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #5
RE: Flying text - sendpacket
my bad, the correct packet usage is
Code:
[FUNCTION DisplayDamage]
SENDPACKET 0b D<UID> W<ARGS>

http://docs.polserver.com/packets/index.php?Packet=0x0B

(08-09-2015 10:40 PM)Shamino Wrote:  Dat text can be colored?
this packet was created only to show damages, so there's no way to change the color like other texts
(This post was last modified: 08-17-2015 07:13 PM by Coruja.)
08-17-2015 07:09 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Coruja's post
ThatSide
Apprentice
*

Posts: 17
Likes Given: 5
Likes Received: 0 in 0 posts
Joined: Feb 2015
Reputation: 0



Post: #6
RE: Flying text - sendpacket
(08-17-2015 07:09 PM)Coruja Wrote:  my bad, the correct packet usage is
Code:
[FUNCTION DisplayDamage]
SENDPACKET 0b D<UID> W<ARGS>

http://docs.polserver.com/packets/index.php?Packet=0x0B

nice one. TYVM
08-18-2015 06:52 PM
Find all posts by this user Like Post Quote this message in a reply
bororeh
Apprentice
*

Posts: 13
Likes Given: 1
Likes Received: 0 in 0 posts
Joined: May 2016
Reputation: 0



Post: #7
RE: Flying text - sendpacket
According to this post, this should work:
Code:
[EVENTS E_DAMAGE_DISPLAY]
ON=@Hit
    IF (<I.ISPLAYER>)
        SENDPACKET 0b D<SRC.UID> W<ARGN1>
    ENDIF

ON=@GetHit
    IF (<SRC.ISPLAYER>)
         SENDPACKET 0b D<SRC.UID> W<ARGN1>//***********
    ENDIF

But here is what happens: the player doing the hitting sees the damage as a red number flying over the targets head. However, the player taking the damage doesn't see anything and this error comes up on sphere:
Code:
"ERROR:(nws_pvp_stone.scp,195)Undefined keyword 'SENDPACKET'"

BTW, line #195 is the one marked by //*************. What did I miss?
(This post was last modified: 07-02-2020 02:05 AM by bororeh.)
07-01-2020 01:33 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)