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

Tile, OnAddItem (Closed)

LucasFerraz

Systems Analyst
Joined
Jun 10, 2010
Messages
2,857
Reaction score
96
Location
Brazil
I made this script myself and it's working but if player step in he will receive an effect.
How can I remove this effect?
LUA:
function onAddItem(moveitem, tileitem, pos)
 
tree1pos = {x=32999, y=32272, z=10, stackpos=1}
tree1 = getThingfromPos(tree1pos)
 
if moveitem.itemid == 2016 and tree1.itemid == 1355 then
	doRemoveItem(tree1.uid,1)
	doCreateItem(1387,1,tree1pos)
end
return 1
end
 
try
LUA:
local tree1pos = {x=32999, y=32272, z=10, stackpos=1}
function onAddItem(moveitem,tileitem,pos)
local tree1 = getThingfromPos(tree1pos)
	if not(isPlayer(moveitem) or isPlayer(tileitem))then
		if moveitem.itemid == 2016 and tree1.itemid == 1355 then	
			doRemoveItem(tree1.uid,1)
			doCreateItem(1387,1,tree1pos)
		end
	end
	return true
end
 
Back
Top