Profile Posted September 3, 2017 Group: Members Topic Count: 24 Topics Per Day: 0.01 Content Count: 77 Reputation: 1 Joined: 04/15/17 Last Seen: January 4, 2021 Share Posted September 3, 2017 Hi, I am currently using the code below to give a reward to the character which kills (Takes out most of the monster's HP). However, when there are a few players attacking the monster and it dies, for some reason the reward is being given to multiple players. Could anyone tell me what I am doing wrong? or if this is a bug with OnMobDeath? // monster monster strcharinfo(3),0,0,"[Event] Boss"+"",1957,1,strnpcinfo(0)+"::OnBossKill"; OnBossKill: delwaitingroom; if( mobcount( strcharinfo(3),strnpcinfo(0)+"::OnBossKill" ) > 0 ){ waitingroom "There are ["+mobcount( strcharinfo(3),strnpcinfo(0)+"::OnBossKill")+"] Monsters remaining.",0; end; }else{ delwaitingroom; waitingroom "Good job!",0; specialeffect 709; announce "Well done to team [ "+getpartyname( getcharid(1) )+" ] which has sucessfully completed the mission! ",0; getpartymember getcharid(1),1; getpartymember getcharid(1),2; set @Location$,strcharinfo(3); for ( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 ){ if ( isloggedin($@partymemberaid[.@i]) ){ attachrid $@partymemberaid[.@i]; if( strcharinfo(3) == @Location$ ){ unittalk getcharid(3),"YEEEY! We have done it!"; unitemote getcharid(3),e_heh; specialeffect2 709; for( set .@a,0; .@a < getarraysize( .Reward ); set .@a,.@a + 2 ){ getitem .Reward[.@a],.Reward[.@a+1], $@partymemberaid[.@i]; } dispbottom "[Laxus] Here is your reward..."; stopnpctimer; Thank you! Quote Link to comment Share on other sites More sharing options...
0 crazyarashi Posted September 3, 2017 Group: Developer Topic Count: 50 Topics Per Day: 0.02 Content Count: 763 Reputation: 227 Joined: 02/11/17 Last Seen: September 21, 2023 Share Posted September 3, 2017 Your rewarding is for the whole party Quote Link to comment Share on other sites More sharing options...
0 Profile Posted September 3, 2017 Group: Members Topic Count: 24 Topics Per Day: 0.01 Content Count: 77 Reputation: 1 Joined: 04/15/17 Last Seen: January 4, 2021 Author Share Posted September 3, 2017 Is it? hahaha, how would I change it to only the mobkiller? Quote Link to comment Share on other sites More sharing options...
0 crazyarashi Posted September 3, 2017 Group: Developer Topic Count: 50 Topics Per Day: 0.02 Content Count: 763 Reputation: 227 Joined: 02/11/17 Last Seen: September 21, 2023 Share Posted September 3, 2017 you just need to remove the party member aid in the rewarding :)) getitem .Reward[.@a],.Reward[.@a+1], $@partymemberaid[.@i]; // getitem .Reward[.@a],.Reward[.@a+1]; 1 Quote Link to comment Share on other sites More sharing options...
0 Profile Posted September 3, 2017 Group: Members Topic Count: 24 Topics Per Day: 0.01 Content Count: 77 Reputation: 1 Joined: 04/15/17 Last Seen: January 4, 2021 Author Share Posted September 3, 2017 Oooh, I see... So that was the issue. Will put it on the live server and see if the issue continues. Thank you! Quote Link to comment Share on other sites More sharing options...
0 Profile Posted September 8, 2017 Group: Members Topic Count: 24 Topics Per Day: 0.01 Content Count: 77 Reputation: 1 Joined: 04/15/17 Last Seen: January 4, 2021 Author Share Posted September 8, 2017 (edited) Ok, have been watching the players doing the event and it seems that it still continues to give 2 or 3 rewards sometimes. (There were 7 people on the party and 2 received the reward.) Could anybody help? Edited September 8, 2017 by Profile Quote Link to comment Share on other sites More sharing options...
Question
Profile
Hi, I am currently using the code below to give a reward to the character which kills (Takes out most of the monster's HP).
However, when there are a few players attacking the monster and it dies, for some reason the reward is being given to multiple players.
Could anyone tell me what I am doing wrong? or if this is a bug with OnMobDeath?
Thank you!
Link to comment
Share on other sites
5 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.