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

How to make a chest gives 100 platinums [Bug with tfs]??

Sir Shutter

Learning LUA
Joined
Nov 17, 2008
Messages
1,437
Reaction score
10
Location
Egypt
Hey..In all server I use to make a chest give like 100 platinum coins I put in UniqueID of chest the ID of platinum coin and in ActionID : 100 , It should give the platinum coin and 100 of it, so 100 platinum coins i should recieve now I tryed to do it , it only gives me 1 platinum coin! It should give 100, if TFS is something else than other ones, then tell me how i make it give 100 platinum coins?! Thanks!!
 
Also I would like to know how to change something to a teleport like the blue teleport? there is another kind of a teleport i want it like the blue one can i make it with scripts?
 
Code:
function onUse(cid, item, frompos, item2, topos)
prize = 2152
count = 100
playerCap = getPlayerFreeCap(cid)
local itemWeight = getItemWeightById(prize, 1)

if prize > 0 and prize < 7000 then
queststatus = getPlayerStorageValue(cid,prize)

	if queststatus == -1 then
		if itemWeight <= playerCap then
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You have found a ' .. getItemNameById(prize) .. '.')
		doPlayerAddItem(cid,prize,100)
		setPlayerStorageValue(cid,prize,1)
		setPlayerStorageValue(cid,99999,1)
		else
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'You have found a ' .. getItemNameById(prize) .. ' weighing ' .. itemWeight .. ' oz it\'s too heavy.')
		end
	else
	doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"It is empty.")
	end

return 1
else
return 0
end
end
 
[13/12/2008 09:11:19] data/actions/scripts/custom vets/start chest.lua:5: attempt to call global 'getItemWeightById' (a nil value)
[13/12/2008 09:11:19] stack traceback:
[13/12/2008 09:11:19] data/actions/scripts/custom vets/start chest.lua:5: in function <data/actions/scripts/custom vets/start chest.lua:1>
 
Back
Top