Zaon Posted July 13, 2013 Posted July 13, 2013 My MVP cash points script is not working when thanatos or ktullanux or any summoned mvps via quests are summoned. Anyone know a fix? OnNPCKillEvent: if (killedrid == 1708) { // THANATOS if (getcharid(1)){ getpartymember getcharid(1),1; getpartymember getcharid(1),2; set .@acc_id, getcharid(3); for( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 ) if( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) ) if( attachrid( $@partymemberaid[.@i] ) ) set #CASHPOINTS, #CASHPOINTS + (24/$@partymembercount); set .@sharedpoints, (24/$@partymembercount); dispbottom "You have gained "+.@sharedpoints+" DaedaRO Points."; attachrid( .@acc_id ); dispbottom "All party members have gained "+.@sharedpoints+" DaedaRO Points."; announce "MVP Watcher: "+strcharinfo(0) +" and the "+strcharinfo(1) +" party have killed " +getmonsterinfo(killedrid,0) +" for 24 DaedaRO point/s!",0,0x38ACEC; } else{ set #CASHPOINTS, #CASHPOINTS + 24; dispbottom "You have gained 24 DaedaRO point/s. Total is "+ #CASHPOINTS +" DaedaRO points."; announce "MVP Watcher: " +strcharinfo(0) +" has just killed " +getmonsterinfo(killedrid,0) +" for 24 DaedaRO point/s!",0,0x38ACEC; end; } } } Quote
Capuche Posted July 13, 2013 Posted July 13, 2013 thanatos or ktullanux or any summoned mvps via quests are summoned. The reason: these mvps have their own event and you can't cumulate theirs + onnpckillevent Add a doevent in their quest script to trigger your onnpckillevent Misc: I guest the purpose of your script is to give some point to your party - when you have one. you miss some curly in the for loop for( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 ) if( isloggedin( $@partymemberaid[.@i],$@partymembercid[.@i] ) ) if( attachrid( $@partymemberaid[.@i] ) ) {// <- curly here set #CASHPOINTS, #CASHPOINTS + (24/$@partymembercount); set .@sharedpoints, (24/$@partymembercount); dispbottom "You have gained "+.@sharedpoints+" DaedaRO Points."; }// <- curly here 1 Quote
Zaon Posted July 13, 2013 Author Posted July 13, 2013 (edited) Yes the purpose of the script is to give some sort of points to the partymembers so that all of them can share the points. Thanks I forgot to close the loop. Thanks for the help, ill try what you suggested EDIT: How do i add a doevent label in their quest script? As you can see I'm a beginner at scripting. Edited July 13, 2013 by djmmac07 Quote
Capuche Posted July 13, 2013 Posted July 13, 2013 find the label triggered when the mvp from quest is killed and add doevent "<your npc name where onnpckillevent>"+ "::OnNPCKillEvent"; Quote
Zaon Posted July 13, 2013 Author Posted July 13, 2013 like this? donpcevent "MVPReward#1708::OnNPCKillEvent"; Quote
Zaon Posted July 13, 2013 Author Posted July 13, 2013 Is this where I'm supposed to put it? OnThanaDead: donpcevent "#thanatimer::OnActive"; Quote
Capuche Posted July 14, 2013 Posted July 14, 2013 OnMyMobDead: if (mobcount("thana_boss","#sommon_thanatos::OnMyMobDead") < 1) { mapannounce "thana_boss","RAWWWWWWWWWWR........ This can't be.........................",bc_map,"0xff0000"; //FW_NORMAL 12 0 0 donpcevent "#cooltime_thana::OnEnable"; set $@thana_summon, 6; doevent "MVPReward#1708::OnNPCKillEvent";// <- this } end; Quote
Zaon Posted July 14, 2013 Author Posted July 14, 2013 I should've said this earlier I am using eA. I can't find that label on my thana_quest.txt Quote
Capuche Posted July 16, 2013 Posted July 16, 2013 Is this where I'm supposed to put it? OnThanaDead: donpcevent "#thanatimer::OnActive"; it's the good one OnThanaDead: donpcevent "#thanatimer::OnActive"; doevent "MVPReward#1708::OnNPCKillEvent"; set $@thana_summon,6; end; Quote
Zaon Posted July 16, 2013 Author Posted July 16, 2013 Is this where I'm supposed to put it? OnThanaDead: donpcevent "#thanatimer::OnActive"; it's the good one OnThanaDead: donpcevent "#thanatimer::OnActive"; doevent "MVPReward#1708::OnNPCKillEvent"; set $@thana_summon,6; end; I've tried this still doesn't work. Is there anyway to change the way thana is summoned? atcommand "@monster 1708" is it possible to change how it's summoned in the quest? Quote
Question
Zaon
My MVP cash points script is not working when thanatos or ktullanux or any summoned mvps via quests are summoned.
Anyone know a fix?
10 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.