Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub EVENT_SAY {
- my $currency_item_id = 100134;
- my $alt_currency_id = 1;
- if($text=~/hail/i) {
- plugin::Whisper("Hail Adventurer! I am here to " . quest::saylink("exchange", 1) . " your " . quest::varlink(100134) . " into " . quest::saylink("points", 1) . ".");
- } elsif($text=~/exchange/i) {
- if (quest::collectitems($currency_item_id, 0) > 0) {
- my $amount = quest::collectitems($currency_item_id, 0);
- client->AddAlternateCurrencyValue($currency_id, $amount);
- plugin::Whisper("Your " . plugin::commify(quest::collectitems($currency_item_id, 0)) . " " . quest::varlink($currency_item_id) . " have been exchanged.");
- quest::collectitems($currency_item_id, 1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement