• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    [Mods] Recovery Token // Recupera tus items al perderlos

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    Hola Usuario de TibiaFace

    Este script consiste, que al usar un item, en una armadura o algo, le deje atado el token, y cuando tu pierdes el token, tu puedes decir algo como !r 1 o el slot que te toco, entonces cuando tu lo recuperas, puedes volver a recuperarlo, pero cada 24 horas o 1 dia, Solo son 5 slots por persona, y estos quedan completamente atados a la persona, esta persona, al usar los 5 slot, no los podra cambiar, ya que estan ligados al personaje, entonces:
    -- INSTALACION --

    nos vamos a la carpeta MODS de nuestro servidor y copiamos cualquier archivo y renombramos por Recovery Token.xml y pegamos esto dentro

    Código:

        <?xml version="1.0" encoding="UTF-8"?>
        <mod name="Recovery Token" version="1.0" author="Ledtheron" contact="ledtheron@gmail.com" enabled="yes">
          <action itemid="8300" event="script"><![CDATA[
        function onUse(cid, item, frompos, item2, topos)
        local slots = {
        [0] = {storage = 36781, slot = 1},
        [1] = {storage = 36782, slot = 2},
        [2] = {storage = 36783, slot = 3},
        [3] = {storage = 36784, slot = 4},
        [4] = {storage = 36785, slot = 5},
        }
        if getItemAttribute(item2.uid, "rt") == "true" then
        doPlayerSendCancel(cid, "This item already has a recovery token")
        doSendMagicEffect(topos, 13)
        return true
        end
        if (not isMoveable(item2.uid)) then
        doPlayerSendCancel(cid, "This item isn't moveable")
        doSendMagicEffect(topos, 13)
        return true
        end
        if getPlayerStorageValue(cid, 26786) == -1 then
        setPlayerStorageValue(cid, 26786, 0)
        end
        x = slots[getPlayerStorageValue(cid, 26786)]
        if getPlayerStorageValue(cid, 26786) == 5 then
        doPlayerSendCancel(cid, "You have all slots ocuped")
        doSendMagicEffect(topos, 13)
        return true
        end
        if isItemStackable(item2.itemid) then
        doPlayerSendCancel(cid, "This item is stackable")
        doSendMagicEffect(topos, 13)
        return true
        end
        doItemSetAttribute(item2.uid, "rt", "true")
        setPlayerStorageValue(cid, 26786, getPlayerStorageValue(cid, 26786) + 1)
        doItemSetAttribute(item2.uid, "uid", getGlobalStorageValue(6982))
        doPlayerSendCancel(cid, "You used the recovery token on "..getItemName(item2.uid).." to recover it, say !r "..x.slot.."")
        setPlayerStorageValue(cid, x.storage, getGlobalStorageValue(6982))
        doItemSetAttribute(item2.uid, "description", "This item have recovery token")
        setGlobalStorageValue(6982, getGlobalStorageValue(6982) + 1)
        doItemSetAttribute(item2.uid, "time", os.time())
        doSendMagicEffect(topos, 14)
        doRemoveItem(item.uid, 1)
        return true
        end
          ]]></action>
          <talkaction words="!r" event="script"><![CDATA[
          function onSay(cid, words, param, channel)
        local slots = {
        [1] = {storage = 36781, slot = 1},
        [2] = {storage = 36782, slot = 2},
        [3] = {storage = 36783, slot = 3},
        [4] = {storage = 36784, slot = 4},
        [5] = {storage = 36785, slot = 5},
        }
        if param == "storage" then
        doPlayerSendCancel(cid, "You set the storage to 1834")
        setGlobalStorageValue(6982, 1834)
        return true
        end
        if (not isInArray({1, 2, 3, 4, 5}, param)) then
        doPlayerSendCancel(cid, "There isn't a slot with that number or letter")
        doSendMagicEffect(getCreaturePosition(cid), 13)
        return true
        end
        local slot = slots[tonumber(param)]
        if getPlayerStorageValue(cid, slot.storage) < 1 then
        doPlayerSendCancel(cid, "You don't have nothing in that slot")
        doSendMagicEffect(getCreaturePosition(cid), 13)
        return true
        end
        local item = getPlayerStorageValue(cid, slot.storage)
        if getItemAttribute(item, "time") > os.time() then
        local hours = 0
        local minutes = 0
        local seconds = 0
        local realseconds = getItemAttribute(item,"time")-os.time()
        while realseconds > 3599 do
        realseconds = realseconds-3600
        hours = hours + 1
        end
        while realseconds > 59 do
        realseconds = realseconds-60
        minutes = minutes + 1
        end
        while realseconds > 0 do
        realseconds = realseconds-1
        seconds = seconds + 1
        end
        doPlayerSendCancel(cid, "You can't recover this item until "..hours.." Hours, "..minutes.." Minutes, "..seconds.." Seconds")
        doSendMagicEffect(getCreaturePosition(cid), 13)
        return true
        end
                                if(not getTilePzInfo(getPlayerPosition(cid))) then
        doPlayerSendCancel(cid, "You have to be on pz")
        doSendMagicEffect(getCreaturePosition(cid), 13)
        return true
        end
        local function moveItem(item, pos)
        doSendMagicEffect(getPlayerLookPos(pos), 14)
        return doTeleportThing(item, getPlayerLookPos(pos))
        end


        addEvent(moveItem, 10000, item, cid)
        doPlayerSendCancel(cid, "In 10 seconds you will receive the "..getItemName(item).." from slot "..slot.slot.." in front of you")
        doSendMagicEffect(getCreaturePosition(cid), 14)
        doItemSetAttribute(item, "time", os.time() + 86400)
        return true
        end
        ]]></talkaction>
        </mod>

    este script tiene 5 slot ustedes le pueden añadir mas si quieren aqui estan los slot

    Código:
    Head=[1]
    necklace=[2]
    backpack=[3]
    armor=[4]
    right hand=[5]
    left hand=[6]
    legs=[7]
    feet=[8]
    ring=[9]
    ammo=[10]

    bueno eso esto



    Ver perfil de usuario http://www.tibiaface.com
    God maya, uso otxserver 2.9 tfs 0.3.7

    me sale este error:
    Código:
    [Error - Action Interface]
    [6/5/2017 17:40:55] function onUse(cid, item, frompos, item2, topos)
    [6/5/2017 17:40:55]    local slots = {
    [6/5/2017 17:40:55]    [0] = {storage = 36781, slot = 1},
    [6/5/2017 17:40:55]    [1] = {storage = 36782, slot = 2},
    [6/5/2017 17:40:55]    [2] = {storage = 36783, slot = 3},
    [6/5/2017 17:40:55]    [3] = {storage = 36784, slot = 4},
    [6/5/2017 17:40:55]    [4] = {storage = 36785, slot = 5},
    [6/5/2017 17:40:55]    }
    [6/5/2017 17:40:55]    if getItemAttribute(item2.uid, "rt") == "true" then
    [6/5/2017 17:40:55]    doPlayerSendCancel(cid, "This item already has a recovery token")
    [6/5/2017 17:40:55]    doSendMagicEffect(topos, 13)
    [6/5/2017 17:40:55]    return true
    [6/5/2017 17:40:55]    end
    [6/5/2017 17:40:55]    if (not isMoveable(item2.uid)) then
    [6/5/2017 17:40:55]    doPlayerSendCancel(cid, "This item isn't moveable")
    [6/5/2017 17:40:55]    doSendMagicEffect(topos, 13)
    [6/5/2017 17:40:55]    return true
    [6/5/2017 17:40:55]    end
    [6/5/2017 17:40:55]    if getPlayerStorageValue(cid, 26786) == -1 then
    [6/5/2017 17:40:55]    setPlayerStorageValue(cid, 26786, 0)
    [6/5/2017 17:40:55]    end
    [6/5/2017 17:40:55]    x = slots[getPlayerStorageValue(cid, 26786)]
    [6/5/2017 17:40:55]    if getPlayerStorageValue(cid, 26786) == 5 then
    [6/5/2017 17:40:55]    doPlayerSendCancel(cid, "You have all slots ocuped")
    [6/5/2017 17:40:55]    doSendMagicEffect(topos, 13)
    [6/5/2017 17:40:55]    return true
    [6/5/2017 17:40:55]    end
    [6/5/2017 17:40:55]    if isItemStackable(item2.itemid) then
    [6/5/2017 17:40:55]    doPlayerSendCancel(cid, "This item is stackable")
    [6/5/2017 17:40:55]    doSendMagicEffect(topos, 13)
    [6/5/2017 17:40:55]    return true
    [6/5/2017 17:40:55]    end
    [6/5/2017 17:40:55]    doItemSetAttribute(item2.uid, "rt", "true")
    [6/5/2017 17:40:55]    setPlayerStorageValue(cid, 26786, getPlayerStorageValue(cid, 26786) + 1)
    [6/5/2017 17:40:55]    doItemSetAttribute(item2.uid, "uid", getGlobalStorageValue(6982))
    [6/5/2017 17:40:55]    doPlayerSendCancel(cid, "You used the recovery token on "..getItemName(item2.uid).." to recover it, say !r "..x.slot.."")
    [6/5/2017 17:40:55]    setPlayerStorageValue(cid, x.storage, getGlobalStorageValue(6982))
    [6/5/2017 17:40:55]    doItemSetAttribute(item2.uid, "description", "This item have recovery token")
    [6/5/2017 17:40:55]    setGlobalStorageValue(6982, getGlobalStorageValue(6982) + 1)
    [6/5/2017 17:40:55]    doItemSetAttribute(item2.uid, "time", os.time())
    [6/5/2017 17:40:55]    doSendMagicEffect(topos, 14)
    [6/5/2017 17:40:55]    doRemoveItem(item.uid, 1)
    [6/5/2017 17:40:55]    return true
    [6/5/2017 17:40:55]    end
    [6/5/2017 17:40:55] :onUse
    [6/5/2017 17:40:55] Description:
    [6/5/2017 17:40:55] (LuaInterface::luaDoItemSetAttribute) Invalid data type

    [6/5/2017 17:40:55] [Error - Action Interface]
    [6/5/2017 17:40:55] function onUse(cid, item, frompos, item2, topos)
    [6/5/2017 17:40:56]    local slots = {
    [6/5/2017 17:40:56]    [0] = {storage = 36781, slot = 1},
    [6/5/2017 17:40:56]    [1] = {storage = 36782, slot = 2},
    [6/5/2017 17:40:56]    [2] = {storage = 36783, slot = 3},
    [6/5/2017 17:40:56]    [3] = {storage = 36784, slot = 4},
    [6/5/2017 17:40:56]    [4] = {storage = 36785, slot = 5},
    [6/5/2017 17:40:56]    }
    [6/5/2017 17:40:56]    if getItemAttribute(item2.uid, "rt") == "true" then
    [6/5/2017 17:40:56]    doPlayerSendCancel(cid, "This item already has a recovery token")
    [6/5/2017 17:40:56]    doSendMagicEffect(topos, 13)
    [6/5/2017 17:40:56]    return true
    [6/5/2017 17:40:56]    end
    [6/5/2017 17:40:56]    if (not isMoveable(item2.uid)) then
    [6/5/2017 17:40:56]    doPlayerSendCancel(cid, "This item isn't moveable")
    [6/5/2017 17:40:56]    doSendMagicEffect(topos, 13)
    [6/5/2017 17:40:56]    return true
    [6/5/2017 17:40:56]    end
    [6/5/2017 17:40:56]    if getPlayerStorageValue(cid, 26786) == -1 then
    [6/5/2017 17:40:56]    setPlayerStorageValue(cid, 26786, 0)
    [6/5/2017 17:40:56]    end
    [6/5/2017 17:40:56]    x = slots[getPlayerStorageValue(cid, 26786)]
    [6/5/2017 17:40:56]    if getPlayerStorageValue(cid, 26786) == 5 then
    [6/5/2017 17:40:56]    doPlayerSendCancel(cid, "You have all slots ocuped")
    [6/5/2017 17:40:56]    doSendMagicEffect(topos, 13)
    [6/5/2017 17:40:56]    return true
    [6/5/2017 17:40:56]    end
    [6/5/2017 17:40:56]    if isItemStackable(item2.itemid) then
    [6/5/2017 17:40:56]    doPlayerSendCancel(cid, "This item is stackable")
    [6/5/2017 17:40:56]    doSendMagicEffect(topos, 13)
    [6/5/2017 17:40:56]    return true
    [6/5/2017 17:40:56]    end
    [6/5/2017 17:40:56]    doItemSetAttribute(item2.uid, "rt", "true")
    [6/5/2017 17:40:56]    setPlayerStorageValue(cid, 26786, getPlayerStorageValue(cid, 26786) + 1)
    [6/5/2017 17:40:56]    doItemSetAttribute(item2.uid, "uid", getGlobalStorageValue(6982))
    [6/5/2017 17:40:56]    doPlayerSendCancel(cid, "You used the recovery token on "..getItemName(item2.uid).." to recover it, say !r "..x.slot.."")
    [6/5/2017 17:40:56]    setPlayerStorageValue(cid, x.storage, getGlobalStorageValue(6982))
    [6/5/2017 17:40:56]    doItemSetAttribute(item2.uid, "description", "This item have recovery token")
    [6/5/2017 17:40:56]    setGlobalStorageValue(6982, getGlobalStorageValue(6982) + 1)
    [6/5/2017 17:40:56]    doItemSetAttribute(item2.uid, "time", os.time())
    [6/5/2017 17:40:56]    doSendMagicEffect(topos, 14)
    [6/5/2017 17:40:56]    doRemoveItem(item.uid, 1)
    [6/5/2017 17:40:56]    return true
    [6/5/2017 17:40:56]    end
    [6/5/2017 17:40:56] :onUse
    [6/5/2017 17:40:56] Description:
    [6/5/2017 17:40:56] (LuaInterface::luaDoCreatureSetStorage) Creature not found


    Ver perfil de usuario

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:God maya, uso otxserver 2.9 tfs 0.3.7

    me sale este error:
    Código:
    [Error - Action Interface]
    [6/5/2017 17:40:55] function onUse(cid, item, frompos, item2, topos)
    [6/5/2017 17:40:55]    local slots = {
    [6/5/2017 17:40:55]    [0] = {storage = 36781, slot = 1},
    [6/5/2017 17:40:55]    [1] = {storage = 36782, slot = 2},
    [6/5/2017 17:40:55]    [2] = {storage = 36783, slot = 3},
    [6/5/2017 17:40:55]    [3] = {storage = 36784, slot = 4},
    [6/5/2017 17:40:55]    [4] = {storage = 36785, slot = 5},
    [6/5/2017 17:40:55]    }
    [6/5/2017 17:40:55]    if getItemAttribute(item2.uid, "rt") == "true" then
    [6/5/2017 17:40:55]    doPlayerSendCancel(cid, "This item already has a recovery token")
    [6/5/2017 17:40:55]    doSendMagicEffect(topos, 13)
    [6/5/2017 17:40:55]    return true
    [6/5/2017 17:40:55]    end
    [6/5/2017 17:40:55]    if (not isMoveable(item2.uid)) then
    [6/5/2017 17:40:55]    doPlayerSendCancel(cid, "This item isn't moveable")
    [6/5/2017 17:40:55]    doSendMagicEffect(topos, 13)
    [6/5/2017 17:40:55]    return true
    [6/5/2017 17:40:55]    end
    [6/5/2017 17:40:55]    if getPlayerStorageValue(cid, 26786) == -1 then
    [6/5/2017 17:40:55]    setPlayerStorageValue(cid, 26786, 0)
    [6/5/2017 17:40:55]    end
    [6/5/2017 17:40:55]    x = slots[getPlayerStorageValue(cid, 26786)]
    [6/5/2017 17:40:55]    if getPlayerStorageValue(cid, 26786) == 5 then
    [6/5/2017 17:40:55]    doPlayerSendCancel(cid, "You have all slots ocuped")
    [6/5/2017 17:40:55]    doSendMagicEffect(topos, 13)
    [6/5/2017 17:40:55]    return true
    [6/5/2017 17:40:55]    end
    [6/5/2017 17:40:55]    if isItemStackable(item2.itemid) then
    [6/5/2017 17:40:55]    doPlayerSendCancel(cid, "This item is stackable")
    [6/5/2017 17:40:55]    doSendMagicEffect(topos, 13)
    [6/5/2017 17:40:55]    return true
    [6/5/2017 17:40:55]    end
    [6/5/2017 17:40:55]    doItemSetAttribute(item2.uid, "rt", "true")
    [6/5/2017 17:40:55]    setPlayerStorageValue(cid, 26786, getPlayerStorageValue(cid, 26786) + 1)
    [6/5/2017 17:40:55]    doItemSetAttribute(item2.uid, "uid", getGlobalStorageValue(6982))
    [6/5/2017 17:40:55]    doPlayerSendCancel(cid, "You used the recovery token on "..getItemName(item2.uid).." to recover it, say !r "..x.slot.."")
    [6/5/2017 17:40:55]    setPlayerStorageValue(cid, x.storage, getGlobalStorageValue(6982))
    [6/5/2017 17:40:55]    doItemSetAttribute(item2.uid, "description", "This item have recovery token")
    [6/5/2017 17:40:55]    setGlobalStorageValue(6982, getGlobalStorageValue(6982) + 1)
    [6/5/2017 17:40:55]    doItemSetAttribute(item2.uid, "time", os.time())
    [6/5/2017 17:40:55]    doSendMagicEffect(topos, 14)
    [6/5/2017 17:40:55]    doRemoveItem(item.uid, 1)
    [6/5/2017 17:40:55]    return true
    [6/5/2017 17:40:55]    end
    [6/5/2017 17:40:55] :onUse
    [6/5/2017 17:40:55] Description:
    [6/5/2017 17:40:55] (LuaInterface::luaDoItemSetAttribute) Invalid data type

    [6/5/2017 17:40:55] [Error - Action Interface]
    [6/5/2017 17:40:55] function onUse(cid, item, frompos, item2, topos)
    [6/5/2017 17:40:56]    local slots = {
    [6/5/2017 17:40:56]    [0] = {storage = 36781, slot = 1},
    [6/5/2017 17:40:56]    [1] = {storage = 36782, slot = 2},
    [6/5/2017 17:40:56]    [2] = {storage = 36783, slot = 3},
    [6/5/2017 17:40:56]    [3] = {storage = 36784, slot = 4},
    [6/5/2017 17:40:56]    [4] = {storage = 36785, slot = 5},
    [6/5/2017 17:40:56]    }
    [6/5/2017 17:40:56]    if getItemAttribute(item2.uid, "rt") == "true" then
    [6/5/2017 17:40:56]    doPlayerSendCancel(cid, "This item already has a recovery token")
    [6/5/2017 17:40:56]    doSendMagicEffect(topos, 13)
    [6/5/2017 17:40:56]    return true
    [6/5/2017 17:40:56]    end
    [6/5/2017 17:40:56]    if (not isMoveable(item2.uid)) then
    [6/5/2017 17:40:56]    doPlayerSendCancel(cid, "This item isn't moveable")
    [6/5/2017 17:40:56]    doSendMagicEffect(topos, 13)
    [6/5/2017 17:40:56]    return true
    [6/5/2017 17:40:56]    end
    [6/5/2017 17:40:56]    if getPlayerStorageValue(cid, 26786) == -1 then
    [6/5/2017 17:40:56]    setPlayerStorageValue(cid, 26786, 0)
    [6/5/2017 17:40:56]    end
    [6/5/2017 17:40:56]    x = slots[getPlayerStorageValue(cid, 26786)]
    [6/5/2017 17:40:56]    if getPlayerStorageValue(cid, 26786) == 5 then
    [6/5/2017 17:40:56]    doPlayerSendCancel(cid, "You have all slots ocuped")
    [6/5/2017 17:40:56]    doSendMagicEffect(topos, 13)
    [6/5/2017 17:40:56]    return true
    [6/5/2017 17:40:56]    end
    [6/5/2017 17:40:56]    if isItemStackable(item2.itemid) then
    [6/5/2017 17:40:56]    doPlayerSendCancel(cid, "This item is stackable")
    [6/5/2017 17:40:56]    doSendMagicEffect(topos, 13)
    [6/5/2017 17:40:56]    return true
    [6/5/2017 17:40:56]    end
    [6/5/2017 17:40:56]    doItemSetAttribute(item2.uid, "rt", "true")
    [6/5/2017 17:40:56]    setPlayerStorageValue(cid, 26786, getPlayerStorageValue(cid, 26786) + 1)
    [6/5/2017 17:40:56]    doItemSetAttribute(item2.uid, "uid", getGlobalStorageValue(6982))
    [6/5/2017 17:40:56]    doPlayerSendCancel(cid, "You used the recovery token on "..getItemName(item2.uid).." to recover it, say !r "..x.slot.."")
    [6/5/2017 17:40:56]    setPlayerStorageValue(cid, x.storage, getGlobalStorageValue(6982))
    [6/5/2017 17:40:56]    doItemSetAttribute(item2.uid, "description", "This item have recovery token")
    [6/5/2017 17:40:56]    setGlobalStorageValue(6982, getGlobalStorageValue(6982) + 1)
    [6/5/2017 17:40:56]    doItemSetAttribute(item2.uid, "time", os.time())
    [6/5/2017 17:40:56]    doSendMagicEffect(topos, 14)
    [6/5/2017 17:40:56]    doRemoveItem(item.uid, 1)
    [6/5/2017 17:40:56]    return true
    [6/5/2017 17:40:56]    end
    [6/5/2017 17:40:56] :onUse
    [6/5/2017 17:40:56] Description:
    [6/5/2017 17:40:56] (LuaInterface::luaDoCreatureSetStorage) Creature not found




    el problema puede ser aqui

    Código:
    if getItemAttribute(item2.uid, "rt") == "true" then

    y aqui

    Código:
    doItemSetAttribute(item2.uid, "rt", "true")

    seguramente no lee de esta forma abra que hacer asi


    Código:
    if getItemAttribute(item2.uid, 'rt') == "true" then

    y aqui

    Código:
    doItemSetAttribute(item2.uid, 'rt', 'true')






    Ver perfil de usuario http://www.tibiaface.com
    me aparecio este error:
    Código:

    [7/5/2017 0:44:3] [Error - Action Interface]
    [7/5/2017 0:44:3] function onUse(cid, item, frompos, item2, topos)
    [7/5/2017 0:44:3]    local slots = {
    [7/5/2017 0:44:3]    [0] = {storage = 36781, slot = 1},
    [7/5/2017 0:44:3]    [1] = {storage = 36782, slot = 2},
    [7/5/2017 0:44:3]    [2] = {storage = 36783, slot = 3},
    [7/5/2017 0:44:3]    [3] = {storage = 36784, slot = 4},
    [7/5/2017 0:44:3]    [4] = {storage = 36785, slot = 5},
    [7/5/2017 0:44:3]    }
    [7/5/2017 0:44:3]    if getItemAttribute(item2.uid, 'rt') == "true" then
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "This item already has a recovery token")
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 13)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    if (not isMoveable(item2.uid)) then
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "This item isn't moveable")
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 13)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    if getPlayerStorageValue(cid, 26786) == -1 then
    [7/5/2017 0:44:3]    setPlayerStorageValue(cid, 26786, 0)
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    x = slots[getPlayerStorageValue(cid, 26786)]
    [7/5/2017 0:44:3]    if getPlayerStorageValue(cid, 26786) == 5 then
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "You have all slots ocuped")
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 13)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    if isItemStackable(item2.itemid) then
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "This item is stackable")
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 13)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    doItemSetAttribute(item2.uid, 'rt', 'true')
    [7/5/2017 0:44:3]    setPlayerStorageValue(cid, 26786, getPlayerStorageValue(cid, 26786) + 1)
    [7/5/2017 0:44:3]    doItemSetAttribute(item2.uid, "uid", getGlobalStorageValue(6982))
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "You used the recovery token on "..getItemName(item2.uid).." to recover it, say !r "..x.slot.."")
    [7/5/2017 0:44:3]    setPlayerStorageValue(cid, x.storage, getGlobalStorageValue(6982))
    [7/5/2017 0:44:3]    doItemSetAttribute(item2.uid, "description", "This item have recovery token")
    [7/5/2017 0:44:3]    setGlobalStorageValue(6982, getGlobalStorageValue(6982) + 1)
    [7/5/2017 0:44:3]    doItemSetAttribute(item2.uid, "time", os.time())
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 14)
    [7/5/2017 0:44:3]    doRemoveItem(item.uid, 1)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3] :onUse
    [7/5/2017 0:44:3] Description:
    [7/5/2017 0:44:3] (LuaInterface::luaDoItemSetAttribute) Invalid data type

    [7/5/2017 0:44:3] [Error - Action Interface]
    [7/5/2017 0:44:3] function onUse(cid, item, frompos, item2, topos)
    [7/5/2017 0:44:3]    local slots = {
    [7/5/2017 0:44:3]    [0] = {storage = 36781, slot = 1},
    [7/5/2017 0:44:3]    [1] = {storage = 36782, slot = 2},
    [7/5/2017 0:44:3]    [2] = {storage = 36783, slot = 3},
    [7/5/2017 0:44:3]    [3] = {storage = 36784, slot = 4},
    [7/5/2017 0:44:3]    [4] = {storage = 36785, slot = 5},
    [7/5/2017 0:44:3]    }
    [7/5/2017 0:44:3]    if getItemAttribute(item2.uid, 'rt') == "true" then
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "This item already has a recovery token")
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 13)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    if (not isMoveable(item2.uid)) then
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "This item isn't moveable")
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 13)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    if getPlayerStorageValue(cid, 26786) == -1 then
    [7/5/2017 0:44:3]    setPlayerStorageValue(cid, 26786, 0)
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    x = slots[getPlayerStorageValue(cid, 26786)]
    [7/5/2017 0:44:3]    if getPlayerStorageValue(cid, 26786) == 5 then
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "You have all slots ocuped")
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 13)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    if isItemStackable(item2.itemid) then
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "This item is stackable")
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 13)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    doItemSetAttribute(item2.uid, 'rt', 'true')
    [7/5/2017 0:44:3]    setPlayerStorageValue(cid, 26786, getPlayerStorageValue(cid, 26786) + 1)
    [7/5/2017 0:44:3]    doItemSetAttribute(item2.uid, "uid", getGlobalStorageValue(6982))
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "You used the recovery token on "..getItemName(item2.uid).." to recover it, say !r "..x.slot.."")
    [7/5/2017 0:44:3]    setPlayerStorageValue(cid, x.storage, getGlobalStorageValue(6982))
    [7/5/2017 0:44:3]    doItemSetAttribute(item2.uid, "description", "This item have recovery token")
    [7/5/2017 0:44:3]    setGlobalStorageValue(6982, getGlobalStorageValue(6982) + 1)
    [7/5/2017 0:44:3]    doItemSetAttribute(item2.uid, "time", os.time())
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 14)
    [7/5/2017 0:44:3]    doRemoveItem(item.uid, 1)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3] :onUse
    [7/5/2017 0:44:3] Description:
    [7/5/2017 0:44:3] (LuaInterface::luaDoCreatureSetStorage) Creature not found

    Ver perfil de usuario

    [Admin] God Maya

    avatar
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:me aparecio este error:
    Código:

    [7/5/2017 0:44:3] [Error - Action Interface]
    [7/5/2017 0:44:3] function onUse(cid, item, frompos, item2, topos)
    [7/5/2017 0:44:3]    local slots = {
    [7/5/2017 0:44:3]    [0] = {storage = 36781, slot = 1},
    [7/5/2017 0:44:3]    [1] = {storage = 36782, slot = 2},
    [7/5/2017 0:44:3]    [2] = {storage = 36783, slot = 3},
    [7/5/2017 0:44:3]    [3] = {storage = 36784, slot = 4},
    [7/5/2017 0:44:3]    [4] = {storage = 36785, slot = 5},
    [7/5/2017 0:44:3]    }
    [7/5/2017 0:44:3]    if getItemAttribute(item2.uid, 'rt') == "true" then
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "This item already has a recovery token")
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 13)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    if (not isMoveable(item2.uid)) then
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "This item isn't moveable")
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 13)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    if getPlayerStorageValue(cid, 26786) == -1 then
    [7/5/2017 0:44:3]    setPlayerStorageValue(cid, 26786, 0)
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    x = slots[getPlayerStorageValue(cid, 26786)]
    [7/5/2017 0:44:3]    if getPlayerStorageValue(cid, 26786) == 5 then
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "You have all slots ocuped")
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 13)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    if isItemStackable(item2.itemid) then
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "This item is stackable")
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 13)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    doItemSetAttribute(item2.uid, 'rt', 'true')
    [7/5/2017 0:44:3]    setPlayerStorageValue(cid, 26786, getPlayerStorageValue(cid, 26786) + 1)
    [7/5/2017 0:44:3]    doItemSetAttribute(item2.uid, "uid", getGlobalStorageValue(6982))
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "You used the recovery token on "..getItemName(item2.uid).." to recover it, say !r "..x.slot.."")
    [7/5/2017 0:44:3]    setPlayerStorageValue(cid, x.storage, getGlobalStorageValue(6982))
    [7/5/2017 0:44:3]    doItemSetAttribute(item2.uid, "description", "This item have recovery token")
    [7/5/2017 0:44:3]    setGlobalStorageValue(6982, getGlobalStorageValue(6982) + 1)
    [7/5/2017 0:44:3]    doItemSetAttribute(item2.uid, "time", os.time())
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 14)
    [7/5/2017 0:44:3]    doRemoveItem(item.uid, 1)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3] :onUse
    [7/5/2017 0:44:3] Description:
    [7/5/2017 0:44:3] (LuaInterface::luaDoItemSetAttribute) Invalid data type

    [7/5/2017 0:44:3] [Error - Action Interface]
    [7/5/2017 0:44:3] function onUse(cid, item, frompos, item2, topos)
    [7/5/2017 0:44:3]    local slots = {
    [7/5/2017 0:44:3]    [0] = {storage = 36781, slot = 1},
    [7/5/2017 0:44:3]    [1] = {storage = 36782, slot = 2},
    [7/5/2017 0:44:3]    [2] = {storage = 36783, slot = 3},
    [7/5/2017 0:44:3]    [3] = {storage = 36784, slot = 4},
    [7/5/2017 0:44:3]    [4] = {storage = 36785, slot = 5},
    [7/5/2017 0:44:3]    }
    [7/5/2017 0:44:3]    if getItemAttribute(item2.uid, 'rt') == "true" then
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "This item already has a recovery token")
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 13)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    if (not isMoveable(item2.uid)) then
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "This item isn't moveable")
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 13)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    if getPlayerStorageValue(cid, 26786) == -1 then
    [7/5/2017 0:44:3]    setPlayerStorageValue(cid, 26786, 0)
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    x = slots[getPlayerStorageValue(cid, 26786)]
    [7/5/2017 0:44:3]    if getPlayerStorageValue(cid, 26786) == 5 then
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "You have all slots ocuped")
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 13)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    if isItemStackable(item2.itemid) then
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "This item is stackable")
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 13)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3]    doItemSetAttribute(item2.uid, 'rt', 'true')
    [7/5/2017 0:44:3]    setPlayerStorageValue(cid, 26786, getPlayerStorageValue(cid, 26786) + 1)
    [7/5/2017 0:44:3]    doItemSetAttribute(item2.uid, "uid", getGlobalStorageValue(6982))
    [7/5/2017 0:44:3]    doPlayerSendCancel(cid, "You used the recovery token on "..getItemName(item2.uid).." to recover it, say !r "..x.slot.."")
    [7/5/2017 0:44:3]    setPlayerStorageValue(cid, x.storage, getGlobalStorageValue(6982))
    [7/5/2017 0:44:3]    doItemSetAttribute(item2.uid, "description", "This item have recovery token")
    [7/5/2017 0:44:3]    setGlobalStorageValue(6982, getGlobalStorageValue(6982) + 1)
    [7/5/2017 0:44:3]    doItemSetAttribute(item2.uid, "time", os.time())
    [7/5/2017 0:44:3]    doSendMagicEffect(topos, 14)
    [7/5/2017 0:44:3]    doRemoveItem(item.uid, 1)
    [7/5/2017 0:44:3]    return true
    [7/5/2017 0:44:3]    end
    [7/5/2017 0:44:3] :onUse
    [7/5/2017 0:44:3] Description:
    [7/5/2017 0:44:3] (LuaInterface::luaDoCreatureSetStorage) Creature not found


    los mismo

    Código:
    doItemSetAttribute(item2.uid, "time", os.time())

    no leee las comillas



    Ver perfil de usuario http://www.tibiaface.com

    Contenido patrocinado


    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.