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

[Request] Chest[Quest] how to add tutorial!

XaTaR

قناص بغداد
Joined
May 20, 2009
Messages
1,280
Reaction score
2
Location
Austria
i have made a quest and then reward the chests... how i can put items there??? unique id action id etc...
[its my custom quest]
 
actionid : 2000, uniqueid (You choose but every quest shall have a different uniqueid. e.g quest 1: 20041 quest 2 :20042 quest 3: 20043, etc etc
 
example
put the action id = 5000 of the quest chest from map editor
then action.xml
Code:
<action actionid="5000" script="yourscript.lua"/>
and create new file.lua
Lua:
function onUse(cid, item, frompos, item2, topos)

	if item.itemid == 1740 then
  		queststatus = getPlayerStorageValue(cid, 5000)

  		if queststatus == -1 then
                 	setPlayerStorageValue(cid, 5000, 1)
			doPlayerAddItem(cid, 2493, 1)
		else
		        doPlayerSendTextMessage(cid, 22, "it is empty.")
		end
 	end

   	return 1

end
 
example
put the action id = 5000 of the quest chest from map editor
then action.xml
Code:
<action actionid="5000" script="yourscript.lua"/>
and create new file.lua
Lua:
function onUse(cid, item, frompos, item2, topos)

	if item.itemid == 1740 then
  		queststatus = getPlayerStorageValue(cid, 5000)

  		if queststatus == -1 then
                 	setPlayerStorageValue(cid, 5000, 1)
			doPlayerAddItem(cid, 2493, 1)
		else
		        doPlayerSendTextMessage(cid, 22, "it is empty.")
		end
 	end

   	return 1

end

aha and and unique id is 0 ?
 
Back
Top