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

oil poi

Nacke

New Member
Joined
Feb 13, 2008
Messages
79
Reaction score
0
hello, the problem is that it returns to its initial state when the oil disappears and the item remains to 5770. Anyone can help me.
PHP:
local bridgepos = {x=358, y=450, z=9, stackpos=0} -- Position of the bridge tile
local splash = {x=352, y=451, z=9, stackpos=1} -- Position of the liquid pool

local leverUID = 3040 -- Unique ID of the lever
local liquidId = 2016 -- Item ID of the liquid pool
local liquidType = 11 -- Subtype of the liquid pool

function onUse(cid, item, frompos, item2, topos)

local bridge = getThingfromPos(bridgepos) 
local liquid = getThingfromPos(splash)

if item.uid == leverUID and item.itemid == 1945 and liquid.itemid == liquidId and liquid.type == liquidType and bridge.itemid == 493 then
doTransformItem(bridge.uid, 5770)
doSendMagicEffect(splash, CONST_ME_MAGIC_RED)
doTransformItem(item.uid, 1946)

elseif item.uid == leverUID and item.itemid == 1946 and liquid.itemid == 2016 and liquid.type == 11 and bridge.itemid == 5770 then
doTransformItem(bridge.uid, 493)
doTransformItem(item.uid, 1945)
else
doCreatureSay(cid, "The lever is creaking and rusty.", TALKTYPE_ORANGE_1)
end

return TRUE
end
 
Back
Top