Jump to content
  • 0

Problem with killedrid [ Mob ]


PandaLovesHamster

Question


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.02
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

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?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  350
  • Reputation:   43
  • Joined:  09/07/12
  • Last Seen:  

maybe because of where you call the killedrid and killerrid

https://rathena.org/wiki/Killedrid

Edited by benching
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.02
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

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

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