• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Pythius the Rotten does not Spawn!

Ray Rewind

Doctor
Joined
Jun 6, 2009
Messages
1,348
Reaction score
76
Location
Germany
This is creaturescript

PHP:
local config = {teleportId = 1387,
bosse = "Pythius The Rotten"}

local portal_in_pos = {x = 395, y = 686, z = 7}

function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "PythiusDead")
if config.bosse == getCreatureName(cid) then   
local position = portal_in_pos   
teleport = doCreateItem(config.teleportId,1,position)
doItemSetAttribute(teleport, "aid", 9021)
end
return TRUE
end




this in movements

PHP:
function onStepIn(cid, item, pos)

local tam = {x = 393, y = 686, z = 7}

    if item.actionid == 9021 then
        doTeleportThing(cid,tam)
        doSendMagicEffect(getCreaturePosition(cid),17)
        local tp = doRemoveItem(item.uid, 1387)
        end
    return 1
end


PHP:
function onStepIn(cid, item, position, fromPosition)

--Config-->
local starting = {x = 384, y = 687, z = 7, stackpos = 253}
local ending = {x = 375, y = 657, z = 7, stackpos = 253}
local checking = {x = starting.x, y = starting.y, z = starting.z, stackpos = starting.stackpos}
local portal_in_pos = {x = 374, y = 660, z = 7, stackpos = 1}
local portal_iten_pos = getThingfromPos(portal_in_pos)
local teleportId = 1387
local player_pos_entrada = {x = 402, y = 686, z = 7}
local player_pos_saida = {x = 375, y = 657, z = 7}
local boss_pos = {x = 392, y = 685, z = 7}
local boss = "Pythius The Rotten"
local queststatus = getPlayerStorageValue(cid, 53090) --ValueID DA QUEST QUANDO VOCE JA PEGO O ITEM
--EndConfig-->

--Do not touch this--
if getPlayerLookDir(cid) == 0 then
newdir = 2
elseif getPlayerLookDir(cid) == 1 then
newdir = 3
elseif getPlayerLookDir(cid) == 2 then
newdir = 0
else
newdir = 1
end

if item.actionid == 9022 then
doTeleportThing(cid, player_pos_saida)
doSendMagicEffect(player_pos_saida, 10)
doCreateItem(portal_iten_pos.uid, 1)
return TRUE
end

if item.actionid == 9021 and queststatus == -1 then
players = 0
totalmonsters = 0
monster = {}
repeat
creature = getThingfromPos(checking)
if creature.itemid > 0 then

if getPlayerAccess(creature.uid) == 0 then
players = players + 1
end

if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 3 then
totalmonsters = totalmonsters + 1
monster[totalmonsters] = creature.uid
end
end
checking.x = checking.x + 1

if checking.x > ending.x then
checking.x = starting.x
checking.y = checking.y + 1
end

until checking.y > ending.y

if players == 0 then

if totalmonsters ~= 0 then
current = 0
repeat
current = current + 1
doRemoveCreature(monster[current])
until current >= totalmonsters   
end

doTeleportThing(cid, player_pos_entrada)
doSendMagicEffect(player_pos_entrada, 10)
doCreateMonster(boss, boss_pos)

if portal_iten_pos.itemid == teleportId then
doRemoveItem(portal_iten_pos.uid, 1)
end

else
doMoveCreature(cid, newdir)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'is in the room now. Wait a moment!')
end
else
doMoveCreature(cid, newdir)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Sorry you already did this quest!')
end
end

Pythius doesn't spawn! :/
 
If there no errors, double check the names in /data/monsters and if they are equal to the one in the script. Can you spawn Pythius with /m?
 
Yes this is possible :/


PHP:
<?xml version="1.0" encoding="utf-8"?>
<monster name="Pythius The Rotten" namedescription="a pythius the rotten" race="undead" experience="100" speed="300" manacost="0">
<health now="8350" max="8350"/>
<look type="231" corpse="6306"/>
<targetchange interval="5000" chance="8"/>
<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 canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="0"/>
</flags>
<script>
<event name="PythiusDead"/>
</script>
<attacks>
<attack name="melee" interval="2000" skill="95" attack="95"/>

<attack name="fire" interval="2000" chance="20" range="7" radius="4" target="1" min="-300" max="-395">
<attribute key="shooteffect" value="fire"/>
<attribute key="areaeffect" value="redspark"/>
</attack>

<attack name="death" interval="3000" chance="20" range="7" min="-0" max="-600">
<attribute key="shooteffect" value="suddendeath"/>
</attack>

<attack name="poison" interval="2000" chance="20" range="7" radius="4" target="1" min="-120" max="-390">
<attribute key="shooteffect" value="poison"/>
<attribute key="areaeffect" value="poison"/>
</attack>

<attack name="poison" interval="1000" chance="10" range="7" min="-50" max="-180">
<attribute key="shooteffect" value="poison"/>
<attribute key="areaeffect" value="poison"/>
</attack>

<attack name="fire" interval="4000" chance="25" length="8" spread="3" min="-500" max="-600">
<attribute key="areaeffect" value="firearea"/>
</attack>

<attack name="poison" interval="2000" chance="23" length="8" spread="3" min="-200" max="-685">
<attribute key="areaeffect" value="poison"/>
</attack>

<attack name="lifedrain" interval="3000" chance="25" length="8" spread="3" min="-300" max="-600">
<attribute key="areaeffect" value="greenshimmer"/>
</attack>

</attacks>
<defenses armor="35" defense="30">
</defenses>
<elements>
<element physicalpercent="10"/>
<element icepercent="10"/>
<element holypercent="-10"/>
</elements>
<immunities>
<immunity death="1"/>
<immunity earth="1"/>
<immunity fire="1"/>
<immunity drown="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity invisible="1"/>
</immunities>
<summons maxsummons="2">
<summon name="undead gladiator" interval="1000" chance="8"/>
</summons>
<voices interval="5000" chance="10">
<voice sentence="you'll never get my treasure!"/>

</voices>

</monster>
 
Also make sure all the positions are right. Did you register the creatureevent?
Code:
registerCreatureEvent(cid, "PythiusDead")
try to remove this line from the script and register it manually instead in login.lua
 
Back
Top