07-02-2008, 02:53 AM
If you truly want something like that why not look at how the aggressive npc's work make a duplicate of that for the pet so it follows you around, then maybe add a sub so that if your being attacked the pet attacks that npc, then add a new table to give the pet equipment add a sub for that that tells it what hte npc is wearing and how to calculate the damage, thenmake sure you make it so that pet can follow you through maps you can make it so that when the character is loaded it checks to see if they have a pet if so then it checks to see which it is so
Pet = 0 means no pet
if pet = 5 it would load pet 5 and you can make it so that pet is from your npc's or a whole new pet.ini database or a mysql database, if you trully wanted to get creative make it so that the npc can gain levels, so copy the player exp calculation and convert it over to the pet, then also change the exp so it checks if the player has a pet then figure out how much exp to give that pet also max sure you have it set so a npc has hp and mp, and that it knows how to store it. and make it so that if the pet dies it update the character's file to no pet and make it so the pet disappears...
Pet = 0 means no pet
if pet = 5 it would load pet 5 and you can make it so that pet is from your npc's or a whole new pet.ini database or a mysql database, if you trully wanted to get creative make it so that the npc can gain levels, so copy the player exp calculation and convert it over to the pet, then also change the exp so it checks if the player has a pet then figure out how much exp to give that pet also max sure you have it set so a npc has hp and mp, and that it knows how to store it. and make it so that if the pet dies it update the character's file to no pet and make it so the pet disappears...