I read a post a while ago that was very useful in quest production. Basically, the quest allows a player to obtain a pet by hailing another NPC, but it isn't like a bot, more like a summoned or charmed pet. This is the original code:
Code:
sub EVENT_SAY {
if ($text=~/hail/i) {
quest::say ("I will be your pet");
$client->MakePet(null, TestPet, "Light Elemental");
}
}
The original code works fine (of course after I change it to match my pets database). However, this is what I am trying to achieve:
Code:
sub EVENT_SAY {
if ($text=~/hail/i) {
quest::say("Halt! It would not be wise to venture further alone. If you would like to hire one of my men to assist you, that could be arranged, for a [price].");
}
if ($text=~/price/i) {
quest::say("A hefty sum of platinum will earn you my finest soldier; one thousand should do just fine."):
}
if ($platinum==1000) {
$client->MakePet(null, elfsoldier, "an elven soldier");
}
}
I have found that adding anything in between the hail and makepet command (such as the platinum command) doesn't work, even if its just responding to more text. I have of course edited the pet database to include the elven soldier's ID and name. Any help would be greatly appreciated!