View Single Post
  #4  
Old 01-12-2015, 12:33 PM
utbbop
Sarnak
 
Join Date: May 2009
Location: Mentor
Posts: 58
Default

Quote:
Originally Posted by Kingly_Krab View Post
You can achieve this like this.
Code:
sub EVENT_CONNECT {
    quest::settimer("Crystals", 3600);
}

sub EVENT_TIMER {
    if ($timer eq "Crystals") {
        quest::stoptimer("Crystals");
        my $radiant = quest::ChooseRandom(1..5);
        my $ebon = quest::ChooseRandom(1..5);
        $client->AddCrystals($radiant, $ebon);
        $client->Message(315, "You have recieved $radiant Radiant Crystals and $ebon Ebon Crystals. You now have " . plugin::commify($client->GetRadiantCrystals()) . " Radiant Crystals and " . plugin::commify($client->GetEbonCrystals()) . " Ebon Crystals.");
        quest::settimer("Crystals", 3600);
    }
}
Thanks a ton!
Going to play with this a bit and will let you know if I have any questions!
Reply With Quote