-
-
Save Akkadius/9d30291f94cad55cbb54be37377c7f65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment