Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub EVENT_SAY
- {
- my %zonelist = (1 => [1, 5],
- 2 => [1, 10],
- 3 => [1, 15],
- 4 => [1, 20],
- 5 => [1, 25],
- 6 => [1, 30],
- 8 => [1, 35],
- 9 => [1, 40],
- 10 => [1, 45],
- 11 => [1, 50],
- 12 => [1, 55],
- 13 => [1, 60]);
- if($text=~/Hail/i)
- {
- plugin::Whisper("Hello, $name, would you like me to list " . quest::saylink("all", 1) . " the zones you can currently go to at level " . $ulevel . "?");
- }
- if($text=~/^All$/i)
- {
- foreach $key(sort {$a <=> $b} keys %zonelist)
- {
- if($ulevel >= $zonelist{$key}[0] && $ulevel <= $zonelist{$key}[1])
- {
- plugin::Whisper("Level $zonelist{$key}[0] - Level $zonelist{$key}[1]: " . quest::saylink("zone $key", 1, plugin::Zone($key)));
- }
- }
- }
- if($text=~/^Zone/i)
- {
- foreach $zone(keys %zonelist)
- {
- if(substr($text, 5) == $zone)
- {
- if($ulevel >= $zonelist{substr($text, 5)}[0] && $ulevel <= $zonelist{substr($text, 5)}[1])
- {
- quest::zone(plugin::ZoneShortName(substr($text, 5)));
- }
- elsif($ulevel < $zonelist{substr($text, 5)})
- {
- plugin::Whisper("You are not high enough level for this zone.");
- }
- elsif($ulevel > $zonelist{substr($text, 5)})
- {
- plugin::Whisper("You are too high level for this zone.");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement