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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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