Jump to content
  • 0
Sign in to follow this  
FleXx

Reward on Mob dead.

Question

Hi guys,

 

I`ll have a Problem with Alayne Wordlboss Script.

As you can see there should be given a reward of Gold to all Players on that Map on Mob dead, but this does not work.

 

1. Why is OnInit: Just RewardCount  with -1 and not RewardID? Could someone tell me the right way to handle the reward?

2. Players could abuse this system if it works, how can i handle that you have to atk the worldboss and on afk ( kick ) from map.

 

Hopefully someone can help me:)

 

OnWorldBossDied:
    stopnpctimer;
    killmonster $lastPopMap$, "All";
    setarray .@rewardId[0],
        969; //gold
    announce "[ System ] "+strcharinfo(0)+" just killed a World Boss !",bc_all,0x0000FF;        
    if(.rewardCount == -1)
    {
        set .rewardCount, getmapusers(strnpcinfo(4)) - 1;
    }
    for(set .@i,0; .@i<.rewardCount; set .@i,.@i+1)
    {
        set .@randItem, rand(0,getarraysize(.@rewardId) - 1);
        //edit 150 if the map length and height is different of 150 cell
        makeitem .@rewardId[.@randItem],1,$lastPopMap$,rand(150),rand(150); 
    }
    set $wordBossPop, 0;
    end;

OnInit:    
    set .rewardCount, -1;
    set .timerCount, 0;
    set .bossAliveDuration, 30; //in minutes

 

Thanks.

 

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.