View Single Post
  #7  
Old 07-21-2011, 05:46 AM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

Perl scripting for the emu is probly easier than c++ to figure out. Here's the general idea for the pok enchanter guildmaster
Code:
sub EVENT_SAY { 
	if($text=~/enchant silver/i or $text=~/enchanted silver/i) {
		quest::say("Oh! You are interested in enchanted silver bars!  I only charge 100 platinum and Four regular Silver Bars for this service. I make them Four at a time.");
	}
	if($text=~/thicken mana/i or $text=~/viscous mana/i) {
		quest::say("Oh! You are interested in a vial of Viscous Mana!  I only charge 100 platinum and a poison vial and a pearl for this service. I make them one at a time.");
	}
}

sub EVENT_ITEM {
	if($platinum == 100 && plugin::check_handin(\%itemcount, 16500 => 4)) {
		quest::say("Ahh, here you are then.");
		quest::summonitem(16504, 4);
	}
	elsif($platinum == 100 && plugin::check_handin(\%itemcount, 10024 => 1, 16965 => 1)) {
		quest::say("Ahh, here you are then.");
		quest::summonitem(10250);
	}
        else {
           quest::say("I don't need this."); #text made up
           plugin::return_items(\%itemcount);
           if($platinum != 0 || $gold !=0 || $silver != 0 || $copper != 0) {
              quest::givecash($copper, $silver, $gold, $platinum);
           }
        }
}
__________________
The Realm
Reply With Quote