View Single Post
  #2  
Old 05-03-2013, 11:33 AM
meth0d
Fire Beetle
 
Join Date: Apr 2013
Location: Denmark
Posts: 3
Default

I have included a short script which may help you see how the plugin is intended to be used.

InstanceTester.pl :-
Code:
sub EVENT_SAY {

	if($text =~ /setGlobal/i){
		plugin::SetInstanceRedoTimer("shrine_Instance_Timer", 60);
	}
	
	if($text =~ /getGlobal/i){
		plugin::GetInstanceRedoTimer("shrine_Instance_Timer");
	}
	
	
	if($text =~ /instance/i){
		if(plugin::IsInstanceTimerOver("shrine_Instance_Timer") == 0){
			
			$timeLeft = plugin::InstanceTimerRemaining("shrine_Instance_Timer", 0);
			$client->Message(15, "You've recently completed the Shrine instance. You have $timeLeft left before you can request it again");
			
		} else {
			### INSTANCE ASSIGNMENT CODE HERE
		}
	}
	
}
__________________
meth0d. the Blade Dancer of Draconis
Content and Quest Developer at Realm of Draconis
http://www.draconis.online/
Reply With Quote