• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Quest~

SasirO

Banned User
Joined
Apr 30, 2009
Messages
559
Reaction score
0
Greetings, i need a script so if a player click on a hole then he'll get a key with an action id..

Anyone know how to make it?, i've looked everywhere and couldnt find any similar script, thanks in advance _/
 
so, how can i make them be used for actions?
there are many quests on rl tibia based on ground tiles, for example if i player click on a ground tile with action id then he'll get a quest item...
Isnt it possible?
 
huh, still not working for me,
Actiond Id on the hole 34908
Code:
  local config = {
        storage = 1343,
        key_id = 2090 -- Key ID

}

function onUse(cid, item, fromPosition, itemEx, toPosition)
        if getPlayerStorageValue(cid, config.storage) == -1 then
                setPlayerStorageValue(cid, config.storage, 1)
                key = doPlayerAddItem(cid, config.key_id, 1)
                doSetItemActionId(key, 3244)
        else
                doPlayerSendCancel(cid, "You have already received this key.")
        end
end


PHP:
<action actionid="34908" event="script" value="fibula.lua" />


Its not working...!!!
Im not even getting the key
 
Script.lua
LUA:
local config = {
        storage = 1343,
        key_id = 2090 -- Key ID

}

function onUse(cid, item, fromPosition, itemEx, toPosition) 
        if getPlayerStorageValue(cid, config.storage) == -1 then
                setPlayerStorageValue(cid, config.storage, 1)
                key = doPlayerAddItem(cid, config.key_id, 1)
                doSetItemActionId(key, 3244)
        else
                doPlayerSendCancel(cid, "You have already received this key.")
        end
end

Actions.xml
LUA:
<action uniqueid="1000" event="script" value="script.lua"/>

Set the hole's unique ID.
In the mapeditor.


Then when you use, you will get key.

This action ID is for what you use the key with.
LUA:
doSetItemActionId(key, 3244)
 
You can open the tibia.spr in the dat editor.
Then make the hole usable.

You will need a custom client then.
 
Back
Top