Skip to content

boithia ligo me ena script

Featured Replies

lipon exo kani modifie ena script na ke exo adari kapies lines lipon thelo to skill na to kani me rnd 100 < 20 ke hp 1/7 ke thelo mia voithia epidi ine episis ena minion spawn script ke otan kani to skill lei afto pou vlepete kato ala nmz oti tha to kani mia fora to skill ego thelo na to kani gia pada ala taftoxrona to skill na min bori to mob na to kani apo mono dld na ine completely ai handled  lipon kamia idea ?

[ c o d e ]   # By Evil33t
import sys
from net.sf.l2j.gameserver.ai          import CtrlIntention
from net.sf.l2j.gameserver.datatables  import SkillTable
from net.sf.l2j.gameserver.model       import L2Skill
from net.sf.l2j.gameserver.model.quest import State
from net.sf.l2j.gameserver.model.quest import QuestState
from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest
from net.sf.l2j.gameserver.network.serverpackets  import CreatureSay
from net.sf.l2j.util                   import Rnd

DARION = 25603
GUARD1 = 22405
GUARD2 = 22343
GUARD3 = 22342

class PyObject:
pass

class Quest (JQuest) :
def __init__(self,id,name,descr):
	JQuest.__init__(self,id,name,descr)
	self.npcobject = {}

def SpawnMobs(self,npc):
	newNpc = self.addSpawn(GUARD1,21381,243815,11086,0,False,0,False, npc.getInstanceId())
	newNpc = self.addSpawn(GUARD1,22291,243500,11086,0,False,0,False, npc.getInstanceId())
	newNpc = self.addSpawn(GUARD1,22480,244021,11086,0,False,0,False, npc.getInstanceId())
	newNpc = self.addSpawn(GUARD1,21822,244464,11086,0,False,0,False, npc.getInstanceId())
	newNpc = self.addSpawn(GUARD1,21745,243406,11086,0,False,0,False, npc.getInstanceId())
	newNpc = self.addSpawn(GUARD2,21402,244104,11086,0,False,0,False, npc.getInstanceId())
	newNpc = self.addSpawn(GUARD2,21519,243573,11086,0,False,0,False, npc.getInstanceId())
	newNpc = self.addSpawn(GUARD2,22456,243728,11086,0,False,0,False, npc.getInstanceId())
	newNpc = self.addSpawn(GUARD3,22362,244281,11086,0,False,0,False, npc.getInstanceId())
	newNpc = self.addSpawn(GUARD3,22024,243381,11086,0,False,0,False, npc.getInstanceId())
	newNpc = self.addSpawn(GUARD3,21568,244344,11086,0,False,0,False, npc.getInstanceId())
	newNpc = self.addSpawn(GUARD3,22117,244446,11086,0,False,0,False, npc.getInstanceId())

def onAttack(self, npc, player, damage, isPet, skill):
	npcId = npc.getNpcId()
	if npcId == DARION:
		try:
			test = self.npcobject[npc.getObjectId()]
		except:
			self.npcobject[npc.getObjectId()] = PyObject()
			self.npcobject[npc.getObjectId()].started = False
			self.npcobject[npc.getObjectId()].killed = False
			self.npcobject[npc.getObjectId()].hp_to_spawn = {}
			self.npcobject[npc.getObjectId()].hp_to_spawn[90]=False
			self.npcobject[npc.getObjectId()].hp_to_spawn[70]=False
			self.npcobject[npc.getObjectId()].hp_to_spawn[50]=False
			self.npcobject[npc.getObjectId()].hp_to_spawn[30]=False
			self.npcobject[npc.getObjectId()].hp_to_spawn[10]=False
			self.npc.addSkill[skillTable.getInstance()].getInfo(5503, 1))
		maxHp = npc.getMaxHp()
		nowHp = npc.getStatus().getCurrentHp()
		rnd  = Rnd.get(100)
		if (nowHp < maxHp*0.9) and not self.npcobject[npc.getObjectId()].hp_to_spawn[90]:
			self.npcobject[npc.getObjectId()].hp_to_spawn[90] = True
			self.SpawnMobs(npc)
		if (nowHp < maxHp*0.7) and not self.npcobject[npc.getObjectId()].hp_to_spawn[70]:
			self.npcobject[npc.getObjectId()].hp_to_spawn[70] = True
			self.SpawnMobs(npc)
		if (nowHp < maxHp*0.5) and not self.npcobject[npc.getObjectId()].hp_to_spawn[50]:
			self.npcobject[npc.getObjectId()].hp_to_spawn[50] = True
			self.SpawnMobs(npc)
		if (nowHp < maxHp*0.3) and not self.npcobject[npc.getObjectId()].hp_to_spawn[30]:
			self.npcobject[npc.getObjectId()].hp_to_spawn[30] = True
			self.SpawnMobs(npc)
		if (nowHp < maxHp*0.1) and not self.npcobject[npc.getObjectId()].hp_to_spawn[10]:
			self.npcobject[npc.getObjectId()].hp_to_spawn[10] = True
			self.SpawnMobs(npc)
		if (rnd < 23 ( nowHp < maxHp*0.2()
		    npc.doCast(SkillTable.getInstance().getInfo(5503, 1))
               npc.broadcastPacket(CreatureSay(npc.getObjectId(),0,npc.getName(),"All Shall Fall!!!"))

def onKill(self,npc,player,isPet):
	npcId = npc.getNpcId()
	if npcId == DARION:
		self.addSpawn(32374,21939,243917,11088,0,False,0,False, player.getInstanceId())
		self.npcobject[npc.getObjectId()].killed = True
	return 

QUEST = Quest(-1,"Darion","ai")

QUEST.addKillId(DARION)

QUEST.addAttackId(DARION)
print "[Darion Manager	]	[Loaded]"

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.