Jump to content
  • 0

Help Me


adrianorj

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  12/22/15
  • Last Seen:  

Hello, guys, I'm trying to create a script
that after killing 10 monsters will open a portal to a different place ...
Can you help me, how do I do this?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 2

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  255
  • Reputation:   233
  • Joined:  07/24/13
  • Last Seen:  

Hi!

prontera,156,191,4	script	Summon Man	53,{
		mes "[Summon Man]";
		mes "Want to start the Poring hunt?";
		next;
		if (select("Yes.:No.") == 2) {
			mes "[Summon Man]";
			mes "Come back later.";
			close;
		}

		// Summon 10 Porings.
		// Using coordinates 0,0 will spawn them in a random location.
		monster "prontera",0,0,"Quest Poring",1002,10,"Summon Man::OnPoringKilled";

		mes "[Summon Man]";
		mes "Now go and kill all the Porings I summoned.";
		close;

	OnPoringKilled:
		$PoringKilled++;
		if ($PoringKilled >= 10) {
		//	announce "Summon Man: Well done. All the Porings are dead!",3;
			$PoringKilled = 0;
			enablenpc "WarpPortal#1";
		}
		end;
}

prontera,156,187,0	script	WarpPortal#1	45,2,2,{
	warp "prontera",156,181;
	end;
OnInit:
	disablenpc strnpcinfo(0);
	end;
}

You can find examples here script_commands.txt

Edited by Balfear
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   1
  • Joined:  12/22/15
  • Last Seen:  

Good afternoon friend!
How do I now after the open portal it close after 2 minutes?
Sorry for the English, I'm putting it through the translator. I am Brazilian.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  255
  • Reputation:   233
  • Joined:  07/24/13
  • Last Seen:  

6 hours ago, adrianorj said:

Good afternoon friend!
How do I now after the open portal it close after 2 minutes?
Sorry for the English, I'm putting it through the translator. I am Brazilian.

prontera,156,191,4	script	Summon Man	53,{
		mes "[Summon Man]";
		mes "Want to start the Poring hunt?";
		next;
		if (select("Yes.:No.") == 2) {
			mes "[Summon Man]";
			mes "Come back later.";
			close;
		}

		// Summon 10 Porings.
		// Using coordinates 0,0 will spawn them in a random location.
		monster "prontera",0,0,"Quest Poring",1002,10,"Summon Man::OnPoringKilled";

		mes "[Summon Man]";
		mes "Now go and kill all the Porings I summoned.";
		close;

	OnPoringKilled:
		$PoringKilled++;
		if ($PoringKilled >= 10) {
		//	announce "Summon Man: Well done. All the Porings are dead!",3;
			$PoringKilled = 0;
			enablenpc "WarpPortal#1";
			sleep 120000; // wait 2 minute
			disablenpc "WarpPortal#1";
		}
		end;
}

prontera,156,187,0	script	WarpPortal#1	45,2,2,{
	warp "prontera",156,181;
	end;
OnInit:
	disablenpc strnpcinfo(0);
	end;
}

 

  • Upvote 1
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...