Ir para conteúdo

Featured Replies

Postado
Citar

local talk = TalkAction("!stats")

 

function talk.onSay(player, words, param)
if player:getPremiumDays() > 0 then
bonus = 30
else
bonus = 0
end
if player:getStorageValue(15500) == 1 then
bonus1 = 25
else
bonus1 = -25
end

 

player:popupFYI("=========PLAYER INFO=========" ..
"\nBonus de Experiência: ".. bonus + bonus1 .. "%" ..)
return false
end

talk:register()
 

 

Olá tenho esse scripts de mostrar bônus de Experiência do player só que eu precisava q o bônus = 30 se juntasse só com bonus1 = 25 e o bônus = 0 se juntasse só com o bonus1 = -25 se alguém puder me ajuda agradeço.

Postado
Em 23/11/2020 em 03:39, amarelax disse:

 

Olá tenho esse scripts de mostrar bônus de Experiência do player só que eu precisava q o bônus = 30 se juntasse só com bonus1 = 25 e o bônus = 0 se juntasse só com o bonus1 = -25 se alguém puder me ajuda agradeço.

Usa :

Spoiler

function onSay(cid, words, param, channel)
    if(param == '') then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
        return true
    end

    local pid = getPlayerByNameWildcard(param)
    if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not found.")
        return true
    end

    local tmp = {accountId = getPlayerAccountId(pid), ip = getPlayerIp(pid)}
    local pos = getCreaturePosition(pid)
    doPlayerPopupFYI(cid, "Information about player" ..
        "\nName: " .. getCreatureName(pid) ..
        "\nGUID: " .. getPlayerGUID(pid) ..
        "\nGroup: " .. getPlayerGroupName(pid) ..
        "\nAccess: " .. getPlayerAccess(pid) ..
        "\nVocation: " .. getVocationInfo(getPlayerVocation(pid)).name ..
        "\nStatus:" ..
            "\nLevel - " .. getPlayerLevel(pid) .. ", Magic Level - " .. getPlayerMagLevel(pid) .. ", Speed - " .. getCreatureSpeed(pid) ..
            "\nHealth - " .. getCreatureHealth(pid) .. " / " .. getCreatureMaxHealth(pid) .. ", Mana - " .. getCreatureMana(pid) .. " / " .. getCreatureMaxMana(pid) ..
            "\nSkills:" ..
            "\nFist - " .. getPlayerSkillLevel(pid, SKILL_FIST) .. ", Club - " .. getPlayerSkillLevel(pid, SKILL_CLUB) .. ", Sword - " .. getPlayerSkillLevel(pid, SKILL_SWORD) .. ", Axe - " .. getPlayerSkillLevel(pid, SKILL_AXE) ..
            "\nDistance - " .. getPlayerSkillLevel(pid, SKILL_DISTANCE) .. ", Shielding - " .. getPlayerSkillLevel(pid, SKILL_SHIELD) .. ", Fishing - " .. getPlayerSkillLevel(pid, SKILL_FISHING) ..
        "\nCash:" ..
            "\nCrystal - " .. getPlayerItemCount(pid, 2160) .. ", Platinum - " .. getPlayerItemCount(pid, 2152) .. ", Gold - " .. getPlayerItemCount(pid, 2148) ..
            "\nBalance: " .. getPlayerBalance(pid) ..
        "\nName: " .. getPlayerAccount(pid) ..
        "\nID: " .. tmp.accountId ..
    return true
end
 

Talkaction.xml add:


    <talkaction log="yes"  words="/info" event="script" value="playerinfo.lua"/>

Editado por Nysman (veja o histórico de edições)

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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo