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

Open door with spell

V i t t u

New Member
Joined
May 25, 2012
Messages
12
Reaction score
0
Location
Brazil
i trying convert script, someone to help? =)

Lua:
local config = {
    door_id = 5123,          --ID da porta da porta aberta/fechada.
    effect = 3,           --Efeito ao abrir/fechar a porta.
    action_id = 15150         --Actionid.
}
 
 function onCastSpell(creature, variant)
    local front_pos = getPosByDir(getThingPos(cid), getCreatureLookDirection(cid))
    front_pos.stackpos = 1
    local front_item = getThingfromPos(front_pos)
    
    if front_item.actionid == config.action_id and front_item.itemid ~= config.door_id then
        doTransformItem(front_item.uid, config.door_id)
        doSendMagicEffect(front_pos, config.effect)
    end
    return combat:execute(creature, variant)
end
 
Back
Top