Loading...   


#Check if they have disc and train it..
if ($client->GetDiscSlotBySpellID(6192) == -1) {
	$client->TrainDiscBySpellID(6192);
}
#Check disc and remove it...
if ($client->GetDiscSlotBySpellID(6192) != -1) {
	$client->UntrainDisc($client->GetDiscSlotBySpellID(6192), 1);
}
#Remove a spell from the spellbar..
$client->UnmemSpellBySpellID(11); #Remove Holy Armor from the spell bar.. mainly to be used after removing spells from spell book!


use POSIX;
## Update instance timer...
#Can be used in many other examples.. 
if($text=~/#alterinstance/i) {
	my @arg = split(" ", $text);
	if ($instanceid > 0 && $arg[1] > 0) {
		$client->Message(335, "Instance $instanceid Timer updated...");
		quest::UpdateInstanceTimer($instanceid, $arg[1]);
		my $days = floor($arg[1] / 86400);
		$arg[1] -= ($days * 86400);
		my $hours = floor($arg[1] / 3600);
		$arg[1] -= ($hours * 3600);
		my $minutes = floor($arg[1] / 60);
		$arg[1] -= ($minutes * 60);
		my $seconds = $arg[1];
		$client->Message(335, "New instance_timer is $days days, $hours hours, $minutes minutes, $seconds seconds");
	}
}

Raw Paste Data