Jump to content
  • 0
Lord Ganja

How do I get of an error like this? npc_event: event not found

Question

I use an item that has a bonus that summons a slave clone, and whenever I unequipped the item it will call this functions for the clone to die.

function script unequip_item {  killmonster strcharinfo(3), "clonecheck::On"+ getcharid(0);  end;}

 

 

Here's the script that summons the clone:

clone "prontera",150,150,"clonecheck::On"+getcharid(0), getcharid(0), getcharid(0), 0x8D, 1, 40;

 

BUT whenever another player killed the clone I got this error.

[Error]: npc_event: event not found [clonecheck::On150031]

 

Since 150031 is the clone master's id, I don't have any idea how to make the npc event for that so I can avoid the error.

 

Any ideas? Thanks in advance!

 

 

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

clone "prontera",150,150,"clonecheck::On"+getcharid(0), getcharid(0), getcharid(0), 0x8D, 1, 40;

See you have only declared it, " clonecheck::On"+getcharid(0) , so when dead it will call that function, just change it...

Share this post


Link to post
Share on other sites
  • 0

clone "prontera",150,150,"clonecheck::On"+getcharid(0), getcharid(0), getcharid(0), 0x8D, 1, 40;

See you have only declared it, " clonecheck::On"+getcharid(0) , so when dead it will call that function, just change it...

I don't have idea what to change it. I used On"+getcharid(0) so when the player unequip the item it calls the function unequip_item to kill the specific clone of the user.

 

If i'm going to change it to something not unique, like clonecheck::OnCloneDead. And someone unequip the item(calls the function unequip_item), all clones on the same map are going to die since they're on the same type of event.

Share this post


Link to post
Share on other sites
  • 0

@@Lord Ganja

that method was old, you probably got this script from eathena forum

EDIT: found it -> https://www.eathena.ws/board/index.php?s=&showtopic=177722&view=findpost&p=1001559

at that time, *monster and *clone command doesn't return the GID

 

now that these command returns the GID of the monster, don't have to do that anymore

 

-	script	clonecheck	FAKE_NPC,{OnInit:	setitemscript Bow, "{ getmapxy .@map$, .@x, .@y, 0; @bow_clone = clone( .@map$,.@x,.@y,"clonecheck::OnDead", getcharid(0), getcharid(0), 0x8D, 1, 40 ); }", 1;	setitemscript Bow, "{ unitkill @bow_clone; @bow_clone = 0; }", 2;OnDead:	end;}
.

btw move to script support

 

EDIT : forgot to set @bow_clone back to 0 ... again ... need to fix this bad habit

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

 

@@Lord Ganja

that method was old, you probably got this script from eathena forum

EDIT: found it -> https://www.eathena.ws/board/index.php?s=&showtopic=177722&view=findpost&p=1001559

at that time, *monster and *clone command doesn't return the GID

 

now that these command returns the GID of the monster, don't have to do that anymore

 

-	script	clonecheck	FAKE_NPC,{OnInit:	setitemscript Bow, "{ getmapxy .@map$, .@x, .@y, 0; @bow_clone = clone( .@map$,.@x,.@y,"clonecheck::OnDead", getcharid(0), getcharid(0), 0x8D, 1, 40 ); }", 1;	setitemscript Bow, "{ unitkill @bow_clone; }", 2;OnDead:	end;}
.

btw move to script support

 

Thank you @@AnnieRuru. I'll try it later once I get to my computer :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.