Wandering Poring v1.0

jTynne

High Council
Messages
249
Points
0
Emulator
This is a very simple event script I created for the GM's of my server.

Basically, you type one command and it spawns 5 "Wandering Porings" on the map of your choosing.

You will want to customize the prizes that you receive from the event (it gives Red/Yellow/Orange/White/Blue Potions by default). It's also extremely easy to add in additional prizes.

// Syntax: Item ID / Quantity

if(.@prize == 1) { getitem 501,1; }

if(.@prize == 2) { getitem 502,1; }

if(.@prize == 3) { getitem 503,1; }

if(.@prize == 4) { getitem 504,1; }

if(.@prize == 5) { getitem 505,1; }

// 25 Poring Coins Base Prize

getitem 7539,25;

Below is the code; After you change the values noted above in red, you should be able to just save this as a .txt, load it in-game, and voila.
default_smile.png


Questions, comments? Post as a response to this thread! If you find it useful, please +1 this thread and rate me five stars. Thanks!

Code:
-	script	poringbind	-1,{OnInit:	unbindatcmd "poring";	bindatcmd("poring","poringbind::OnAtcommand",20,90);	end;	OnAtcommand:if(getgroupid() < 20) { end; }set @map$,.@atcmd_parameters$[0];  if(@map$ == "") {dispbottom "Syntax: @poring <mapname>";dispbottom "Five Porings will spawn on the map you choose. Recommended usage for this event is 3-5 times per day.";dispbottom "NOTE: Do NOT use capitals in the map name otherwise no Poring will spawn!";end;} monster @map$,0,0,"Wandering Poring",1002,5,"poringbind::OnKill";announce "[Wandering Poring] : 5x Wandering Porings have been sighted on the map: "+@map$+". The first person to find and kill each will receive an award!",0;end; OnKill:// Update Here!set .@prize,rand(1,5);announce "[Wandering Poring] : "+strcharinfo(0)+" has captured a Wandering Poring on the map "+strcharinfo(3)+"!",0;// Syntax: Item ID / Quantityif(.@prize == 1) { getitem 501,1; }if(.@prize == 2) { getitem 502,1; }if(.@prize == 3) { getitem 503,1; }if(.@prize == 4) { getitem 504,1; }if(.@prize == 5) { getitem 505,1; }// 25 Poring Coins Base Prizegetitem 7539,25;end; }
 
Last edited by a moderator:
Very welcome! Please be kind and award me a +1 at the bottom right of the thread if you use or find the script useful-- thanks! ^^

 
sir what commands am i going to type to activate this event?
default_smile.png
You have it right there in the code:

Code:
if(@map$ == "") {dispbottom "Syntax: @poring <mapname>";dispbottom "Five Porings will spawn on the map you choose. Recommended usage for this event is 3-5 times per day.";dispbottom "NOTE: Do NOT use capitals in the map name otherwise no Poring will spawn!";end;}
 
Suggestions? Remove this part :

dispbottom "NOTE: Do NOT use capitals in the map name otherwise no Poring will spawn!";
and change this :

set @map$,.@atcmd_parameters$[0];
to :

set @map$,strtolower(.@atcmd_parameters$[0]);
to ensure that the input will be in lower case form?
default_biggrin.png


 
But when i used @poring the emulator says "@poring is a invalid command"
Show error if any. Did you modify the name of the script? ( the poringbind one? )

Code:
-	script	poringbind	-1,{
 
Your emulator? I tried installing the script and the only problem i have encountered during installation is the tab part of the script heading?

 
but when i type @poring it says invalid command
default_smile.png
) just like haniculdummy did.. 
default_happy.png
Your reply is here:

Your emulator? I tried installing the script and the only problem i have encountered during installation is the tab part of the script heading?

Did you get any errors on map server when parsing the NPC? Your answer is you have to change each set of 4 spaces for a tabulation space.

 
Last edited by a moderator:
No no no, i am answering some questions and tell my experience while installing the script. It is working fine on my test server 

 
Whops, sorry Patskie, was trying to reply Mission all the time on last post
default_sry.gif


 
Yes it is, but you should do a workaround them for setting automatically the necessary parameter (mapname only in this case).

 
Back
Top