Jump to content

Question

Posted (edited)

if ((player != null) && (player.isInAnonymousZone())
{
while (i < 10)
{
actor.doCast(SkillTable.getInstance().getInfo(skillId, 1), player, true);


try {
   Thread.sleep(60000);              
} catch(InterruptedException ex) {
   Thread.currentThread().interrupt();
}
i = i + 1;
}
}

will this 

 

 

try {

   Thread.sleep(60000);              

} catch(InterruptedException ex) {

   Thread.currentThread().interrupt();

}

work to be casting the spell again after 1 minute?

 

also if i remove the  player != null , the mobs and other creatures will be doing the same thing if they are inside the zone?

 

Ps: i dont have any errors

Edited by ganjaradio

14 answers to this question

Recommended Posts

  • 0
Posted

The code is wrong on so many levels.. I'm speechless. You don't even know what you did there, except doCast method ^_^

 

 

If you want to delay an action, run it each X time, it's obvious that you need a runnable method, a threadpool. So, try again.

  • 0
Posted
ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new castSkill(player), 1000, 1000);

public static class castSkill implements Runnable()
{
  L2PcInstance _player = null
 
   public castSkill(L2PcInstance player)
   {
      _player = player
   }  @Override
  public void run()
  {
     player.doCast(actions here);
  }

}

You're kinda useless also if sweets is speechless i'm ultra speechless just because 1 month ago u had a private project that had 100 subscribers in fucking kiddo

  • 0
Posted

w0w, you really don't know, do you? Simply add this code inside your zone onEnter(), it's gonna run the action after 1sec and repeat each 1sec, obviously increase the time - I see your reply "I want 10min" or whatever. Also add an int, and ++ it after the cast and add your count check, obviously.

 

Please don't even try to create new project or server.

 

53758380.jpg

 


 

You are like this guy

 

SIIWQgN.jpg

  • 0
Posted (edited)

:happyforever:  :dat:  :alone:  :happyforever:  :gusta:  :you serious?:

 

You got me. The second attempt is even worse :D

Edited by SweeTs
  • 0
Posted
ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new castSkill(player), 1000, 1000);

public static class castSkill implements Runnable()
{
  L2PcInstance _player = null
 
   public castSkill(L2PcInstance player)
   {
      _player = player
   }  @Override
  public void run()
  {
     player.doCast(actions here);
  }

}

You're kinda useless also if sweets is speechless i'm ultra speechless just because 1 month ago u had a private project that had 100 subscribers in fucking kiddo

 

 

And the retard comes straight in with an even more retarded solution

  • 0
Posted (edited)

lock it

 

Ps: xdem ur calling access a retard but atleast she helps the other while.you dont,so who is the real retard? :)

Edited by ganjaradio
  • 0
Posted

lock it

 

Ps: xdem ur calling access a retard but atleast she helps the other while.you dont,so who is the real retard? :)

 

He likes calling him a she I give him that

Guest
This topic is now closed to further replies.


×
×
  • Create New...