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

Solved chest problems

Hard

Well-Known Member
Joined
Mar 4, 2012
Messages
551
Reaction score
31
Location
Sweden?
Hello, what is the chest problems?

I will make new quest to my server. and i dont know how i fix with unqiue id and action id?

please help me.
 
Okey!

First of all take actionid: 2000
then you take the id of the item you want and place that id number on Unqiue:)
(The little black square click there and search for the item and then dubble click the item, and you'll see the item id next to the item name)
 
i have an example for u

it's something like i need make a chest give demon eq
this is script
LUA:
function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid,3000) == -1 then
doPlayerAddItem(cid,2493)
doPlayerAddItem(cid,2494)
doPlayerAddItem(cid,2495)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"congrats")
setPlayerStorageValue(cid,3000,1)
doSendMagicEffect(getPlayerPosition(cid),28)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"empty")
end
return 1
end

and in action.xml
put this line

LUA:
<action actionid="3000" event="script" value="quests/Demon eq.lua"/>
for sure quests in the folder i put my script in
else for sure put in the chest when u mapping action id 3000 or what ever you want
 
problem is in 9.60+ the ID for quests have changed, so you have to put the items ID into the chest. If you want more then 2, i rly dont know, but i would loev to know myself, without the scripting if thats possible?
 
You can use the system.lua (actionid 2000 in the chest with uniqueid and items) for both Crying Damson and Mystic Spirit (use an edited version for Mystic Spirit).
If you add more items in the chest, they will be added by the script in a bag, so there is no extra script needed.
 
do i have to do this for every quest?:/
and ive got a chest that i want to give k armor and k legs.. i have added them scripts, but altered them so they should give the items.. I am using action id 3000 and unique id as k armor and i dont understand why there not working, the chests just open?
 
Actionid = 2000
Uniqueid = the storage you want to be checked, has to be unique and different for every quest, make sure the storage you are checking is not used already in your server

You put the items you want the quest to give inside the chest
 
do i have to do this for every quest?:/
and ive got a chest that i want to give k armor and k legs.. i have added them scripts, but altered them so they should give the items.. I am using action id 3000 and unique id as k armor and i dont understand why there not working, the chests just open?
Just use actionid 2000 from the system.lua script. Then add an uniqueid and add the items you want in the chest.
You can add more items, this is not limited to 1 item, the system.lua script will add them in a bag when it's more then 1 item, so don't add a bag in the chest yourself.
 
Hello if your script is the default from the TFS (I wont read it all is painful to read) you don't have to modify anything in your script but in your map, set action 2000 to the chest or whatever container you want it to give the reward, set the unique as the storage you want it to check, and put the items you want it to give inside the container.
 
Just use actionid 2000 from the system.lua script. Then add an uniqueid and add the items you want in the chest.
You can add more items, this is not limited to 1 item, the system.lua script will add them in a bag when it's more then 1 item, so don't add a bag in the chest yourself.


(( Thank you, it worked for that quest, but i have another chest with 1cc in and action id 2000 and a unique id and that one is saying its empty when i havnt done the quest?

Im sorry to bother you, but your the first person i saw that knows everything about OT's:) ))

Edited: Dont worry ive fixed it:) Thank you
 
Last edited:
Back
Top