~~MONSTERS~~
Go to data/monsters and make file Unhurried Acarid.xml and paste:
Into monsters.xml paste:
~~CREATURESCRIPTS~~
Now go to data/creaturescripts/scripts and make file Unhurried Acarid.lua and paste:
Into login.lua before return true paste:
Into creaturescripts.xml paste:
Have Fun.
Go to data/monsters and make file Unhurried Acarid.xml and paste:
PHP:
<?xml version="1.0" encoding="ISO-8859-1"?>
<monster name="Unhurried Acarid" nameDescription="unhurried acarid" race="venom" experience="22500" speed="100" manacost="0">
<health now="55000" max="55000"/>
<look type="238" corpse="6532"/>
<targetchange interval="1166" chance="10"/>
<strategy attack="100" defense="0"/>
<flags>
<flag attackable="1"/>
<flag hostile="1"/>
<flag convinceable="1"/>
<flag canpushitems="1"/>
<flag canpushcreatures="1"/>
<flag staticattack="90"/>
<flag targetdistance="1"/>
<flag runonhealth="1000"/>
</flags>
<script>
<event name="Unhurried Acarid"/>
</script>
<attacks>
<attack name="melee" interval="2000" skill="150" attack="100" poison="-320"/>
<attack name="poison" interval="986" chance="10" range="1" min="-265" max="-313">
<attribute key="areaEffect" value="plantattack"/>
</attack>
<attack name="manadrain" interval="1053" chance="12" radius="4" target="0" min="-453" max="-855">
<attribute key="areaEffect" value="poison"/>
</attack>
<attack name="earth" interval="1002" chance="11" length="3" spread="0" min="-764" max="-1142">
<attribute key="areaEffect" value="carniphila"/>
</attack>
<attack name="poison" interval="1110" chance="12" radius="3" target="1" min="-324" max="-412">
<attribute key="areaEffect" value="poison"/>
<attribute key="shootEffect" value="poison"/>
</attack>
<attack name="poisoncondition" interval="1193" chance="12" radius="3" target="0" min="-560" max="-600">
<attribute key="areaEffect" value="greenbubble"/>
</attack>
<attack name="earth" interval="901" chance="13" target="1" min="-188" max="-222">
<attribute key="areaEffect" value="carniphila"/>
<attribute key="shootEffect" value="earth"/>
</attack>
</attacks>
<defenses armor="35" defense="40">
<defense name="speed" interval="953" chance="13" speedchange="315" duration="4000">
<attribute key="areaEffect" value="poff"/>
</defense>
<defense name="healing" interval="1010" chance="13" min="164" max="202">
<attribute key="areaEffect" value="greenspark"/>
</defense>
<defense name="healing" interval="987" chance="11" min="76" max="99">
<attribute key="areaEffect" value="greenspark"/>
</defense>
</defenses>
<elements>
<element energyPercent="10"/>
<element icePercent="20"/>
<element deathPercent="25"/>
<element holyPercent="40"/>
<element firePercent="-10"/>
</elements>
<immunities>
<immunity earth="1"/>
<immunity drunk="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity invisible="1"/>
</immunities>
<voices interval="5000" chance="10">
<voice sentence="Blubb"/>
</voices>
<summons maxSummons="2">
<summon name="slime" interval="1953" chance="25" max="2"/>
<summon name="defiler" interval="1953" chance="11" max="1"/>
</summons>
<loot>
<item id="2148" countmax="46" chance="43140"/> --copper coin
<item id="2148" countmax="33" chance="43140"/> --copper coin
<item id="2152" chance="12730"/> --silver coin
<item id="2155" chance="3140"/> --green gem
<item id="2475" chance="5840"/> --warrior helmet
<item id="2490;2409" chance="8250"/> --dark helmet,serpent sword
<item id="7885" chance="2010"/> --terra legs
<item id="2466" chance="1050"/> --golden armor
<item id="8880" chance="780"/> --swamplair armor
<item id="7886" chance="6530"/> --terra boots
<item id="7590" countmax="3" chance="12580"/> --GMP
<item id="2509" chance="23210"/> --steel shield
<item id="2515" chance="14530"/> --guardian shield
<item id="7405" chance="730"/> --havoc blade
<item id="2381" chance="10210"/> --halberd
<item id="2440" chance="6530"/> --daramanian waraxe
<item id="8849;8857" chance="3540"/> --modified crossbow,silkweaver bow
</loot>
</monster>
PHP:
<monster name="Unhurried Acarid" file="unhurried acarid.xml"/>
~~CREATURESCRIPTS~~
Now go to data/creaturescripts/scripts and make file Unhurried Acarid.lua and paste:
PHP:
local condition = createConditionObject(CONDITION_HASTE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 2500)
setConditionFormula(condition, -0.75, 0, -0.80, 0)
local haste = createConditionObject(CONDITION_HASTE)
setConditionParam(haste, CONDITION_PARAM_TICKS, math.random(1000,5000))
setConditionFormula(haste, 2.00, 50, 4.00, 100)
local invisible = createConditionObject(CONDITION_INVISIBLE)
setConditionParam(invisible, CONDITION_PARAM_TICKS, math.random(1000,5000))
local pos = getCreaturePosition
local fields = {
[1] = {item_id = {1497,1499}, effect = CONST_ME_TELEPORT},
[2] = {item_id = {1492,1493,1494}, effect = CONST_ME_MAGIC_RED},
[3] = {item_id = {1495}, effect = CONST_ME_MAGIC_BLUE},
[4] = {item_id = {1496}, effect = CONST_ME_MAGIC_GREEN},
[5] = {item_id = {967}, effect = CONST_ME_MAGIC_RED},
[6] = {item_id = {11779}, effect = CONST_ME_ASSASSIN}
}
local function zabijansko2(p)
local cid = p.cid
local loc = p.loc
doSendMagicEffect(loc, CONST_ME_SMALLPLANTS)
local creatureFound = getThingFromPos(loc)
if isCreature(creatureFound.uid) and creatureFound.uid ~= cid and getCreatureMaster(creatureFound.uid) ~= cid and getCreatureName(creatureFound.uid) ~= "slime" then
local hp = getCreatureHealth(creatureFound.uid)
doCreatureAddHealth(cid, hp)
doSendAnimatedText(pos(cid), hp, COLOR_LIGHTGREEN)
doTargetCombatHealth(cid, creatureFound.uid, COMBAT_EARTHDAMAGE, -hp, -hp, CONST_ME_CANIPHILA)
end
end
local function efekty(p)
local cid = p.cid
local loc = p.loc
if isCreature(cid) then
doSendMagicEffect(loc, CONST_ME_HITBYPOISON)
doSendMagicEffect(loc, CONST_ME_GREEN_RINGS)
if p.s < 6 then
addEvent(efekty, 250, p)
p.s = p.s + 1
else
addEvent(zabijansko2, 1000, {cid = cid, loc = loc} )
end
end
end
local function zabijansko(p)
local cid = p.cid
if isCreature(cid) then
for nx = (pos(cid).x - 1), (pos(cid).x + 1) do
for ny = (pos(cid).y - 1), (pos(cid).y + 1) do
doSendMagicEffect({x=nx,y=ny,z=pos(cid).z}, CONST_ME_BIGPLANTS)
doSendMagicEffect({x=nx,y=ny,z=pos(cid).z}, CONST_ME_SMALLPLANTS)
local creatureFound = getThingFromPos( { x = nx, y = ny, z = pos(cid).z, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE })
if isCreature(creatureFound.uid) and creatureFound.uid ~= cid and getCreatureMaster(creatureFound.uid) ~= cid and isInArray({"slime", "defiler"}, getCreatureName(creatureFound.uid)) == false then
local hp = getCreatureHealth(creatureFound.uid)
doCreatureAddHealth(cid, hp)
doSendAnimatedText(pos(cid), hp, COLOR_LIGHTGREEN)
doTargetCombatHealth(cid, creatureFound.uid, COMBAT_EARTHDAMAGE, -hp, -hp, CONST_ME_SMALLPLANTS)
end
end
end
end
end
local function efekt(p)
local cid = p.cid
if isCreature(cid) then
for nx = (pos(cid).x - 1), (pos(cid).x + 1) do
for ny = (pos(cid).y - 1), (pos(cid).y + 1) do
doSendMagicEffect( { x = nx, y = ny, z = pos(cid).z }, CONST_ME_SMALLPLANTS)
if p.n < 5 then
p.n = p.n + 1
addEvent(efekt, 500, p)
end
end
end
end
end
function onThink(cid)
if isMonster(cid) then
if math.random(1, 100) <= 2 then
for nx = (pos(cid).x - 1), (pos(cid).x + 1) do
for ny = (pos(cid).y - 1), (pos(cid).y + 1) do
doSendMagicEffect( { x = nx, y = ny, z = pos(cid).z }, CONST_ME_SMALLPLANTS)
end
end
addEvent(zabijansko, 3000, {cid = cid})
addEvent(efekt, 500, {cid = cid, n = 1})
atakuje = true
end
if math.random(1, 100) <= 10 then
for nx = (pos(cid).x - 1), (pos(cid).x + 1) do
for ny = (pos(cid).y - 1), (pos(cid).y + 1) do
for i=1, 254 do
stackpos = i
local fieldFound = getThingFromPos({x = nx, y = ny, z = pos(cid).z, stackpos = stackpos})
for k=1, #fields do
if fieldFound.uid ~= 0 and isInArray(fields[k].item_id, fieldFound.itemid) then
if fieldFound.itemid == 1496 then
if math.random(1,100) <= 25 then
doCreateMonster("slime", getThingPos(fieldFound.uid), false)
doSendMagicEffect(getThingPos(fieldFound.uid), CONST_ME_GREEN_RINGS)
else
doSendMagicEffect(getThingPos(fieldFound.uid), fields[k].effect)
end
else
doSendMagicEffect(getThingPos(fieldFound.uid), fields[k].effect)
end
doRemoveItem(fieldFound.uid)
end
end
end
end
end
end
if math.random(1, 100) <= 8 then
if getCreatureHealth(cid) >= 1000 then
for nx = (pos(cid).x - 5), (pos(cid).x + 5) do
for ny = (pos(cid).y - 5), (pos(cid).y + 5) do
local creatureFound = getThingFromPos( { x = nx, y = ny, z = pos(cid).z, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE })
if isCreature(creatureFound.uid) and creatureFound.uid ~= cid and creatureFound.uid == getCreatureTarget(cid) and isSightClear(pos(cid), pos(creatureFound.uid), true) then
if math.random(1,5) <= 1 then
doTeleportThing(cid, getThingPos(creatureFound.uid))
doSendMagicEffect(getThingPos(creatureFound.uid), CONST_ME_TELEPORT)
end
end
end
end
end
end
if math.random(1, 100) <= 12 then
if getCreatureHealth(cid) <= 1000 then
if math.random(1,100) <= 25 then
doAddCondition(cid, haste)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN)
end
if math.random(1,100) <= 25 then
doAddCondition(cid, invisible)
end
if math.random(1,100) <= 25 then
for nx = (pos(cid).x - 7), (pos(cid).x + 7) do
for ny = (pos(cid).y - 7), (pos(cid).y + 7) do
local creatureFound = getThingFromPos( { x = nx, y = ny, z = pos(cid).z, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE })
if isPlayer(creatureFound.uid) and creatureFound.uid ~= cid and creatureFound.uid == getCreatureTarget(cid) and isSightClear(pos(cid), pos(creatureFound.uid), true) then
doAddCondition(creatureFound.uid, condition)
doSendMagicEffect(getThingPos(creatureFound.uid), CONST_ME_POISONAREA)
doSendDistanceShoot(getThingPos(cid), getThingPos(creatureFound.uid), CONST_ANI_POISON)
end
end
end
end
end
end
if math.random(1, 100) <= 8 then
for nx = (pos(cid).x - 5), (pos(cid).x + 5) do
for ny = (pos(cid).y - 5), (pos(cid).y + 5) do
local creatureFound = getThingFromPos( { x = nx, y = ny, z = pos(cid).z, stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE })
if isCreature(creatureFound.uid) and creatureFound.uid ~= cid and getCreatureMaster(creatureFound.uid) ~= cid then
if math.random(1, 3) == 1 then
local poss = getThingPos(creatureFound.uid)
if not(getTilePzInfo(poss) == true or getTileHouseInfo(poss) == true) then
if isCreature(creatureFound.uid) and creatureFound.uid == getCreatureTarget(cid) and isSightClear(pos(cid), pos(creatureFound.uid), true) then
doSendDistanceShoot(pos(cid), pos(creatureFound.uid), CONST_ANI_EARTH)
doSendMagicEffect(poss, CONST_ME_HITBYPOISON)
doSendMagicEffect(poss, CONST_ME_GREEN_RINGS)
doAddCondition(creatureFound.uid, condition)
addEvent(efekty, 250, {cid = cid, loc = pos(creatureFound.uid), s = 0})
end
end
end
end
end
end
end
end
return true
end
PHP:
registerCreatureEvent(cid, "Unhurried Acarid")
PHP:
<event type="think" name="Unhurried Acarid" event="script" value="Unhurried Acarid.lua"/>
Have Fun.