EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Help With Script? (https://www.eqemulator.org/forums/showthread.php?t=27212)

merb 01-10-2009 08:07 PM

Help With Script?
 
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!

merb 01-10-2009 08:10 PM

Sorry for posting the same thing twice in the forums, my clicking finger got itchy after my internet crapped out. Ignore one of the two :P


All times are GMT -4. The time now is 11:00 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.