Ir para conteúdo

Featured Replies

Postado

instalei o system de ppoints gostaria de um talkaction para vender um x pokémon e remover x quantia de points

 

segue o system ppoints usado:

 

050.function.lua

Spoiler

function getPlayerVipPoints(cid)
    local Info = db.getResult("SELECT `premium_points` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. "")
        if Info:getID() ~= LUA_ERROR then
        local Points= Info:getDataInt("premium_points")
        Info:free()
        return Points
    end
     return LUA_ERROR
end

function doPlayerAddVipPoints(cid, points)
    local dif = getPlayerVipPoints(cid) + points
    if dif >= 0 then
        db.query("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. points .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
        return TRUE
    end
    return FALSE
end

function doPlayerRemoveVipPoints(cid, points)
    local dif = getPlayerVipPoints(cid) - points
    if dif >= 0 then
        db.query("UPDATE `accounts` SET `premium_points` = `premium_points` - " .. points .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
        return TRUE
    end
    return FALSE
end

 

Postado

Bom eu posso tentar te ajudar, mas como nunca mechi com poketibia preciso que você me confirme algumas coisas por exemplo:

Um pokemon é 1 item? ou um outifit o que é?

 

@This life is filled with hurt

When happiness doesn't work

Trust me and take my hand

When the lights go out you will understand

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo