Thread: Skills quest
View Single Post
  #7  
Old 06-24-2015, 07:07 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

There was an extra }, try this:
Code:
sub EVENT_SAY {
    my %h = (10 => 20,
    40 => 40,
    80 => 60,
    160 => 80,
    320 => 100,
    640 => 120,
    1280 => 150,
    2560 => 200,
    5000 => 250);
    if($text =~/Hail/i) {
        quest::say("Greetings $name. If you want me to set your skills for you, please say so and I will give you my " . quest::saylink("price list", 1) . ".");
    } elsif($text=~/Price List/i) {
        quest::say("I can set all skills to the following skill levels:");
        quest::say("Level $h{$_}: " . quest::saylink($_, 1) . " Platinum") for (sort {$a <=> $b} @{[keys %h]});
    } elsif ($text!~/Hail/i && $text!~/Price List/i && $text ~~ @{[keys %h]} && $client->TakeMoneyFromPP(($text * 1000), 1)) {
        quest::setallskill($h{$text});
    }
}

Last edited by Kingly_Krab; 06-24-2015 at 07:16 PM..
Reply With Quote