Log in

View Full Version : makepet


Vexira
02-11-2010, 08:03 AM
I have a quest that essentially sells mercenaries (pets) and quest::makepet doesn't seem to make pets that you can actually zone with. How is this accomplished? I got the pets to work fine, they just don't zone with me. I tried changing the pet temp value to 1 and back to 0 but this doesn't seem to make a difference.

Any idea if any minor source changes would mend this?

ChaosSlayerZ
02-11-2010, 12:06 PM
i think it doesn't zone cause it works as if it was dire charmed. And charmed pets can't zone

However I do myself would like to have a quest to sell mercenaries, but without taking up the pet slot =)

Vexira
02-11-2010, 02:15 PM
I don't mind doing source code changes, I just need to find out how to make the that are summoned by the makepet function to zone with you. Preferably until you or the pet dies. (Even stays when you camp out, like mage pets.) I suppose making an item check in players inventory for a 'mercenary' item in EVENT_ENTERZONE may work but I am unsure if $hasitem works in player.pl

I was thinking this may work but I haven't confirmed it:
item 80000 = Merc Pet Coin (LORE, NO DROP, NO RENT) <-Decays when you log out

sub EVENT_ENTERZONE {

if($hasitem == "80000" && $ulevel >= 10) { #checks if player is high enough for merc (assuming merc is lvl 10+)
quest::makepet(null, MercPet10, "Merc");
}
}

I'm away from home but do you think this would work?