Jump to content
  • 0

Permanent monster spawn in area


Dori

Question


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  332
  • Reputation:   15
  • Joined:  12/11/11
  • Last Seen:  

I'm trying to make some monsters spawn in a certain area using permanent monster spawn, but I am having trouble making it work.
 
This is the script:

prontera,188,197,193,188	monster	Poring	1002,10,10000,11000,0

I tried different ways and no luck, the monsters spawn all over.

 

I don't want to use the areamonster one cuz you can's put a re-spawn time in that. Is there a way to get this to work? Could someone maybe show me an example using prontera?

Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

prontera,200,250,10,10	monster	Poring	1002,10,10000,11000,0

spawn the monster in a rectangle of 10x10 (I mean radius) centered at 200,250

 

190,260 -------------------------210,260

      |                                            |

      |                                            |

      |                200,250               |

      |                                            |

      |                                            |

190,240 -------------------------210,240

 

@Patskie

Yes it would be an alternative. But you can get rid of donpcevent

-    script    Sample    -1,{

    OnKill:
        sleep 1 * 60 * 1000;
    OnInit:
        monster "prontera",0,0,"Poring",1002,1,strnpcinfo(1)+"::OnKill";
        end;
}
  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  1479
  • Reputation:   172
  • Joined:  12/14/11
  • Last Seen:  

IF you are alright with NPCs, disguising as monsters, that can be killed, then this may do it:

 

(put this inside any working NPC script)

 

monster "prontera",188,197,"Poring 1",1002,1;

 

syntax:

 

monster <"map name">, <x>, <y>, <"display name">, <mob id>, <amount>[, <"event label">];

 

source: http://rathena.org/wiki/Monster

Edited by Winz
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  332
  • Reputation:   15
  • Joined:  12/11/11
  • Last Seen:  

But this is not spawn randomly in an area..+ I want the monsters to respawn.

I'm trying to get <xs> and <ys> to work: http://rathena.org/wiki/Permanent_Monster_Spawn

<map name>,<x>,<y>,<xs>,<ys>%TAB%monster%TAB%<monster name>%TAB%<mob id>,<amount>,<delay1>,<delay2>,<event>
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Like this? 

-    script    Sample    -1,{
    OnInit:
        while (1) {
            monster "prontera",0,0,"Poring",1002,1;
            sleep 1 * 60 * 1000; // 1 minute interval to respawn
        }
        end;
}
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

@Patskie

Your script will spawn a monster every min regardless the previous monster, alive or not.

 

@Phenex

Check your script :

prontera,188,197,193,188    monster    Poring    1002,10,10000,11000,0

  • X2 = X2 (horizontal) rectangle
  • Y2 = Y2 (vertical) rectangle

It spawns the monsters in a rectangle of 193x188 centered on x,y

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  332
  • Reputation:   15
  • Joined:  12/11/11
  • Last Seen:  

@Phenex

Check your script :

prontera,188,197,193,188    monster    Poring    1002,10,10000,11000,0

  • X2 = X2 (horizontal) rectangle
  • Y2 = Y2 (vertical) rectangle

It spawns the monsters in a rectangle of 193x188 centered on x,y

 

I'm just not so sure on how exactly to put the coords in X2 and Y2. Do you mind showing me an example using the prontera: make 10 porings spawn randomly in a small area?

Because I think I'm doing something wrong with the coordinates.

Edited by Phenex
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

@Capuche : 

Oh oh, i miss the re-spawn statement. How about this? 

-    script    Sample    -1,{
    OnInit:
        monster "prontera",0,0,"Poring",1002,1,strnpcinfo(1)+"::OnKill";
        end;
    OnKill:
        sleep 1 * 60 * 1000;
        donpcevent strnpcinfo(1)+"::OnInit";
        end;
}

 

Well i didn't comply with the user problem however this can be an alternative solution

Edited by Patskie
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  332
  • Reputation:   15
  • Joined:  12/11/11
  • Last Seen:  

@Capuche : 

Oh oh, i miss the re-spawn statement. How about this? 

-    script    Sample    -1,{
    OnInit:
        monster "prontera",0,0,"Poring",1002,1,strnpcinfo(1)+"::OnKill";
        end;
    OnKill:
        sleep 1 * 60 * 1000;
        donpcevent strnpcinfo(1)+"::OnInit";
        end;
}
 

Well i didn't comply with the user problem however this can be an alternative solution

 

 

so if I were to make them spawn only in the center of prontera, what do I do with the coordinates according to your script? I don't want them all to spawn in one spot.

I just want them to spawn within the blue area in the center randomly.

Like shown below:

2hrlizd.jpg

Edited by Phenex
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  332
  • Reputation:   15
  • Joined:  12/11/11
  • Last Seen:  

prontera,200,250,10,10	monster	Poring	1002,10,10000,11000,0

spawn the monster in a rectangle of 10x10 (I mean radius) centered at 200,250

 

190,260 -------------------------210,260

      |                                            |

      |                                            |

      |                200,250               |

      |                                            |

      |                                            |

190,240 -------------------------210,240


 

Oh I see, Now I understand how it works! Thank you so much Capuche + Everyone else for helping :)

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...