View Single Post
  #2  
Old 01-04-2013, 11:48 PM
javewow's Avatar
javewow
Sarnak
 
Join Date: Aug 2012
Location: work
Posts: 74
Default

Quote:
Originally Posted by c0ncrete View Post
Code:
use List::Util qw(first);

sub EVENT_COMBAT
{
    return()unless($combat_state);
    $npc->Heal();
    quest::say(($npc->GetRace()==54?"Your blood will spill.":"Time to die, $name!"));
}

sub EVENT_DEATH
{
    return()if($npc->GetRace()==54);
    my($extra_loot)={
        join(' ',1..3)=>[15270,15275,15075,15271,15279,15212,15079,15274,15272],
        join(' ',4..6)=>[5043,6032,6030,7022,7024,94155,6031],
        join(' ',7..9)=>[2031,2036,2030,2034,2027,2038,2026,2029,2025,2032,2028,2033]
    };
    $extra_loot->{'10 10'}=$extra_loot->{join(' ',4..6)};
    my($roll)=quest::ChooseRandom(1..10);
    quest::addloot(quest::ChooseRandom(@{$extra_loot->{first{$roll~~[split(' ',$_)]}keys(%$extra_loot)}}),1);
}
you's .pl no working no loot!
__________________
To create the most beautiful server for "!!~[BP] PLARYBOT EQ~!" Welcome to our server
Reply With Quote