RevScript Crear Tier Item- Forge Exaltation -TalkAction

Alex

Miembro del equipo
Webdesigner
LV
58
 
Awards
38
Hola a todos,

Aquí les comparto el talkaction de crear un item tier con el god,
el archivo lo pondremos dentro de data/scripts/talkactions/god,

Ejemplo: /tieritem alicorn headguard, 5

Código Lua:
local tier = TalkAction("/tieritem")


function tier.onSay(player, words, param)
    if not player:getGroup():getAccess() or player:getAccountType() < ACCOUNT_TYPE_GOD then
        return true
    end
    local split = param:split(",")
    local itemType = ItemType(split[1])
    if itemType:getId() == 0 then
        itemType = ItemType(tonumber(split[1]))
        if not tonumber(split[1]) or itemType:getId() == 0 then
            player:sendCancelMessage("There is no item with that id or name.")
            return false
        end
    end
    local tier = tonumber(split[2])
    if tier <= 0 or tier == nil or tier > 10 then
        player:sendCancelMessage("Invalid tier count.")
        return false
    end
    player:addItem(itemType:getId(), 1):setTier(tier)
    return false
end

tier:separator("")
tier:register()
 

Alex

Miembro del equipo
Webdesigner
LV
58
 
Awards
38
donde pego todo eso? y ese ejemplo no entiendo
Hola está indicado en qué lugar se pone el archivo es un talkAction que lo que hace es crear un ítem con tier deseado hay que ver si el servidor 12.90+ que usas tiene esa función y si tiene forgé système a lo contrario no te servira.
 

ServerAdrian09

Miembro
LV
2
 
Awards
6
Hola está indicado en qué lugar se pone el archivo es un talkAction que lo que hace es crear un ítem con tier deseado hay que ver si el servidor 12.90+ que usas tiene esa función y si tiene forgé système a lo contrario no te servira.
Sirve para el server custom de la pagina porque lo hice y no me funciono =/
 

acxel12

Miembro
LV
13
 
Awards
14
Hola a todos,

Aquí les comparto el talkaction de crear un item tier con el god,
el archivo lo pondremos dentro de data/scripts/talkactions/god,

Ejemplo: /tieritem alicorn headguard, 5

Código Lua:
local tier = TalkAction("/tieritem")


function tier.onSay(player, words, param)
    if not player:getGroup():getAccess() or player:getAccountType() < ACCOUNT_TYPE_GOD then
        return true
    end
    local split = param:split(",")
    local itemType = ItemType(split[1])
    if itemType:getId() == 0 then
        itemType = ItemType(tonumber(split[1]))
        if not tonumber(split[1]) or itemType:getId() == 0 then
            player:sendCancelMessage("There is no item with that id or name.")
            return false
        end
    end
    local tier = tonumber(split[2])
    if tier <= 0 or tier == nil or tier > 10 then
        player:sendCancelMessage("Invalid tier count.")
        return false
    end
    player:addItem(itemType:getId(), 1):setTier(tier)
    return false
end

tier:separator("")
tier:register()
No funciona en el custom map rl :/
 
Arriba