• 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 Stuck with Lua Script!

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,782
Solutions
25
Reaction score
491
Location
Sweden
Edit: Was stuck with an addItem script. Scroll down to see Cykotitans solution.
 
Last edited:
I don't know where is the problem, but i think that
Code:
if getPlayerStorageValue(cid, 8532) < [COLOR="red"]0 [/COLOR]then
should look like
Code:
if getPlayerStorageValue(cid, 8532) < [COLOR="red"]1[/COLOR] then
 
It's totally f**ked, would be nice if someone with some knowledge about onAddItem would appear to the rescue! :D
 
LUA:
function onAddItem(moveItem, tileItem, position)
	for i = 2335, 2341 do
		if moveItem.itemid ~= i and getTileItemById(position, i).uid == 0 then return end
	end
	for i = 2335, 2341 do
		local v = getTileItemById(position, i).uid
		doRemoveItem(v > 0 and v or moveItem.uid)
	end
	doCreateItem(2342, 1, position)
	doSendMagicEffect(position, CONST_ME_FIREAREA)
end
 

Similar threads

Back
Top