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

whats wrong with this script, if u use it twice it debugg client.

ib0w

teamfiveporject
Joined
Apr 3, 2009
Messages
91
Reaction score
4
Location
Sweden/Ronneby
Monster corpse:
<look type="306" corpse="12573"/>
when monster dies, corpse="12573", when u use the first time u get the reward, when u use it again it debugg the client :s

<action itemid="12573" event="script" value="bosscorpse1.lua"/>

local storage = 35000
local aid = 5681
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,storage) == 19873 then
setPlayerStorageValue(cid,storage,19873)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You have found a silver key")
doItemSetAttribute(doPlayerAddItem(cid,2091,1), 'aid', aid)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_dESCR,"It is empty")
end
return true
end

im using tfs 0.3.6
 
LUA:
local storage = 35000
local aid = 5681
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerStorageValue(cid,storage) == 19873 then
		setPlayerStorageValue(cid,storage,19874)
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Yo u have found a silver key")
		doItemSetAttribute(doPlayerAddItem(cid,2091,1), 'aid', aid)
	else
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"It is empty")
	end
	return true
end
 
Back
Top