• 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 Special Flask

adrenyslopez

Member
Joined
Dec 22, 2015
Messages
201
Reaction score
15
Someone help me with a revscripts (action):

That by using this item (A) "7494" in an item (B) "8753" it will transport you to this location (32369, 32241, 7) and give you this storage (51118).

ItemID (A): 7494
ItemID (B): 8753
Pos: (32369, 32241, 7)
Storage: (51118)

I use otbr tfs 1.3


Note: item (A) should disappear
Item (B) must remain
 
Solution
Someone help me with a revscripts (action):

That by using this item (A) "7494" in an item (B) "8753" it will transport you to this location (32369, 32241, 7) and give you this storage (51118).

ItemID (A): 7494
ItemID (B): 8753
Pos: (32369, 32241, 7)
Storage: (51118)

I use otbr tfs 1.3


Note: item (A) should disappear
Item (B) must remain
Lua:
local specialFlask = Action()

function specialFlask.onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if target:getId() == 8753 then
        player:setStorageValue(51118, 1)
        player:teleportTo(Position(32369, 32241, 7))
        item:remove(1)
    end
    return true
end

specialFlask:id(7494)
specialFlask:register()
Someone help me with a revscripts (action):

That by using this item (A) "7494" in an item (B) "8753" it will transport you to this location (32369, 32241, 7) and give you this storage (51118).

ItemID (A): 7494
ItemID (B): 8753
Pos: (32369, 32241, 7)
Storage: (51118)

I use otbr tfs 1.3


Note: item (A) should disappear
Item (B) must remain
Lua:
local specialFlask = Action()

function specialFlask.onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if target:getId() == 8753 then
        player:setStorageValue(51118, 1)
        player:teleportTo(Position(32369, 32241, 7))
        item:remove(1)
    end
    return true
end

specialFlask:id(7494)
specialFlask:register()
 
Solution
Lua:
local specialFlask = Action()

function specialFlask.onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if target:getId() == 8753 then
        player:setStorageValue(51118, 1)
        player:teleportTo(Position(32369, 32241, 7))
        item:remove(1)
    end
    return true
end

specialFlask:id(7494)
specialFlask:register()
Lua:
Lua Script Error: [Scripts Interface]
/home/forgottenserver/data/scripts/actions/special_flask.lua
C++ exception
> special_flask.lua [error]
^

try with another itemID and if everything is fine, apparently I have other scripts using the same itemID, and if I have it, I just don't know what it's called, check in data/scripts/actions/quest/inquisition and it's not here
 
Last edited:
Back
Top