Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.76 KB | None | 0 0
  1. sub EVENT_SAY {
  2.     my $currency_item_id = 100134;
  3.     my $alt_currency_id = 1;
  4.    
  5.    if($text=~/hail/i) {
  6.         plugin::Whisper("Hail Adventurer! I am here to " . quest::saylink("exchange", 1) . " your " . quest::varlink(100134) . " into " . quest::saylink("points", 1) . ".");
  7.     } elsif($text=~/exchange/i) {
  8.        
  9.         if (quest::collectitems($currency_item_id, 0) > 0) {
  10.             my $amount = quest::collectitems($currency_item_id, 0);
  11.             client->AddAlternateCurrencyValue($currency_id, $amount);
  12.  
  13.             plugin::Whisper("Your " . plugin::commify(quest::collectitems($currency_item_id, 0)) . " "  . quest::varlink($currency_item_id) . " have been exchanged.");
  14.             quest::collectitems($currency_item_id, 1);
  15.         }
  16.  
  17.     }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement