Jump to content
  • 0

[HELP] Random spawn location


Question

Posted

I'm trying to make 1 mob spawn on different locations when it dies... I have made 2 different spawn locations, but when i try it out the mob doesnt spawn at all after being killed...

 

If any1 has any experiance how to do it... what to enter in the sql lines at random_spawn, I'd appreciate if you would help me out,

 

Thnx

6 answers to this question

Recommended Posts

  • 0
Posted

try create 2 or more different mobs with different IDs but with same name, idTemplate, drops, xp, ... maybe a unique moster with the same id in the spawn_list table can cause problems. im not sure u must test it. just a little tip :)

  • 0
Posted

i already created 2 spawn locations and created random_spawn... the only thing that i dunno what to enter under the colums in random_spawnlist... i entered 60 sec for respawn and 80 sec for despawn but the mob spawns and despawns instantly :/ dunno what to enter... so please if somebody have already done this tell me how to do it...

 

(i cant create more mobs, cos i want it only to be one mob on a secret locations so when he doest it will spawn somewhere that no1 knows so they have to find it 1st)

  • 0
Posted

nobody knows? c'mon there has to be a way :/, many pros here, any1 willing to help? :) (sorry for double posting, had to bring the topic back to life otherwise it would fall into oblivion :( )

  • 0
Posted

but than he have to view in interlude the code.. because idk what update but it was "fix" by ncsoft.. they did him on  static spawn point ;)

  • 0
Posted

I'm trying to make 1 mob spawn on different locations when it dies... I have made 2 different spawn locations, but when i try it out the mob doesnt spawn at all after being killed...

 

If any1 has any experiance how to do it... what to enter in the sql lines at random_spawn, I'd appreciate if you would help me out,

 

Thnx

Just hardcode it. Get L2Npc do something like:

@Override
public void onSpawn(L2Npc)
{
if(npcId() == yourid)
{
      int randomizer = Rnd.get(0,100);
       if(this instanceof L2Npc && randomizer >= 0 && randomizer <50)
{
          this.setCoordinates(x,y,z,);
          this.SpawnMe();
}
      else  if(this instanceof L2Npc && randomizer >= 0 && randomizer <50)
{
          this.setCoordinates(x,y,z,);
          this.SpawnMe();
}
}
}

Note- I don't have eclipse here, so there may be something wrong with the method names,but thats pretty much how to do it.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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