Jump to content
  • 0

MVP Cash Points not working on summoned mvps


Zaon

Question


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   0
  • Joined:  07/30/12
  • Last Seen:  

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;
}
}
}

 

Link to comment
Share on other sites

10 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   0
  • Joined:  07/30/12
  • Last Seen:  

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 by djmmac07
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

find the label triggered when the mvp from quest is killed and add

doevent "<your npc name where onnpckillevent>"+ "::OnNPCKillEvent";
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   0
  • Joined:  07/30/12
  • Last Seen:  

like this?

 

donpcevent "MVPReward#1708::OnNPCKillEvent";
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

doevent

not donpcevent

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   0
  • Joined:  07/30/12
  • Last Seen:  

Is this where I'm supposed to put it?

 

OnThanaDead:
	donpcevent "#thanatimer::OnActive";
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  


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;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   0
  • Joined:  07/30/12
  • Last Seen:  

I should've said this earlier I am using eA. I can't find that label on my thana_quest.txt

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   0
  • Joined:  07/30/12
  • Last Seen:  

 

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...