Page 7 of 8
Re: Implementing Pets (0.7.2)
Posted: Mon Oct 21, 2013 4:56 pm
by Jabantiz
Dumbfire pets have finally arrived here is the lua for it.
SummonDumbFirePet()
My tests were limited as usual but they seem to work.
EDIT:
Updated ProjMan for them, John should be proud of me

Re: Implementing Pets (0.7.2)
Posted: Mon Oct 21, 2013 5:13 pm
by John Adams
Jabantiz wrote:Updated ProjMan for them, John should be proud of me

I just fainted, but if I were conscious, I would say Thank You

Re: Implementing Pets (0.7.2)
Posted: Wed Nov 20, 2013 7:01 pm
by John Adams
Playing with a new Pet spell using the 10558L client, the only thing that doesn't seen right is this Assist button is flashing very fast.
PetAssist.jpg
Even Pet Health seems okay in this newer client. I almost killed Rocky!
Edit: Sorry, the pet window bars are not working, I was looking at the implied target health by mistake

Re: Implementing Pets (0.7.2)
Posted: Thu Dec 12, 2013 4:42 pm
by Jabantiz
Added the ability for combat pets to level when you level and to specify the max level for a pet, changed the SummonPet() lua to take a third param for the max level, if left at 0 there will be no max level. Also found and fixed a deadlock situation if the players pet dies.
Also really late reply but I have done nothing with the assist button or range button, not sure why it is blinking on its own, never figured out the newer pet packets though.
Re: Implementing Pets (0.7.2)
Posted: Thu Dec 26, 2013 12:22 am
by xinux
Ok here is what i couldn't get working with pet's using the live client.
1. HP tooltip goes to 0% as soon as your pet takes damage and does not go back up.
2. Power bar does not fill when first cast but works fine after your pet cast's a spell.
3. Pet UI does not go away when your pet dies and or dismissed.
Re: Implementing Pets (0.7.2)
Posted: Thu Dec 26, 2013 12:42 am
by Jabantiz
xinux wrote:1. HP tooltip goes to 0% as soon as your pet takes damage and does not go back up.
2. Power bar does not fill when first cast but works fine after your pet cast's a spell.
This is the issue I have had since CoE clients, never was able to figure out how the packet works after it was moved out of the char sheet
xinux wrote:3. Pet UI does not go away when your pet dies and or dismissed.
This one has been around forever, along with the UI not opening on its own when the pet is first cast, never figured out how to do that
Re: Implementing Pets (0.7.2)
Posted: Thu Dec 26, 2013 2:02 am
by xinux
I've never had a issue with the UI opening at least tonight.
I'm not sure how to /test a packed packet but could it be as simple as sending the pet packet that get's sent every time on login with no pet in it?
Also can we force a command? /togglepet will force hide and unhide the pet UI window.
Re: Implementing Pets (0.7.2)
Posted: Fri Dec 27, 2013 12:33 am
by xinux
Ok think i may have figured out the pet window issue just not sure how to code it. When i hard code spawn_id2 to FFFFFF the pet window goes away when i log in instead of just staying there but it does not come back when i cast my pet my guess is cause spawn_id and spawn_id2 does not match cause i hard coded it.
going to try and explain it LOL and submitting a new struct with no_pet added.
1st packet when logging in with no pet needs to have the following.
spawn_id2 = FFFFFFFF
no_pet = No Pet
Code: Select all
1456: 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF ................
1472: FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1488: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1504: 00 00 00 00 00 00 00 00 00 00 4E 6F 20 50 65 74 ..........No Pet
1520: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1536: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1552: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1568: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
Packet when spawning a pet.
spawn_id2 = A0 39 66 FF which xor's to 5F C6 99 00 (same as spawn_id)
no_pet = 05 00 42 35 0E 1A which xor's to 4B 6F 62 65 6B 6E Name of pet under name.
Code: Select all
1456: 00 00 00 00 00 00 00 00 00 5F C6 99 00 A0 39 66 ........._....9f
1472: FF 4B 6F 62 65 6B 6E 00 00 00 00 00 00 00 00 00 .Kobekn.........
1488: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1504: 00 00 00 00 00 00 00 00 00 00 05 00 42 35 0E 1A ............B5..
1520: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1536: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1552: 00 00 00 00 00 00 00 00 00 F0 3F 00 00 00 00 00 ..........?.....
1568: 00 F0 3F 00 00 80 3F 00 00 80 3F FF 02 03 00 ..?...?...?....
Dismissed pet not sure on this i figured the spawn_id2 would xor back to FFFFFFFF and no pet back to no pet
Code: Select all
1456: 00 00 00 00 00 00 00 00 00 00 00 00 00 A0 39 66 ..............9f
1472: FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1488: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1504: 00 00 00 00 00 00 00 00 00 00 05 00 42 35 0E 1A ............B5..
1520: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1536: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1552: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1568: 00 F0 3F 00 00 00 00 00 00 80 3F 00 00 00 00 ..?.......?....
You may want to add in this also not sure what impact it has but when you summon/dismiss a pet the next packet after OP_CharacterPet is OP_CurrentPet
Summoned pet
Active = 1
Spawn_id = 5F C6 99 00
Code: Select all
-- OP_CurrentPet --
12/26/2013 19:46:20
69.174.200.17 -> 192.168.1.101
0000: 00 FF E5 01 01 5F C6 99 00 ....._...
Dismissed pet
active = 0
I've also attached the packet collect i was working off of.
Re: Implementing Pets (0.7.2)
Posted: Fri Dec 27, 2013 5:44 pm
by Jabantiz
no_pet = the pet name right? if so why not just move the name element? or am I missing something?
Re: Implementing Pets (0.7.2)
Posted: Fri Dec 27, 2013 6:13 pm
by xinux
That may work for the name anyway was just pointing out how the packet reacts since it put's the active pet name in one location and a different location when there is no pet. I'm pretty sure it's the spawn_id and spawn_id2 that get's the window to display and disappear tho.
Re: Implementing Pets (0.7.2)
Posted: Sun Dec 29, 2013 3:12 pm
by xinux
Yup the more i play with it the more it look's like all we have to do is this.
Initial log in spawn_id2 = 0XFFFFFFFF
Spawn pet spawn_id and spawn_id2 = spawn id of pet (spawn_id2 is going to be a little different since xor'ed)
/pet getlost = spawn_id2 = 0XFFFFFFFF (xor'ed)
Right now when we dismiss a pet on the EMU the server send's back a empty packet with nothing in it which is why the pet interface does not go away.
Re: Implementing Pets (0.7.2)
Posted: Mon Dec 30, 2013 3:32 pm
by Jabantiz
Working on implementing these discoveries, now to figure out how to get the health/power bars working properly
Re: Implementing Pets (0.7.2)
Posted: Mon Dec 30, 2013 3:39 pm
by xinux
I have a idea about that there appears to be 4 floats for health that get updated.
Unknown 4 & health_pct_bar seem to go together
health_pct_tooltip & unknown4a seem to go together
Health Bar display's and goes down correctly but the tooltip goes from 100% to 0% and i think that is cause we are not using the unknowns.
Power bar display's and goes down correctly after the pet cast's a spell i haven't look'ed to much into why it doesn't show on spawn.
Re: Implementing Pets (0.7.2)
Posted: Mon Dec 30, 2013 3:57 pm
by Jabantiz
Added the code and fixed the struct for 1188, I test with 1208 still...
Pet window now shows "No Pet" and spawn_id2 is set to 0xFFFFFFFF, when a pet is cast the window still does not pop up for me, but when the pet is killed the window goes away. Also HP seems to work but not power
EDIT: Went back and checked the tooltip for hp and it was at 187% when first summoned, that seems to be because code was changed in the summon pet lua function
Code: Select all
player->GetInfoStruct()->pet_health_pct = 1.875f; //1.0f
No clue why that was changed so left it as is for now, when the pet takes damage it is accurate, also power shows as 100% but the bar is empty, again this is in 1208 client
Re: Implementing Pets (0.7.2)
Posted: Mon Dec 30, 2013 4:43 pm
by xinux
Sorry meant to version check that Health is now 1.875 in the live client for 100% according to live packets.
Here is a pet being cast on live.
Code: Select all
1456: 00 00 00 00 00 CB 26 28 00 34 D9 D7 FF 4A 61 72 ......&(.4...Jar
1472: 74 69 6B 00 00 00 00 00 00 00 00 00 00 00 00 00 tik.............
1488: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1504: 00 00 00 00 00 00 04 0E 52 24 0C 1F 00 00 00 00 ........R$......
1520: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1536: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1552: 00 00 00 00 00 F0 3F 00 00 00 00 00 00 F0 3F 00 ......?.......?.
1568: 00 80 3F 00 00 80 3F FF 01 03 00 ..?...?....
Here is where i was talking about the extra unknowns coming into play.
Code: Select all
1520: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1536: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1552: 00 00 00 95 00 07 9B 8D 5E 1E 00 95 00 07 9B 8D ........^.......
1568: 5E 1E 00 00 00 00 00 00 00 00 00 00 00 00 00 ^..............