Can anyone please help me on how to add more Sets of Tier Reward in this script?
I got everything all working fine, it's just that, I want this to be like, everytime OnBoxKill 1324, a random set of Tier Rewards will be shown instead of the same set over and over.
Instead of every OnBoxKill 1324: setarray .tier_reward_0,7227,30804,30805,30806,30000,30001; that is the only Set of Tier Reward it has..
was hoping that it has a random % chance maybe of selecting different Set of Tier Rewards to be distributed for Ex::
Question
Musika6988
Can anyone please help me on how to add more Sets of Tier Reward in this script?
I got everything all working fine, it's just that, I want this to be like, everytime OnBoxKill 1324, a random set of Tier Rewards will be shown instead of the same set over and over.
Instead of every OnBoxKill 1324: setarray .tier_reward_0,7227,30804,30805,30806,30000,30001; that is the only Set of Tier Reward it has..
was hoping that it has a random % chance maybe of selecting different Set of Tier Rewards to be distributed for Ex::
setarray .tier_reward_1,7227,7227,7227,7227,7227,7227;
setarray .tier_reward_2,30804,30804,30804,30804,30804,30804;
setarray .tier_reward_4,30805,30805,30805,30805,30805,30805;
Something like that?
And, how do I include the name of the Party Leader on the:
announce "[World Boss] The "+getpartyname(getcharid(1))+" Hunting Party killed the World Boss! Congratulations!", bc_all, 0xFF0000;
Thanks in advanced!
- script WorldBoss -1,{ OnTalk: .@party_id = getcharid(1); .@map$ = strcharinfo(3); .@label$ = @label$; if( getcharid(0) != getpartyleader( .@party_id,2 ) ){ message strcharinfo(0),"You're not Party Leader."; monster .@map$,rand(.@x,.@x-3),rand(.@y-3,.@y),"--ja--",1324,1,.@label$; end; }else{ mes "[Loot Distributor]"; mes "Please ensure you distribute the Rewards. If you cancelled this, your party might not able to receive any rewards."; next; mes "Reward List :"; for( .@i = 0; .@i < @size; .@i++ ) mes "^777777 ~ "+getitemname( @reward[.@i] )+"^000000"; if( prompt( "Distribute Loots","Dispose Loots" ) == 1 ){ getpartymember .@party_id; getpartymember .@party_id,1; .@party_size = $@partymembercount; copyarray .@party_aid[0],$@partymemberaid[0],.@party_size; copyarray .@party_name$[0],$@partymembername$[0],.@party_size; for( .@i = 0; .@i < $@partymembercount; .@i++ ){ if( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) ) .@party_name_menu$ = .@party_name_menu$ + $@partymembername$[.@i]; .@party_name_menu$ = .@party_name_menu$ +":"; } for( .@i = 0; .@i < @size; .@i++ ){ next; mes "^777777 ~ "+getitemname( @reward[.@i] )+"^000000"; if( prompt( "Cast Loots" ) == 1 ){ .@name = rand( .@party_size ); message .@party_name$[.@name],"Gained "+getitemname( @reward[.@i] )+" ( Distributed Randomly )"; } getitem @reward[.@i],1,.@party_aid[.@name]; } } mes "Congratulations!"; mapannounce .@map$,"All Rewards have been distributed.",0; end; } OnClock1159: OnClock2359: set .RandMap,rand( getarraysize( .Map$ ) ); set .RandMVP,rand( getarraysize( .MVP ) ); killmonster .Map$,"All"; .@mins = .sleep / 60000; announce "[World Boss] A rift on time and space is about to be opened! A World Boss will appear in " + .@mins + " minute! Prepare your Hunting Party!", bc_all, 0xFF0000; sleep .sleep; monster .Map$[ .RandMap ],0,0,"World Boss",.MVP[ .RandMVP ],1,strnpcinfo(0)+"::OnKilled"; announce "[World Boss] A World Boss "+getmonsterinfo( .MVP[ .RandMVP ],0 )+" appeared in "+.Map$[ .RandMap ]+" to wreck havoc!! Form a Hunting Party and stop it!!", bc_all, 0xFF0000; end; end; OnKilled: announce "[World Boss] The "+getpartyname(getcharid(1))+" Hunting Party killed the World Boss! Congratulations!", bc_all, 0xFF0000; getmapxy(.@map$,.@x,.@y,0); monster .@map$,rand(.@x,.@x-3),rand(.@y-3,.@y),"--ja--",1324,1,.npc_name$+"::OnBoxKill"; end; OnBoxKill: deletearray @reward; @label$ = .npc_name$+"::OnBoxKill"; @size = getd( ".tier_reward_"+.tier+"_size" ); copyarray @reward[0],getd( ".tier_reward_"+.tier+"[0]" ),@size; doevent "WorldBoss::OnTalk"; end; OnInit: // tier reward setarray .tier_reward_0,7227,30804,30805,30806,30000,30001; .tier_reward_0_size = getarraysize( .tier_reward_0 ); setarray .Map$[0],"prontera","morocc","geffen","payon","alberta","aldebaran","xmas","comodo","yuno","amatsu","gonryun","umbala","louyang","ayothaya","eibroch","hugel","rachel","veins","moscovia"; setarray .MVP[0],3165,3166,3167,3169,3175,3177; .sleep = 60000; // 60000ms = 1min .npc_name$ = strnpcinfo(0); setmapflag .map$,mf_partylock; setmapflag .map$,mf_nomobloot; setmapflag .map$,mf_nomvploot; end; }
Link to comment
Share on other sites
18 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.