Exception in thread "General Pool-3" java.lang.NullPointerException at net.sf.l2j.gameserver.LoginServerThread.sendPacket(LoginServerThread.java:464) at net.sf.l2j.gameserver.LoginServerThread.sendLogout(LoginServerThread.java:405) at net.sf.l2j.gameserver.network.L2GameClient$DisconnectTask.run(L2GameClient.java:595) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619)Exception in thread "General Pool-1" java.lang.NullPointerException at net.sf.l2j.gameserver.LoginServerThread.sendPacket(LoginServerThread.java:464) at net.sf.l2j.gameserver.LoginServerThread.sendLogout(LoginServerThread.java:405) at net.sf.l2j.gameserver.network.L2GameClient$DisconnectTask.run(L2GameClient.java:595) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619)

I seek to create a event. which must be spawn monsters in all town (small pigs). for the moments he spawn all pigs in all castle town and npc manager too but at the end of the event I can not make them disappear automatically

#Put the Id of the reward of your choice hereReward = 57#Put the amount to give of this reward depending on the player level like this: [ level35amount,level65amount,level80amount ]Amount = [ 300000,1000000 ,5000000 ] #change the reward! :)

def onTalk (self,npc,player) : npcId = npc.getNpcId() if not player.getQuestState("pigsSmash") : return if npcId == MANAGER : if not player in self.Registration: if len(self.Registration) < PigMaxPlayers: self.Registration.append(player) Reg = list(self.Registration) Id = [] for player in self.Registration: rr = player.getClient() if rr == None: for i in range(len(self.Registration)): if player == self.Registration[i]: Id.append[i] if len(Id) > 1: for i in range(len(Id)): self.Registration.pop(Id[i]) player.sendPacket(PlaySound("ItemSound.quest_accept")) return "<html><body>You are now participating in the event! Go and kill some Pigs!!</body></html>" else: self.Full = True return "<html><body>Event is full, try again next time ;)</body></html>" else: return "<html><body>You are already registered.</body></html>"