Jump to content
  • 0

Mob / NPC -related commands


ToiletMaster

Question


  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  276
  • Reputation:   7
  • Joined:  08/11/12
  • Last Seen:  

Hi guys, this is under the script commands and i came across a small issue here.

	<Normal NPC object definition. Let's assume you called him NPCNAME.>
	mes "[summon Man]";
	mes "Want to start the kill?";
	next;
	menu "Yes",L_Yes,"No",-;
	mes "[summon Man]";
	mes "Come back later";
	close;
L_Yes:
	monster "prontera",0,0,"Quest Poring",1002,10,"NPCNAME::OnPoringKilled";
	// By using 0,0 it will spawn them in a random place.
	mes "[summon Man]";
	mes "Now go and kill all the Poring I summoned";
	// He summoned ten.
	close;
OnPoringKilled:
	set $PoringKilled,$PoringKilled+1;
	if ($PoringKilled==10) goto L_AllDead;
	end;
L_AllDead:
	announce "Summon Man: Well done all the poring are dead",3;
	set $PoringKilled,0;
	end;

I'm not sure whether it's stucked on OnPoringKilled or L_AllDead cause

it doesn't announce at all once i spawned all 10.

No modifications were done or whatsoever, but it just doesn't work for a reason ._.

aside from that, i ensured that my my NPC name was NPCNAME

any help would be great!

Edited by ToiletMaster
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

dunno how to reproduce this error also

prontera,156,180,5    script    NPCNAME    100,{
   mes "[summon Man]";
   mes "Want to start the kill?";
   next;
   menu "Yes",L_Yes,"No",-;
   mes "[summon Man]";
   mes "Come back later";
   close;
L_Yes:
   monster "this", -1,-1,"Quest Poring",1002,10,"NPCNAME::OnPoringKilled";
   // By using 0,0 it will spawn them in a random place.
   mes "[summon Man]";
   mes "Now go and kill all the Poring I summoned";
   // He summoned ten.
   close;
OnPoringKilled:
   set $PoringKilled,$PoringKilled+1;
   if ($PoringKilled==10) goto L_AllDead;
   end;
L_AllDead:
   announce "Summon Man: Well done all the poring are dead",3;
   set $PoringKilled,0;
   end;
}

post-8685-0-30054400-1355253292_thumb.jpg

although, usually for event script,

unless it is meant to save permanent data, we usually just use npc variable for it

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  76
  • Topics Per Day:  0.02
  • Content Count:  276
  • Reputation:   7
  • Joined:  08/11/12
  • Last Seen:  

dunno how to reproduce this error also

prontera,156,180,5	script	NPCNAME	100,{
mes "[summon Man]";
mes "Want to start the kill?";
next;
menu "Yes",L_Yes,"No",-;
mes "[summon Man]";
mes "Come back later";
close;
L_Yes:
monster "this", -1,-1,"Quest Poring",1002,10,"NPCNAME::OnPoringKilled";
// By using 0,0 it will spawn them in a random place.
mes "[summon Man]";
mes "Now go and kill all the Poring I summoned";
// He summoned ten.
close;
OnPoringKilled:
set $PoringKilled,$PoringKilled+1;
if ($PoringKilled==10) goto L_AllDead;
end;
L_AllDead:
announce "Summon Man: Well done all the poring are dead",3;
set $PoringKilled,0;
end;
}

post-8685-0-30054400-1355253292_thumb.jpg

although, usually for event script,

unless it is meant to save permanent data, we usually just use npc variable for it

hmmm... i guess it's saved on a permanent data? cause my friends that tried manage to get it to work once on their end. but not anymore.

---edit---

is there any way to make it work on another method where the monster spawns and you need to kill 10 of them before you can proceed?

---Edit----

sorry din't notice the variable was causing the problem haha, when explaining it to someone then suddenly i just recalled and tested it out with the variable and it worked normally. Thanks again annie, after seeing the picture and your explanation. it came clear that the variable was giving the problem hahaha

Edited by ToiletMaster
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...