Jump to content
  • 0

[HELP] Random spawn location


NosferatusS

Question

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

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

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 :)

Link to comment
Share on other sites

  • 0

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)

Link to comment
Share on other sites

  • 0

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 :( )

Link to comment
Share on other sites

  • 0

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.

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

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock