• 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 4 Anni dont works. Script dont work.

Blysco

New Member
Joined
Oct 12, 2013
Messages
163
Reaction score
2
TFS 0.3.7_SVN Crying Damson 9.8.3 Tibia Version.
I get no Errors but it wont work...
When i use the Leaver nothing happening.
Please help me.

actions.xml
Code:
    <action uniqueid="11020" script="4ani/4_ani.lua"/>

4_ani.lua
Code:
local config = {
    daily = "no", -- allow only one enter per day? (like in global Tibia)
    level = 100,
    storage = 11020
}

local playerPosition =
{
    {x = 32392, y = 32191, z = 7, stackpos = STACKPOS_TOP_CREATURE},
    {x = 32392, y = 32192, z = 7, stackpos = STACKPOS_TOP_CREATURE},
    {x = 32392, y = 32193, z = 7, stackpos = STACKPOS_TOP_CREATURE},
    {x = 32392, y = 32194, z = 7, stackpos = STACKPOS_TOP_CREATURE}
}
local newPosition =
{
    {x = 32259, y = 32154, z = 15},
    {x = 32258, y = 32154, z = 15},
    {x = 32258, y = 32153, z = 15},
    {x = 32259, y = 32153, z = 15}
}
local demonPosition =
{
    {x = 32263, y = 32161, z = 15},
    {x = 32270, y = 32161, z = 15},
    {x = 32269, y = 32169, z = 15},
    {x = 32268, y = 32177, z = 15},
    {x = 32287, y = 32177, z = 15},
    {x = 32287, y = 32168, z = 15},
    {x = 32287, y = 32161, z = 15},
    {x = 32298, y = 32162, z = 15}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local player = {0, 0, 0, 0}
    local failed = TRUE
    local count = 0
    item.new = 1946
    if(item.itemid == 1945) then
        if(os.time(t) >= (getGlobalStorageValue(10020) + (1000)) then
            for i = 1, 4 do
                player[i] = getThingfromPos(playerPosition[i])
                if(player[i].itemid > 0) then
                    if(isPlayer(player[i].uid) == TRUE) then
                        if(getPlayerStorageValue(player[i].uid, 9000) < 1) then
                            if(getPlayerLevel(player[i].uid) >= 100 or getPlayerAccess(player[i].uid) >= 3) then
                                failed = FALSE
                                count = count + 1
                            end
                        end
                    end
                end
                if(failed == TRUE) then
                    doTransformItem(item.uid, 1946)
                    return TRUE
                end
            end
            if(count == 4) then
                for i = 1, 6 do
                    doSummonCreature("Demon", demonPosition[i])
                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)
                    setPlayerStorageValue(player[i].uid, 9000, 1)
                end
                setGlobalStorageValue(9000, os.time(t))
            end
        end
    else
        item.new = 1945
    end
    doTransformItem(item.uid, item.new)
    return TRUE
end
 
Back
Top