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]"
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.
The server is running in l2house.com.ar with C4 mode and in L2Tekila within the same login you can also test it in C5, if you want me to raise another chronicle to test, just let me know.
I have a system where Accounts are saved on login screen for fast login. I am playing a server where this feature is not on the logic screen. How I can try to add this feature to the system?
I don't know what files I would have to touch.
Thanks!!
Hello everyone,
Given that he has lots of different projects but no concrete opinions..
I pose my request here.
Which serious Lineage2 HighFive project is the best choice?
For a server that can be custom and which can be suitable for a classic x10 server and an x1000 server for example?
L2J
Or we ideally have the source, in order to be able to add the farming systems, weapons and armor, npc...
Free or paid, it doesn't matter.
THANKS
Hello everyone,
Given that he has lots of different projects
but no concrete opinions..
I pose my request here.
Which serious Lineage2 HighFive project/emulator
is the best choice?
For a server that can be custom and
which can be suitable for a classic x10 server
and an x1000 server for example?
L2Java ideally
Or we ideally have the source,
in order to be able to add the farming systems,
weapons and armor, npc...
Free or paid, it doesn't matter.
THANKS
Question
Sectis
0 answers to this question
Recommended Posts
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.