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

pick on stone {help}

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,782
Solutions
25
Reaction score
491
Location
Sweden
I need help with my script. It is supposed to break (remove) a rock with item id number 1304. Anyway here is my script so far:

LUA:
function onUse(cid, item, frompos, item2, topos)
if item2.itemid == 1304 and item2.actionid == 1501 then
doRemoveItem(item.itemid,1)
doDecayItem(item2.uid)
doSendMagicEffect(topos, CONST_ME_POFF)
end
return 1
end

ugh, nvm sorry
 
Last edited:
does the targeted rock need to have an actionid?

anyways, here is without actionid.

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local target = getThingFromPos(toPosition)
	if getTileItemById(target,1304).itemid > 0 then
		doRemoveItem(item.uid)
		doDecayItem(target.uid)
		return doSendMagicEffect(toPosition,2)
	end
end
 
Last edited:
bogart said:
OtLand > OpenTibia > Support
so GTFO

Since I got stuck with my LUA script, I needed support with it ;) no need to spam the general support you poor little retard :D
 
Back
Top