SphereCommunity
Activate flying gargoyle - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Activate flying gargoyle (/Thread-Activate-flying-gargoyle)



Activate flying gargoyle - Doberman - 11-30-2014 06:19 AM

Hi!
Tell me please.
How to activate flying gargoyle in script?
Do not use "RacianAbilitiesBook".


RE: Activate flying gargoyle - Extreme - 11-30-2014 09:03 AM

Hi Doberman.

Do you know you can activate it using the book, right? Just open the book and use the Fly ability.

But you don't want to use, right?
It should use packets, I will list them for you then you can try yourself.

To turn off the flying, these packets are sent from server to the player:
DF 0F 00 00 00 31 DE 04 1E 00 00 00 00 00 00
77 00 00 31 DE 02 9A 00 64 00 64 FB 02 86 DB 00 07
17 0F 00 00 00 31 DE 00 02 00 01 00 00 02 00
E2 00 00 31 DE 00 0A 00 00 00

To turn on the flying:
DF 32 00 00 00 31 DE 04 1E 00 01 00 00 00 00 04 1E 00 01 00 00 00 00 00 00 00 00 00 00 10 F8 81 00 10 F9 F7 00 00 00 00 00 01 00 00 00 09 09 00 00 00
77 00 00 31 DE 02 9A 00 64 00 64 FB 02 86 DB 04 07
17 0F 00 00 00 31 DE 00 02 00 01 00 00 02 00
E2 00 00 31 DE 00 09 00 00 00

Note that all packets have THIS: 00 00 31 DE
This is MY char uid and it should be REPLACED with the player UID that is trying to take off or land.

The easier way to do that is, removing these 4 'blocks' and replace with D<UID> where UID is the player uid, right?

To send the packets, use SENDPACKET <packet block here>
Note that SOME 'blocks' don't have 0 before, you NEED to put them on every block that don't start with 0
Example:
SENDPACKET 077 D<UID> 02 09A 00 064 00 064 0FB 02 086 0DB 04 07

Make a function like 'togglefly' that checks if the player is flying or not and do what is needed.

If you need more information or other question, feel free to ask.


RE: Activate flying gargoyle - Doberman - 12-02-2014 06:15 AM

Thanks!
I did so:
Code:
[function g_fly]
IF (<flags>&statf_hovering)
flags=<flags>&~statf_hovering
update
return 1
else
flags=<flags>|statf_hovering
update
return 1
endif
But not nice "animation".


RE: Activate flying gargoyle - Extreme - 12-02-2014 08:48 AM

You need send the animation then Big Grin


RE: Activate flying gargoyle - Doberman - 12-02-2014 04:06 PM

But how?