Search the Commands

Home  All  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z 

Details for command monster:
* monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>"};
This command will spawn a monster on the specified coordinates on the specified
map. If the script is invoked by a character, a special map name, "this", will
be recognised to mean the name of the map the invoking character is located at.
This command works fine in the item scripts.

The same command arguments mean the same things as described above in the
beginning of this document when talking about permanent monster spawns. Monsters
spawned in this manner will not respawn upon being killed.

Unlike the permanent monster spawns, if the mob id is -1, a random monster will
be picked from the entire database according to the rules configured in the
server for dead branches. This will work for all other kinds of non-permanent
monster spawns.

The only very special thing about this command is an event label, which is an
optional parameter. This label is written like '<NPC object name>::<label name>'
and upon the monster being killed, it will execute the script inside of the
specified NPC object starting from the label given. The RID of the player
attached at this execution will be the RID of the killing character.

monster "place",60,100,"Poring",1002,1,"NPCNAME::OnLabel";

If you do not specify any event label, a label in the NPC object that ran this
command, called 'OnMyMobDead:' will execute anyway, if present.

The coordinates of 0,0 will spawn the monster on a random place on the map.

The 'areamonster' command works much like the 'monster' command and is not
significantly different, but spawns the monsters within a square defined by

Simple monster killing script:

<Normal NPC object definition. Let's assume you called him NPCNAME.>
mes "[Summon Man]";
mes "Want to start the kill?";
menu "Yes",L_Yes,"No",-;
mes "[Summon Man]";
mes "Come back later";
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.
set $PoringKilled,$PoringKilled+1;
if ($PoringKilled==10) goto L_AllDead;
announce "Summon Man: Well done all the poring are dead",3;
set $PoringKilled,0;

For more good examples see just about any official 2-1 or 2-2 job quest script.

Valid XHTML 1.0 Strict Valid CSS!