ruth
Veteran OT User
- Joined
- Aug 3, 2009
- Messages
- 670
- Solutions
- 2
- Reaction score
- 380
How to combine these two functions.
pick.lua
With:
pick.lua
Code:
local TUMB_ENTRANCE = 7200
local MUD_HOLE = 392
local ICE_FISHHOLE = 7236
local duration = 5 * 60000 -- 5 minutes
function onUse(cid, item, frompos, item2, topos)
if (isInArray(MUD, item2.itemid) == TRUE) then
if (item2.actionid == TUMB_ENTRANCE) then
doSendMagicEffect(topos, CONST_ME_POFF)
doTransformItem(item2.uid, MUD_HOLE)
addEvent(__doTransformHole__, duration, {oldType = item2.itemid, pos = topos})
return TRUE
end
end
return FALSE
end
function __doTransformHole__(parameters)
local thing = getTileItemById(parameters.pos, MUD_HOLE)
local newItem = doTransformItem(thing.uid, parameters.oldType)
end
With:
Code:
elseif (item2.itemid == 1304 and item2.aid == 4005) then
doRemoveItem(item2.uid,1)
doSendMagicEffect(topos,2)
end
return 1
end