• 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!

I need Annihilator Lua script

losmeter

New Member
Joined
Dec 10, 2008
Messages
30
Reaction score
0
Hey all. I tried all of annihi luas. but i cant fix my errors please make lua for me i can give you my positions.


{standPos = {x=1264, y=1274, z=9},
inroomPos = {x=1252, y=1228, z=9},
allowVoc = {1,2,3,4,5,6,7,8},
needLv = 100},
{standPos = {x=1265, y=1274, z=9},
inroomPos = {x=1252, y=1229, z=9},
allowVoc = {1,2,3,4,5,6,7,8},
needLv = 100},
{standPos = {x=1266, y=1274, z=9},
inroomPos = {x=1252, y=1230, z=9},
allowVoc = {1,2,3,4,5,6,7,8},
needLv = 100},
{standPos = {x=1267, y=1274, z=9},
inroomPos = {x=1252, y=1230, z=9},
allowVoc = {1,2,3,4,5,6,7,8},
needLv = 100}
 
what is the error anyway?
how can we fix it if we don't know your error? :O
Code:
local config = {
    daily = "no", -- allow only one enter per day? (like in global Tibia)
    level = 100,
    storage = 30015,
    entry =
    {
        {x = 247, y = 659, z = 13},
        {x = 247, y = 660, z = 13},
        {x = 247, y = 661, z = 13},
        {x = 247, y = 662, z = 13}
    },
    destination =
    {
        {x = 189, y = 650, z = 13},
        {x = 189, y = 651, z = 13},
        {x = 189, y = 652, z = 13},
        {x = 189, y = 653, z = 13}
    }
}
 
config.daily = getBooleanFromString(config.daily)
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(item.itemid == 1946) then
        if(config.daily) then
            doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
        else
            doTransformItem(item.uid, item.itemid - 1)
        end
 
        return true
    end
 
    if(item.itemid ~= 1945) then
        return true
    end
 
    local players = {}
    for _, position in ipairs(config.entry) do
        local pid = getTopCreature(position).uid
        if(pid == 0 or not isPlayer(pid) or getCreatureStorage(pid, config.storage) > 0 or getPlayerLevel(pid) < config.level) then
            doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
            return true
        end
 
        table.insert(players, pid)
    end
 
    for i, pid in ipairs(players) do
        doSendMagicEffect(config.entry[i], CONST_ME_POFF)
        doTeleportThing(pid, config.destination[i], false)
        doSendMagicEffect(config.destination[i], CONST_ME_ENERGYAREA)
    end
 
    doTransformItem(item.uid, item.itemid + 1)
    return true
end
 
[29/11/2013 02:23:11] [Error - Action Interface]
[29/11/2013 02:23:11] data/actions/scripts/Annihilator.lua:eek:nUse
[29/11/2013 02:23:11] Description:
[29/11/2013 02:23:11] (luaGetThingFromPos) Tile not found


here my error
-------------------------------------------------------------------------------------------------------------
here my script;
function onUse(cid, item, fromPosition, itemEx, toPosition)

-- Annihaltor by Maxi (Shawak) v1.0

local room = { -- room with demons
fromX = 1252,
fromY = 1227,
fromZ = 9,
toX = 1269,
toY = 1233,
toZ = 9
}
local players_pos = {
{x = 1264,y = 1274,z = 9,stackpos = 253},
{x = 1265,y = 1274,z = 9,stackpos = 253},
{x = 1266,y = 1274,z = 9,stackpos = 253},
{x = 1267,y = 1274,z = 9,stackpos = 253}
}

local new_player_pos = {
{x = 1252, y = 1228, z = 9},
{x = 1252, y = 1229, z = 9},
{x = 1252, y = 1230, z = 9},
{x = 1252, y = 1231, z = 9}
}

local monster = "Demon"
local questLevel = 100


-- don't touch ------------
local player = {0, 0, 0, 0}
local all_ready = 0
---------------------------

local player1 = getThingfromPos(players_pos[1])
local player2 = getThingfromPos(players_pos[2])
local player3 = getThingfromPos(players_pos[3])
local player4 = getThingfromPos(players_pos[4])

if item.itemid == 1945 then
if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
for i = 1, 4 do
player = getThingfromPos(players_pos)
if player.itemid > 0 then
all_ready = 1
end
end
else
doPlayerSendTextMessage(cid,19,"You need 4 players to do this quest.")
end
if all_ready == 1 then
for _, area in pairs(monster_pos) do
doSummonCreature(monster,{x=area.pos[1],y=area.pos[2],z=area.pos[3]})
end
for i = 1, 4 do
doSendMagicEffect(players_pos, CONST_ME_POFF)
doTeleportThing(player.uid, new_player_pos, FALSE)
doSendMagicEffect(new_player_pos, CONST_ME_ENERGYAREA)
all_ready = 0
end
doTransformItem(item.uid,1946)
end
elseif item.itemid == 1946 then
local player_room = 0
for x = room.fromX, room.toX do
for y = room.fromY, room.toY do
for z = room.fromZ, room.toZ do
local pos = {x=x, y=y, z=z,stackpos = 253}
local thing = getThingfromPos(pos)
if thing.itemid > 0 then
if isPlayer(thing.uid) == TRUE then
player_room = player_room+1
end
end
end
end
end
if player_room >= 1 then
doPlayerSendTextMessage(cid,19,"There is already a team in the quest room.")
elseif player_room == 0 then
for x = room.fromX, room.toX do
for y = room.fromY, room.toY do
for z = room.fromZ, room.toZ do
local pos = {x=x, y=y, z=z,stackpos = 253}
local thing = getThingfromPos(pos)
if thing.itemid > 0 then
doRemoveCreature(thing.uid)
end
end
end
end
player_room = 0
doTransformItem(item.uid,1945)
end
end
return TRUE
end
 
[29/11/2013 02:23:11] [Error - Action Interface]
[29/11/2013 02:23:11] data/actions/scripts/Annihilator.lua : onUse
[29/11/2013 02:23:11] Description:
[29/11/2013 02:23:11] (luaGetThingFromPos) Tile not found
 
Back
Top