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

[Otserver] How Do I Make Quest Chest

Darkmousse

Banned User
Joined
Jun 7, 2009
Messages
36
Reaction score
0
Hi Everybody.
Can someone tells me how do I do simple quest chest and chest like anihilator (choose one of the four quest chest)
 
umm like this i guess
In actions.xml add this lines

<action uniqueid="1300" script="inqchests.lua" />
<action uniqueid="1301" script="inqchests.lua" />
<action uniqueid="1302" script="inqchests.lua" />
<action uniqueid="1303" script="chests.lua" />
<action uniqueid="1304" script="chests.lua" />
<action uniqueid="1305" script="chests.lua" />
<action uniqueid="1306" script="chests.lua" />
<action uniqueid="1307" script="chests.lua" />
<action uniqueid="1308" script="chests.lua" />

and in scripts/chest.lua

function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 1300 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found robe of the underworld.")
doPlayerAddItem(cid,8890,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 1301 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Spellbook of Dark Mysteries.")
doPlayerAddItem(cid,8918,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 1302 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Fireborn Giant Armor.")
doPlayerAddItem(cid,8881,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 1303 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Master Archer's Armor.")
doPlayerAddItem(cid,8888,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 1304 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Royal Crossbow.")
doPlayerAddItem(cid,8851,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 1305 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Hellforged Axe.")
doPlayerAddItem(cid,8924,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 1306 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Obsidian Truncheon.")
doPlayerAddItem(cid,8928,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 1307 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Emerald Sword.")
doPlayerAddItem(cid,8930,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 1308 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a Warsinger Bow.")
doPlayerAddItem(cid,8854,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
end
return 1
end
 
@up

OMG waste of time.

@topic

If you are using TFS 0.3+ then in your mapeditor(RME) set to a chest:

-ActionId = 2000
-UniqueId = A Storage KEY unused.
-And in the black boxed the item to be given.

If you whant to make a quest like anihilator then use the same uniqueIds :D
 
Add this in actions.xml
<action actionid="2000" script="chest.lua" />
<action actionid="2001" script="chest.lua" />
<action actionid="2002" script="chest.lua" />
<action actionid="2003" script="chest.lua" />
And make a new file in data/actions/scripts called chest. Then paste.
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 2000 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a demon armor.")
doPlayerAddItem(cid,2494,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 2001 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a magic sword.")
doPlayerAddItem(cid,2400,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 2002 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a stonecutter axe.")
doPlayerAddItem(cid,2431,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
elseif item.uid == 2003 then
queststatus = getPlayerStorageValue(cid,6076)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have found a annihilation bear.")
doPlayerAddItem(cid,2326,1)
setPlayerStorageValue(cid,6076,1)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "It is empty.")
end
end
return 1
end
also you got to add action id: 2000, 2001, 2002 and 2003 to your map editor on the chest. :p
 
Back
Top