Indenpedens
Banned User
ergo go to data\actions\scripts and create file annihilator.lua and paste:
in actions.xml
now rewards
in data\actions\scripts create annichest.lua and paste this:
in actions.xml:
door 5108 id
on the map set unique ids in chests and lever
features: automatically closing doors, auto spawn demons, all positions are set like rl tibia, only 4 players with 100 level can do this quest(no summoned monsters)
Code:
local from={x=33218, y=31656, z=13}
local to={x=33225, y=31661, z=13}
local summon={
{x=33224, y=31659, z=13},
{x=33223, y=31659, z=13},
{x=33222, y=31661, z=13},
{x=33220, y=31661, z=13},
{x=33221, y=31657, z=13},
{x=33219, y=31657, z=13}
}
local playerA={
{x=33222, y=31671, z=13},
{x=33223, y=31671, z=13},
{x=33224, y=31671, z=13},
{x=33225, y=31671, z=13}
}
local playerB={
{x=33219, y=31659, z=13},
{x=33220, y=31659, z=13},
{x=33221, y=31659, z=13},
{x=33222, y=31659, z=13}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local t = {}
if item.itemid == 1945 then
for i = 1, 4 do
t[i]=getTopCreature(playerA[i]).uid
if t[i] == 0 or not isPlayer(t[i]) then
return doPlayerSendCancel(cid, 'You need 4 players for this quest.')
elseif getPlayerLevel(t[i]) < 100 then
return doPlayerSendCancel(cid, 'All players need to have level 100 or higher.')
end
end
for i = 1, 6 do
doCreateMonster('Demon', summon[i])
end
for i=1, 4 do
doTeleportThing(t[i], playerB[i])
doSendMagicEffect(playerA[i], CONST_ME_POFF)
doSendMagicEffect(playerB[i], CONST_ME_ENERGYAREA)
end
local v = getTileItemById({x=33225, y=31659, z=13}, 5109).uid
if v ~= 0 then
doTransformItem(v, 5108)
end
else
for x = from.x, to.x do
for y = from.y, to.y do
local v = getTopCreature({x=x, y=y, z=from.z}).uid
if v ~= 0 then
if isPlayer(v) then
return doPlayerSendCancel(cid, 'There is already a team in the quest room.')
elseif isMonster(v) then
table.insert(t, v)
end
end
end
end
for i = 1, #t do
doRemoveCreature(t[i])
end
end
return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
end
Code:
<action uniqueid="5000" event="script" value="annihilator.lua"/>
now rewards
in data\actions\scripts create annichest.lua and paste this:
Code:
-- annihilator chests
function onUse(cid, item, frompos, item2, topos)
if item.uid == 8000 then
queststatus = getPlayerStorageValue(cid,37013)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have found a demon armor.")
doPlayerAddItem(cid,2494,1)
setPlayerStorageValue(cid,37013,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "The chest is empty.")
end
elseif item.uid == 8001 then
queststatus = getPlayerStorageValue(cid,37013)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have found a magic sword.")
doPlayerAddItem(cid,2400,1)
setPlayerStorageValue(cid,37013,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "The chest is empty.")
end
elseif item.uid == 8002 then
queststatus = getPlayerStorageValue(cid,37013)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have found a stonecutter axe.")
doPlayerAddItem(cid,2431,1)
setPlayerStorageValue(cid,37013,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "The chest is empty.")
end
elseif item.uid == 8003 then
queststatus = getPlayerStorageValue(cid,37013)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have found a present box.")
box = doPlayerAddItem(cid,1990,1)
doAddContainerItem(box, 2326, 1)
setPlayerStorageValue(cid,37013,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "The chest is empty.")
end
else
return 0
end
return 1
end
Code:
<action uniqueid="8000" script="annichest.lua" />
<action uniqueid="8001" script="annichest.lua" />
<action uniqueid="8002" script="annichest.lua" />
<action uniqueid="8003" script="annichest.lua" />
door 5108 id

on the map set unique ids in chests and lever

features: automatically closing doors, auto spawn demons, all positions are set like rl tibia, only 4 players with 100 level can do this quest(no summoned monsters)
Last edited: