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

Lua Information for users rev 4137 (8.7) debug on use quest chest . - soluton

domelxp

Member
Joined
Mar 1, 2010
Messages
243
Reaction score
5
Information for users rev 4137 (8.7) debug on use quest chest . - soluton
i think is solutons for all rev for 8.6-8.7

if YOU HAVE DEBUGS ON USE QUEST CHEST AND YOUR QUEST SCRIPT IS ESEMPLE :
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
   	if item.uid == 3001 then
		queststatus = getPlayerStorageValue(cid,6074)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,[COLOR="blue"]25[/COLOR], "You have a demon helmet.")
   			doPlayerAddItem(cid,2493,1)
   			setPlayerStorageValue(cid,6074,1)
   		else
   			doPlayerSendTextMessage(cid,[COLOR="blue"]25[/COLOR], "It is empty.")
   		end
   	elseif item.uid == 3002 then
		queststatus = getPlayerStorageValue(cid,6074)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,[COLOR="blue"]25[/COLOR], "You have found steel boots.")
   			doPlayerAddItem(cid,2645,1)
   			setPlayerStorageValue(cid,6074,1)
   		else
   			doPlayerSendTextMessage(cid,[COLOR="blue"]25[/COLOR], "It is empty.")
   		end
   	elseif item.uid == 3003 then
		queststatus = getPlayerStorageValue(cid,6074)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,[COLOR="blue"]25[/COLOR], "You have found a demon shield.")
   			doPlayerAddItem(cid,2520,1)
   			setPlayerStorageValue(cid,6074,1)
   		else
   			doPlayerSendTextMessage(cid,[COLOR="blue"]25[/COLOR], "It is empty.")
		end
	end
   	return 1
end
YOU MUST CHANGE TO
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
   	if item.uid == 3001 then
		queststatus = getPlayerStorageValue(cid,6074)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,[COLOR="red"]MESSAGE_INFO_DESCR[/COLOR], "You have a demon helmet.")
   			doPlayerAddItem(cid,2493,1)
   			setPlayerStorageValue(cid,6074,1)
   		else
   			doPlayerSendTextMessage(cid,[COLOR="red"]MESSAGE_INFO_DESCR,[/COLOR] "It is empty.")
   		end
   	elseif item.uid == 3002 then
		queststatus = getPlayerStorageValue(cid,6074)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,[COLOR="red"]MESSAGE_INFO_DESCR[/COLOR], "You have found steel boots.")
   			doPlayerAddItem(cid,2645,1)
   			setPlayerStorageValue(cid,6074,1)
   		else
   			doPlayerSendTextMessage(cid,[COLOR="red"]MESSAGE_INFO_DESCR[/COLOR], "It is empty.")
   		end
   	elseif item.uid == 3003 then
		queststatus = getPlayerStorageValue(cid,6074)
   		if queststatus == -1 then
   			doPlayerSendTextMessage(cid,[COLOR="red"]MESSAGE_INFO_DESCR[/COLOR], "You have found a demon shield.")
   			doPlayerAddItem(cid,2520,1)
   			setPlayerStorageValue(cid,6074,1)
   		else
   			doPlayerSendTextMessage(cid,[COLOR="red"]MESSAGE_INFO_DESCR[/COLOR], "It is empty.")
		end
	end
   	return 1
end
 
Last edited:
Yep, the classes changed in 8.61. Let this be a lesson to all didn't use constants in their scripts.
 
Back
Top