
Nie tylko o Tibii i OTS...

Boss, którego umieszczam ma następujące zdolności:
- Teleportowanie się do losowej ofiary, o ile nie atakuje krytycznym ciosem.
- Atakowanie magicznym bluszczem. Podczas, gdy na potworze pojawia się bluszcz, jest to znak, że trzeba uciekać, gdyż po chwili pojawiają się naokoło niego, w odstępie dwóch kratek w każdą stronę, magiczne iskry. Ten, kto znajdzie się na ich polu, ginie na miejscu niezależnie od swojego poziomu.
- Atakowanie pociskiem. Potwór strzela w gracza pocisk, który zachowuje się identycznie, jak powyżej, lecz zasięg sprowadza się do tej samej kratki, na którą strzelił. Gracz musi odskoczyć ze swojego miejsca, bo zginie, jeśli pozostanie.
- Niszczenie magic walli.
A więc tak, w monsters.xml dodajemy:
<monster name="Powolniak" file="powolniak.xml"/>
Folderze z potworami tworzymy wyżej wymieniony pliczek, a do środka dodajemy:
<?xml version="1.0" encoding="ISO-8859-1"?>
<monster name="POWOLNIAK" nameDescription="Powolniak" race="undead" experience="5500" speed="120" manacost="0">
<health now="100000" max="100000"/>
<look type="234" corpse="6331"/>
<targetchange interval="1000" chance="100"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="1"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag staticattack="50"/>
<flag lightlevel="0"/>
<flag lightcolor="0"/>
<flag targetdistance="1"/>
<flag runonhealth="2000"/>
</flags>
<script>
<event name="Powolniak"/>
</script>
<attacks>
<attack name="melee" interval="2000" min="-860" max="-2280"/>
<attack name="lifedrain" interval="1000" chance="30" range="1" min="-250" max="-660">
<attribute key="areaEffect" value="redspark"/>
</attack>
<attack name="manadrain" interval="1000" chance="20" radius="5" target="0" min="-250" max="-550">
<attribute key="areaEffect" value="poison"/>
</attack>
<attack name="energy" interval="1000" chance="15" length="5" spread="0" min="-500" max="-850">
<attribute key="areaEffect" value="energy"/>
</attack>
<attack name="poison" interval="2000" chance="40" radius="3" target="1" min="-550" max="-1250">
<attribute key="areaEffect" value="poison"/>
</attack>
</attacks>
<defenses armor="64" defense="72">
<defense name="speed" interval="1000" chance="10" speedchange="130" duration="5000">
<attribute key="areaEffect" value="redshimmer"/>
</defense>
<defense name="healing" interval="1000" chance="25" min="1500" max="2500">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
</defenses>
<immunities>
<immunity physical="0"/>
<immunity energy="1"/>
<immunity fire="1"/>
<immunity poison="1"/>
<immunity lifedrain="0"/>
<immunity paralyze="0"/>
<immunity outfit="0"/>
<immunity drunk="0"/>
<immunity invisible="1"/>
</immunities>
<loot>
<item id="1976" text="fajna książeczka" chance="100000"/>
</loot>
</monster>Następnie w creaturescripts.xml dodajemy taką linijkę:
<event type="think" name="Powolniak" event="script" value="powolniak.lua"/>
Po czym dalej tworzymy taki pliczek, a zawartość jego jest taka:
function onThink(cid)
if atakuje == nil then
atakuje = false
end
function zabijansko1(params)
local cid = params.cid
if isCreature(cid) then
doCreatureSay(cid, "GrimOTS!", TALKTYPE_ORANGE_1)
atakuje = false
for nx = (getCreaturePosition(cid).x - 2), (getCreaturePosition(cid).x + 2) do
for ny = (getCreaturePosition(cid).y - 2), (getCreaturePosition(cid).y + 2) do
doSendMagicEffect( { x = nx, y = ny, z = getCreaturePosition(cid).z }, CONST_ME_YELLOWENERGY)
local creatureFound = getThingFromPos( { x = nx, y = ny, z = getCreaturePosition(cid).z, stackpos = 253 })
if isCreature(creatureFound.uid) and creatureFound.uid ~= cid then
doCreatureAddHealth(cid, getCreatureHealth(creatureFound.uid))
doCreatureAddHealth(creatureFound.uid, -getCreatureHealth(creatureFound.uid))
end
end
end
end
end
function zabijansko2(params)
local cid = params.cid
local loc = params.loc
if isCreature(cid) then
doSendMagicEffect( loc, CONST_ME_YELLOWENERGY)
local creatureFound = getThingFromPos( loc )
if isCreature(creatureFound.uid) and creatureFound.uid ~= cid then
doCreatureAddHealth(creatureFound.uid, -getCreatureHealth(creatureFound.uid))
end
end
end
function efektyy(params)
local cid = params.cid
if isCreature(cid) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_SMALLPLANTS)
end
end
if 1 == math.random(1, 35) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_SMALLPLANTS)
addEvent(zabijansko1, 3000, { cid = cid } )
for v = 1, 5 do
addEvent(efektyy, 500 * v, { cid = cid } )
end
atakuje = true
doCreatureSay(cid, "GIŃCIE OD TEGO ATAKU, SZCZURY!!!", TALKTYPE_ORANGE_1)
end
if 1 == math.random(1, 25) then
for nx = (getCreaturePosition(cid).x - 1), (getCreaturePosition(cid).x + 1) do
for ny = (getCreaturePosition(cid).y - 1), (getCreaturePosition(cid).y + 1) do
local fieldFound = getThingFromPos( { x = nx, y = ny, z = getCreaturePosition(cid).z, stackpos = 254 })
if fieldFound.itemid == 1498 then
doSendMagicEffect(getThingPos(fieldFound.uid), CONST_ME_STUN)
doRemoveItem(fieldFound.uid)
end
end
end
end
if 1 == math.random(1, 50) then
for nx = (getCreaturePosition(cid).x - 5), (getCreaturePosition(cid).x + 5) do
for ny = (getCreaturePosition(cid).y - 5), (getCreaturePosition(cid).y + 5) do
local creatureFound = getThingFromPos( { x = nx, y = ny, z = getCreaturePosition(cid).z, stackpos = 253 })
if isPlayer(creatureFound.uid) and creatureFound.uid ~= cid then
if 1 == math.random(1, 5) then
if atakuje == false then
doTeleportThing(cid, getThingPos(creatureFound.uid))
end
end
end
end
end
end
if 1 == math.random(1, 10) then
for nx = (getCreaturePosition(cid).x - 5), (getCreaturePosition(cid).x + 5) do
for ny = (getCreaturePosition(cid).y - 5), (getCreaturePosition(cid).y + 5) do
local creatureFound = getThingFromPos( { x = nx, y = ny, z = getCreaturePosition(cid).z, stackpos = 253 })
if isPlayer(creatureFound.uid) and creatureFound.uid ~= cid then
if 1 == math.random(1, 5) then
local efekt = 50
doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(creatureFound.uid), efekt)
local pos = getThingPos(creatureFound.uid)
doSendMagicEffect(pos, CONST_ME_SMALLPLANTS)
for n = 1, 5 do
addEvent(function()
doSendMagicEffect(pos, CONST_ME_SMALLPLANTS)
end, n*250)
end
addEvent(zabijansko2, 3000, { cid = cid, loc = getCreaturePosition(creatureFound.uid) } )
end
end
end
end
end
return TRUE
endJa posłużyłem się funkcją onThink, która uruchamia się cyklicznie każdej kreaturze w mniej, niż sekundę, więc można dzięki niej zdziałać dużo - można przykładowo zrobić bossa, którego summony regenerują, który co jakiś czas atakuje jakimiś szpikulcami, zsyła meteoryty, zakopuje się, albo przy 30% życia leczy się, zmienia sobie outfit, znika, czy przesuwa graczy - opcji są miliardy, po listę funkcji odsyłam chociażby tu:
http://otland.net/f55/lua-functions-list-14039/
Offline

Heh no spoko boss ale ja sobie zmiennie Nazwę tego Bossa na Elitarny Machete
Offline