• 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 Simple Unique ID error

ziggy46802

Active Member
Joined
Aug 19, 2012
Messages
418
Reaction score
27
okay, I have an "armor rack" with the UID of 1038

here is the line in actions.xml
Code:
	<action uniqueid="1038" script="thieveslegs.lua"/>

here is my script

thieveslegs.lua
Code:
function onUse(cid, item, frompos, item2, topos)

local prize = 11304
local store = 1038

if item.uid == store and
	 getPlayerStorageValue(cid, store) == 1
		then
            doSendMagicEffect(getPlayerPosition(cid), 13)		
			doPlayerAddItem(cid, prize, 1)
		setPlayerStorageValue(cid, 1033, +1)
		setPlayerStorageValue(cid, store, 2)
			if getPlayerStorageValue(cid, 1033) == 6 then
			doPlayerAddExp(cid, 10000)
				return true
			end
				else
				doCreatureSay(cid, "You have already looked at this piece of gear.", TALKTYPE_ORANGE_1)
						return true
					end
						return true
					end

I shouldn't have to put in any form of item ID since there are 2 armor racks and 3 weapon racks for this quest im making, and my other script that I released (pot plant that regenerates) works the exact same way and it works perfectly fine so why is this one not working? When i click the armor rack it just opens the container, no error or message or anything.

I have it setup so that you automatically have storagevalue 1038 set to 1 if it is under 1 when you login so thats not the problem.
 
Back
Top