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

hey i need to know how to make a simple reward chest for a quest

lolita15

New Member
Joined
Sep 4, 2010
Messages
19
Reaction score
0
Hello I'm new at ots so here I go
I got the map and everything including the rewards room but I need to know how to make them work. Can somebody explain how to add unique IDs to items and all that.
I'm currently working on POI rewards room. thanks

PLEASE HELP
 
oyu need to put Action id to 2000, then Unique id whatever you want like,... i use 20001-20099 so i kno what all 5digits nr who start with 2 is quest, so put unique id 20001, then u click on a empty space in the chest and search for your item


then go to data/xml folder, then u copy this and paste it


- <quests>- <quest name="Pits of inferno quest reward 1" startstorageid="20001" startstoragevalue="1">- </quest></quests>


save and restart server and now it should work


btw GM's/gods cant take rewards just so u kno


And u put the action id 2000 unique id 20001 on the CHEST not on the weapon,


thx
 
poi error.jpg

This is the picture of my map editor and my ot.
When I open the boxes I get the rewards but nobody else can get them anymore once I pick the items from the box.

Lua File

function onUse(cid, item, frompos, item2, topos)

if item.uid == 10222 then
if getPlayerStorageValue(cid,10544) == -1 then
doPlayerSendTextMessage(cid,25,"You have chosen an arcane staff.")
doPlayerAddItem(cid,2453,1)
setPlayerStorageValue(cid,10544,1)
else
doPlayerSendTextMessage(cid,25,"It is empty.")
end

elseif item.uid == 10223 then
if getPlayerStorageValue(cid,10544) == -1 then
doPlayerSendTextMessage(cid,25,"You have chosen the avenger.")
doPlayerAddItem(cid,6528,1)
setPlayerStorageValue(cid,10544,1)
else
doPlayerSendTextMessage(cid,25,"It is empty.")
end

elseif item.uid == 10224 then
if getPlayerStorageValue(cid,10544) == -1 then
doPlayerSendTextMessage(cid,25,"You have chosen an arbalest.")
doPlayerAddItem(cid,5803,1)
setPlayerStorageValue(cid,10544,1)
else
doPlayerSendTextMessage(cid,25,"It is empty.")
end

elseif item.uid == 10225 then
if getPlayerStorageValue(cid,10547) == -1 then
doPlayerSendTextMessage(cid,25,"You have found a pair of soft boots.")
doPlayerAddItem(cid,6132,1)
setPlayerStorageValue(cid,10547,1)
else
doPlayerSendTextMessage(cid,25,"It is empty.")
end


elseif item.uid == 10227 then
if getPlayerStorageValue(cid,10550) == -1 then
doPlayerSendTextMessage(cid,25,"You have found a frozen starlight.")
doPlayerAddItem(cid,2361,1)
setPlayerStorageValue(cid,10550,1)
else
doPlayerSendTextMessage(cid,25,"It is empty.")
end


elseif item.uid == 10228 then
if getPlayerStorageValue(cid,10550) == -1 then
doPlayerSendTextMessage(cid,25,"You have found a backpack of holding.")
doPlayerAddItem(cid,2365,1)
setPlayerStorageValue(cid,10550,1)
else
doPlayerSendTextMessage(cid,25,"It is empty.")
end


elseif item.uid == 10226 then
if getPlayerStorageValue(cid,10550) == -1 then
doPlayerSendTextMessage(cid,25,"You have found 25 crystal coins.")
doPlayerAddItem(cid,2160,25)
setPlayerStorageValue(cid,10550,1)
else
doPlayerSendTextMessage(cid,25,"It is empty.")
end

return TRUE
end


xml files

<!-- Pits of Inferno rewards -->
<action uniqueid="10222" event="script" value="poi.lua"/>
<action uniqueid="10223" event="script" value="poi.lua"/>
<action uniqueid="10224" event="script" value="poi.lua"/>
<action uniqueid="10225" event="script" value="poi.lua"/>
<action uniqueid="10226" event="script" value="poi.lua"/>
<action uniqueid="10227" event="script" value="poi.lua"/>
<action uniqueid="10228" event="script" value="poi.lua"/>


I dont know what this line means
"if getPlayerStorageValue(cid,10550) == -1 then"



thank you!
 
the picture didnt work so i'll send you the pic again

(You dont have to download the picture, therefore there's no virus)
poi error PNG
 
I didnt think you needed to do lua/xml for a simple chest opening... did you want them to be able to choose between arb, staff and sword or something?
 
hey dude if you still want to make a chest then all you have to do is put in the item and then whatever the id for the item is put it for the unique id and the action id 200
 
Back
Top