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

[RESOLVED]Problem Shawak Annhilator.

Morrison

Intermediate OT User
Joined
Mar 15, 2009
Messages
266
Solutions
3
Reaction score
119
Location
Exive me
GitHub
none
Hi
I use Tfs 0.3.6
A send this error.
Code:
[23/07/2010 21:12:29] [Error - Action Interface] 
[23/07/2010 21:12:29] data/actions/scripts/quests/annihilator.lua:onUse
[23/07/2010 21:12:29] Description: 
[23/07/2010 21:12:29] (luaGetThingFromPos) Tile not found

Script:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

        -- Annihaltor

        local room = {     -- Sala de los demons
        fromX = 215,
        fromY = 619,
        fromZ = 13,
        toX = 221,
        toY = 655,
        toZ = 13
        }

        local monster_pos = {        
        [1] = {pos = {216,650,13}},
        [2] = {pos = {218,650,13}},
        [3] = {pos = {217,654,13}},
        [4] = {pos = {219,654,13}},
        [5] = {pos = {220,652,13}},
        [6] = {pos = {221,652,13}}
        }

        local players_pos = {
        {x = 247,y = 659,z = 13,stackpos = 253},
        {x = 247,y = 660,z = 13,stackpos = 253},
        {x = 247,y = 661,z = 13,stackpos = 253},
        {x = 247,y = 662,z = 13,stackpos = 253}
        }

        local new_player_pos = {
        {x = 216, y = 652, z = 13},
        {x = 217, y = 652, z = 13},
        {x = 218, y = 652, z = 13},
        {x = 219, y = 652, z = 13}
        }

        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[i] = getThingfromPos(players_pos[i])
                                if player[i].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[i], CONST_ME_POFF)
                                doTeleportThing(player[i].uid, new_player_pos[i], FALSE)
                                doSendMagicEffect(new_player_pos[i], 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
 
Last edited:
just use this anni

Code:
local playerPosition =
{
{x = 484, y = 732, z = 7, stackpos = STACKPOS_TOP_CREATURE},
{x = 483, y = 732, z = 7, stackpos = STACKPOS_TOP_CREATURE},
{x = 482, y = 732, z = 7, stackpos = STACKPOS_TOP_CREATURE},
{x = 481, y = 732, z = 7, stackpos = STACKPOS_TOP_CREATURE}
}

local newPosition =
{
{x = 478, y = 760, z = 7},
{x = 477, y = 760, z = 7},
{x = 476, y = 760, z = 7},
{x = 475, y = 760, z = 7}
}

-- Do not modify the declaration lines below.
local player = {0, 0, 0, 0}
local failed = FALSE

function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 1945 then
for i = 1, 4 do
failed = TRUE
player[i] = getThingfromPos(playerPosition[i])
if player[i].itemid > 0 then
if isPlayer(player[i].uid) == TRUE then
if getPlayerStorageValue(player[i].uid, 5000) == -1 then
if getPlayerLevel(player[i].uid) >= 1000 then
failed = FALSE
end
end
end
end

if failed == TRUE then
doPlayerSendCancel(cid, "Sorry, not possible.")
return TRUE
end
end
for i = 1, 4 do
doSendMagicEffect(playerPosition[i], CONST_ME_POFF)
doTeleportThing(player[i].uid, newPosition[i], FALSE)
doSendMagicEffect(newPosition[i], CONST_ME_ENERGYAREA)
end
doTransformItem(item.uid, item.itemid + 1)
elseif item.itemid == 1946 then
doPlayerSendCancel(cid, "Sorry, not possible.")
end

return TRUE
end

REP++ me if i helped you and i give it back! :ninja:
 
I fixed :D
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

        -- Annihaltor

        local room = {     -- Sala de los demons
        fromX = 215,
        fromY = 619,
        fromZ = 13,
        toX = 221,
        toY = 655,
        toZ = 13
        }

        local monster_pos = {        
        [1] = {pos = {216,650,13}},
        [2] = {pos = {218,650,13}},
        [3] = {pos = {217,654,13}},
        [4] = {pos = {219,654,13}},
        [5] = {pos = {220,652,13}},
        [6] = {pos = {221,652,13}}
        }

        local players_pos = {
        {x = 247,y = 659,z = 13,stackpos = 253},
        {x = 247,y = 660,z = 13,stackpos = 253},
        {x = 247,y = 661,z = 13,stackpos = 253},
        {x = 247,y = 662,z = 13,stackpos = 253}
        }

        local new_player_pos = {
        {x = 216, y = 652, z = 13},
        {x = 217, y = 652, z = 13},
        {x = 218, y = 652, z = 13},
        {x = 219, y = 652, z = 13}
        }

        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[i] = getThingfromPos(players_pos[i])
                                if player[i].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[i], CONST_ME_POFF)
                                doTeleportThing(player[i].uid, new_player_pos[i], FALSE)
                                doSendMagicEffect(new_player_pos[i], CONST_ME_ENERGYAREA)
                                all_ready = 0
                        end
                        doTransformItem(item.uid,1946)
                end
        elseif item.itemid == 1946 then
                if player1.itemid > 0 and player2.itemid > 0 and player3.itemid > 0 and player4.itemid > 0 then
                        for i = 1, 4 do
                                player[i] = getThingfromPos(players_pos[i])
                                if player[i].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[i], CONST_ME_POFF)
                                doTeleportThing(player[i].uid, new_player_pos[i], FALSE)
                                doSendMagicEffect(new_player_pos[i], CONST_ME_ENERGYAREA)
                                all_ready = 0
                        end
                        doTransformItem(item.uid,1945)
                end
                end
        return TRUE
end
 
Back
Top