Jump to content
  • 0

MVP Cash Points not working on summoned mvps


Question

Posted

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

 

10 answers to this question

Recommended Posts

Posted

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
Posted (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 by djmmac07
Posted


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;

Posted

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

 

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?

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...