• 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 POI door few storages

therrax

Member
Joined
Jul 12, 2012
Messages
262
Solutions
1
Reaction score
11
This is script for poi door with few storages. Why is not working and how to fix :/
TFS 1.0
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if item.uid == 10281 then
        if(isInArray({getPlayerStorageValue(cid, 10274), getPlayerStorageValue(cid, 10275), getPlayerStorageValue(cid, 10276), getPlayerStorageValue(cid, 10277), getPlayerStorageValue(cid, 10278), getPlayerStorageValue(cid, 10279), getPlayerStorageValue(cid, 10280)}, -1) == TRUE) then
              doPlayerSendTextMessage(cid, 22, "The door seems to be sealed against unwanted intruders.")
        else
            doPlayerSendTextMessage(cid, 22, "You've absorbed enough energy! You may pass.")
            doTransformItem(item.uid, item.itemid + 1)
            doTeleportThing(cid, toPosition, TRUE)
        end
        return TRUE
    end
    return FALSE
end

And in action.xml
Code:
<action uniqueid="10281" value="quests/poi/storagedoor.lua" />
 
Code:
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "The door seems to be sealed against unwanted intruders.")
Code:
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You've absorbed enough energy! You may pass.")
If you still have errors, post them.
 
Did you added uniqueid 10281 in the door and how did you added it in actions.xml?
Do you get errors in your console?
 
How to change this script to work on tfs 1.0?
Code:
local pozycje = {
{pos = {x=1244, y=812, z=7}, tekst = "Quests"},
{pos = {x=1238, y=806, z=7}, tekst = "Temple"} }
        function onThink(interval, lastExecution)
            local kolor = TEXTCOLOR_TEAL   -- Jakim kolorem jest dany napis
            for i=1, #pozycje do
                doSendMagicEffect(pozycje[i].pos,29)
                doSendMagicEffect(pozycje[i].pos,11)
                doSendMagicEffect(pozycje[i].pos,37)
                doSendAnimatedText(pozycje[i].pos,pozycje[i].tekst,kolor)
            end
            return true
            end
 
Back
Top