Bienvenido a Open Games Community

Únete ahora para acceder a todas nuestras funciones. Una vez que te registres e inicies sesión, podrás crear temas, responder a hilos existentes, valorar la reputación de otros miembros y muchísimo más. Además, es rápido y totalmente gratuito; ¿a qué esperas?

RevScript TalkAction /tc

Alex

Administrador
Dev
Registrado
1 Sep 2021
Mensajes
2.362
Puntuación de reacción
28.397
Puntos
707
Hola a todos,

Aqui tienen un RevScript para dar Tibia Coins a los players usando el comando /tc nombre del jugador, monto de tibia Coins
Script por otservbr

PHP:
local tibiaCoins = TalkAction("/tc")

function tibiaCoins.onSay(player, words, param)   

    if not player:getGroup():getAccess() or player:getAccountType() < ACCOUNT_TYPE_GOD then
        return true
    end
    local usage = "/tc PLAYER NAME,TC AMOUNT"
    if param == "" then
        player:sendCancelMessage("Command param required. Usage: ".. usage)
        return false
    end

    local split = param:split(",")
    if not split[2] then
        player:sendCancelMessage("Insufficient parameters. Usage: ".. usage)
        return false
    end

    local target = Player(split[1])
    if not target then
        player:sendCancelMessage("A player with that name is not online.")
        return false
    end
    --trim left
    split[2] = split[2]:gsub("^%s*(.-)$", "%1")
    
    player:sendCancelMessage("Added " .. split[2] .. " tibia coins to the character '" .. target:getName() .. "'.")
    target:sendCancelMessage("Received " .. split[2] .. " tibia coins!")
    target:addTibiaCoins(tonumber(split[2]))
    target:getPosition():sendMagicEffect(CONST_ME_HOLYAREA)


end

tibiaCoins:separator(" ")
tibiaCoins:register()
 
shape1
shape2
shape3
shape4
shape5
shape6
Arriba