was wondering if someone could review my work. ive been testing out a few things.
please respond with any errors i have.
Code:
#practice script
sub EVENT_SAY
{
if($text=~/hail/i)
{
quest::say("Greetings $name. I can perform multiple [tasks] for you.");
}
if($text=~/what tasks/i)
{
quest::say("I can raise your [level] to whatever you wish, I can [save] your
progress, and summon a [weapon] for you");
}
if($text=~/level/i)
{
quest::say("State the level you wish to be.");
}
$level = $level;
if($text=~/$level/i)
{
quest::level($level);
quest::say("You have been leveled");
}
if($text=~/save/i)
{
quest::save();
quest::say("You have been saved");
}
if($text=~/what weapon/i)
{
quest::say("I can summon a random magical weapon for you. Decide now whether you want
it or not.");
}
if($text=~/yes/i)
{
$random = int(rand(55261,24773,25989,22982,26031,54065,43148,7823));
quest::summonitem($random);
quest::say("Your weapon has been summoned.");
}
}
sub EVENT_ITEM
{
{
quest::say("I do not require payment of any kind.");
if($item1 > 0){quest::summonitem("$item1");}
if($item2 > 0){quest::summonitem("$item2");}
if($item3 > 0){quest::summonitem("$item3");}
if($item4 > 0){quest::summonitem("$item4");}
if($platinum != 0 || $gold !=0 || $silver != 0 || $copper != 0) {
quest::givecash($platinum, $gold, $silver, $copper);}
}
}
also, so im not accused of stealing, the return items/cash piece at the end i got from sotonin. saw it in one of his quests and decided to use it since it is really useful
thanks sotonin