Jump to content
  • 0

Problem with killedrid [ Mob ]


Question

Posted

ama_dun03.gat,120,100,0,0	boss_monster	Samurai Specter	1492,1,3600000,0,"BossNPC::OnMVPDead"

-	script	BossNPC	-1,{

OnMVPDead:
//if ( getmonsterinfo( killedrid, 22 ) ) {
	set .@GID,getcharid(2);
	set .@map$,strcharinfo(3);
	set .@ID,killedrid;
	removemapflag .@map$,mf_gvg;
	announce strcharinfo(0)+" from the [ "+ getguildName(.@GID) +" ] guild has killed "+.@ID,0;
	initnpctimer;
	end;
}

Issue:

.@ID will always display 0 if I keep killing the mob that was spawned by using the script above. Everytime I do @reloadscript, the same thing happens, 0. If I restart the server and kill the mob, it will still announce as 0.

If I kill another mob and kill the MVP spawned through the script, it will display the mob ID I have killed before the MVP. Therefore the MVP itself is not updating the killedrid variable.

Help on to fix this please?

4 answers to this question

Recommended Posts

  • 0
Posted

Used OnNPCKillEvent, same thing happens. It won't register the mob that I killed. It's probably because of the event label. I made the script work, but it's very far from what I would say efficient.

A mob can only activate one Label at a time, so if it activates OnMVPDead: it cannot activate OnNpcKillEvent:

You can however run another NPC's label inside your OnMVPDead event

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...