I have noticed that you cant just make a quest chest in tfs 0.3.5pl in the mapeditor, so i need to script it, i put in an action script like this
Then i put this line in my actions.xml
and in the mapedtior i put unique id 1000? it doesent work, im so damn noob at lua and stuff so could someone explain in a childish way, like if you would explain for a 3 year old? !
function onUse(cid, item, fromPosition, itemEx, toPosition)
local poz = getPlayerPosition(cid)
if item.uid == 2432 then
item = 2432
stor = 1000
if(getPlayerStorageValue(cid,stor) == -1) then
if(doPlayerAddItem(cid,item,1, FALSE)) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a ".. getItemNameById(item) ..".")
setPlayerStorageValue(cid,stor,1)
doSendAnimatedText(poz, "GrEaTz!", TEXTCOLOR_WHITE)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found a ".. getItemNameById(item) .." reward weighing " .. getItemWeightById(item,1) .. " oz. It is too heavy or you have not enough space.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
end
end
return TRUE
end
Then i put this line in my actions.xml
<action uniqueid="1000" event="script" value="questchest.lua"/>
and in the mapedtior i put unique id 1000? it doesent work, im so damn noob at lua and stuff so could someone explain in a childish way, like if you would explain for a 3 year old? !