Monster use:17:30 You see a player killer(level 102). he is a royal paladin. he is member of pk sqd.
Health: [1700 / 1700].
Mana: [0 / 0].
Position: [X: 1016] [Y: 1096] [Z: 7].
- haste when hp under 500
- sudden death rune (hit 250-500)
- exori san (hit 60-200)
- exura san (heal 700-900)
- don't use 2 attack/2 heals in same time (interval 2000 between spells, can heal and attack in same time)
- great spirit potion (heal 200-400)
- has random outfit
Screens (4 PK vs. demon):
In data/monster/monsters.xml add:
PHP:
<monster name="PK" file="PK.xml"/>
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Player Killer" nameDescription="a player killer(Level 102). He is a Royal Paladin. He is Member of PK SQD" race="blood" experience="1500" speed="450" manacost="0">
<health now="1700" max="1700"/>
<look type="128" head="20" body="30" legs="40" feet="50" corpse="6080"/>
<targetchange interval="20000" chance="0"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="0"/>
<flag convinceable="0"/>
<flag pushable="1"/>
<flag canpushitems="1"/>
<flag staticattack="100"/>
<flag lightlevel="233"/>
<flag lightcolor="35"/>
<flag targetdistance="3"/>
<flag runonhealth="500"/>
<flag skull="3" />
</flags>
<attacks>
<attack name="physical" interval="2000" chance="100" range="6" min="-20" max="-320">
<attribute key="shootEffect" value="arrow"/>
</attack>
<attack name="PKspellMonster" interval="2000" chance="100"/>
</attacks>
<defenses armor="27" defense="52" />
<immunities>
<immunity physical="0"/>
<immunity energy="0"/>
<immunity fire="0"/>
<immunity poison="0"/>
<immunity lifedrain="0"/>
<immunity paralyze="0"/>
<immunity outfit="0"/>
<immunity drunk="0"/>
<immunity invisible="1"/>
</immunities>
<loot>
<item id="2148" countmax="20" chance1="100000" chancemax="0"/>
<item id="1949" chance="10000"/>
<item id="2467" chance="10000"/>
<item id="2642" chance="6666"/>
<item id="1987" chance="100000">
<inside>
<item id="2044" chance="6666"/>
<item id="2689" countmax="3" chance1="20000" chancemax="0"/>
<item id="2401" chance="3333"/>
<item id="2166" chance="1428"/>
</inside>
</item>
</loot>
</monster>
PHP:
<instant name="PKspellMonster" words="PKspellMonster" lvl="10" mana="500" prem="1" aggressive="0" needtarget="1" params="0" exhaustion="100" soul="3500" script="PK.lua" />
In data/spells/scripts/ create file PK.lua and paste:
PHP:
-- haste
local combatHaste = createCombatObject()
setCombatParam(combatHaste, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combatHaste, COMBAT_PARAM_AGGRESSIVE, 0)
setCombatParam(combatHaste, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE)
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 14000)
setConditionFormula(condition, 0, 350, 0, 350)
setCombatCondition(combatHaste, condition)
-- outfit
local outCombat = createCombatObject()
setCombatParam(outCombat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
local condition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 3 * 24 * 3600 * 1000) -- here time in miliseconds, default 3 days
addOutfitCondition(condition, 0, 128, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 129, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 130, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 131, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 132, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 133, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 134, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 143, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 144, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 145, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 146, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 151, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 152, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 153, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 154, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 251, 114, 114, 94, 94)
addOutfitCondition(condition, 0, 128,39, 35,45, 45)
addOutfitCondition(condition, 0, 129,39, 35,45, 45)
addOutfitCondition(condition, 0, 130,39, 35,45, 45)
addOutfitCondition(condition, 0, 131,39, 35,45, 45)
addOutfitCondition(condition, 0, 132,39, 35,45, 45)
addOutfitCondition(condition, 0, 133,39, 35,45, 45)
addOutfitCondition(condition, 0, 134,39, 35,45, 45)
addOutfitCondition(condition, 0, 143,39, 35,45, 45)
addOutfitCondition(condition, 0, 144,39, 35,45, 45)
addOutfitCondition(condition, 0, 145,39, 35,45, 45)
addOutfitCondition(condition, 0, 146,39, 35,45, 45)
addOutfitCondition(condition, 0, 151,39, 35,45, 45)
addOutfitCondition(condition, 0, 152,39, 35,45, 45)
addOutfitCondition(condition, 0, 153,39, 35,45, 45)
addOutfitCondition(condition, 0, 154,39, 35,45, 45)
addOutfitCondition(condition, 0, 251,39, 35,45, 45)
setCombatCondition(outCombat, condition)
-- exevo san
local sanCombat = createCombatObject()
setCombatParam(sanCombat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(sanCombat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatParam(sanCombat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SMALLHOLY)
function onGetDmg1(cid, level, maglevel)
return -60, -200
end
setCombatCallback(sanCombat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetDmg1")
-- SD
local sdCombat = createCombatObject()
setCombatParam(sdCombat, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatParam(sdCombat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(sdCombat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
function onGetDmg2(cid, level, maglevel)
return 250, 500
end
setCombatCallback(sdCombat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetDmg2")
function onCastSpell(cid, var)
if(isCreature(variantToNumber(var)) == TRUE) then
if(getCreatureCondition(cid, CONDITION_OUTFIT) == 0) then -- random outfit
doCombat(0, outCombat, numberToVariant(cid))
end
if(getCreatureHealth(cid) < 500 and getCreatureCondition(cid, CONDITION_HASTE) == 0) then
doCombat(0, combatHaste, numberToVariant(cid))
doCreatureSay(cid,"utani hur",TALKTYPE_SAY)
else
if(math.random(0,99) > 80 and (getCreatureMaxHealth(cid) - getCreatureHealth(cid) > 450)) then -- 20% percent chance to heal when hp lose higher then 450
doTargetCombatHealth(0, cid, COMBAT_HEALING, 600, 800, CONST_ME_MAGIC_BLUE)
doCreatureSay(cid,"exura san",TALKTYPE_SAY)
elseif(math.random(0,99) > 60 and (getCreatureMaxHealth(cid) - getCreatureHealth(cid) > 750)) then -- 40% percent chance to heal when hp lose higher then 750
doTargetCombatHealth(0, cid, COMBAT_HEALING, 600, 800, CONST_ME_MAGIC_BLUE)
doCreatureSay(cid,"exura san",TALKTYPE_SAY)
elseif(math.random(0,99) > 20 and (getCreatureMaxHealth(cid) - getCreatureHealth(cid) > 950)) then -- 80% percent chance to heal when hp lose higher then 950
doTargetCombatHealth(0, cid, COMBAT_HEALING, 600, 800, CONST_ME_MAGIC_BLUE)
doCreatureSay(cid,"exura san",TALKTYPE_SAY)
elseif(getCreatureMaxHealth(cid) - getCreatureHealth(cid) > 300) then -- 100% to drink great spirit potion if hp lose higher then 100
doTargetCombatHealth(0, cid, COMBAT_HEALING, 200, 400, CONST_ME_MAGIC_BLUE)
doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
end
end
if(math.random(0,99) > 60) then -- 40% to shot sd
doCombat(cid, sdCombat, var)
doTargetCombatHealth(cid, variantToNumber(var), COMBAT_DEATHDAMAGE, -250, -500, CONST_ME_NONE)
elseif(math.random(0,99) > 30) then -- 70% to shot exori san
doCombat(cid, sanCombat, var)
doTargetCombatHealth(cid, variantToNumber(var), COMBAT_HOLYDAMAGE, -60, -200, CONST_ME_NONE)
doCreatureSay(cid,"exori san",TALKTYPE_SAY)
end
end
end
Last edited: