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

[Quest]Hope to make a Chest give multiple items..

Devhir

A bit of Everything
Joined
Jul 22, 2008
Messages
135
Reaction score
0
As the title says.. doesn't anyone know how to make a chest give multiple items?
 
That should work, Pm me if you get a problem with it i'll help you out.


Add this to your actions.xml
Code:
<action actionid="1000" script="quests/Multichest.lua" />


name the script Mulitchest and put it in 'scripts/quests/Multichest.lua'
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1747 then -- Change that number to ID of the chest.
	 queststatus = getPlayerStorageValue(cid,101) -- Change the 101 to the storage value you want to be used for the quest.
		 if queststatus == -1 then
				doPlayerSendTextMessage(cid,24,"You have found, List the items names here with whatever you want to say, since its more than 1 item.")
					  doPlayerAddItem(cid,7458,1)		-- Change the doPlayerAddItem to which items you want added when they open it
					  doPlayerAddItem(cid,7459,1)
					  doPlayerAddItem(cid,7460,1)
					  doPlayerAddItem(cid,7461,1)
						  setPlayerStorageValue(cid,101,1)
				 else
				  doPlayerSendTextMessage(cid,24,"It is empty.")
		end
	end
return TRUE
end

Don't forget to give the Chest the Action ID with your map editor. you change the Action ID to whatever you want just remember to change it in the actions.xml aswell.

Good luck :thumbup:
 
Back
Top