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.