adrianorj Posted November 3, 2017 Posted November 3, 2017 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? Quote
2 Balfear Posted November 3, 2017 Posted November 3, 2017 (edited) 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 November 3, 2017 by Balfear Quote
0 adrianorj Posted November 4, 2017 Author Posted November 4, 2017 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. Quote
0 Balfear Posted November 4, 2017 Posted November 4, 2017 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; } 1 Quote
Question
adrianorj
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?
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.