Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

Não testei

 

local exstorage = 1499
local COST = 8 -- Valor necessário para tirar red
local moeda = 2160 -- moeda que será removida
local REMOVE_FRAGS = "yes" -- "yes" ou "no" // para retirar todos os frags
local EFFECT = CONST_ME_YELLOW_RINGS -- efeito usado quando tirar o red
local battle = true -- players deve estar sem battle (true or false)


function onSay(cid, words, param, channel)
        if (exhaustion.check(cid, exstorage) == true) then
                doPlayerSendCancel(cid, "You are exhausted")
                return true
        end
         if battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then
                doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não pode tirar red skull com battle.")
                return TRUE
        end
        if getCreatureSkullType(cid) == SKULL_RED then
                local query = db.getResult("SELECT `premdays` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
                local points = query:getDataInt("premdays")
                    if getPlayerItemCount(cid,moeda) >= COST then
                        db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
                        doCreatureSetSkullType(cid,0)
                        doPlayerSendTextMessage(cid, 27, "Sua red skull foi removida!")
                        doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
                        doPlayerSetSkullEnd(cid, 0, getPlayerSkullType(cid))
                        doPlayerRemoveItem(cid,moeda,COST)
                        doSendMagicEffect(getPlayerPosition(cid), effect)
                        doRemoveCreature(cid)
                else
                        doPlayerSendCancel(cid, "Você precisa de " ..COST.. " crystal coins para remover a red skull.")
                end
        else
                doPlayerSendCancel(cid, "Você não está red skull.")
        end
        exhaustion.set(cid, exstorage, 30)

        if (query ~= nil) then
                query:free()
        end

        return TRUE
end

Att,
Grafit.

  • Respostas 15
  • Visualizações 2.3k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Esse tira 8 dias de premium account e remove o red e os frags..   se quiser mudar pra dinheiro é só fazer algumas alterações   local exstorage = 1499 -- quantos dias de premium precisa para tira

  • local exstorage = 1499 -- quantos dias de premium precisa para tirar a red skull local COST = 8000000 -- "yes" ou "no" // para retirar todos os frags local REMOVE_FRAGS = "yes" -- efeto usado quando t

Postado
  • Autor

Sim, mais ali no caso para remover o red skull ela precisa de 8 crystal ne, e se a pessoa nao tiver em crystal na bp, tiver por exemplo em platinum, o comando vai funcionar normal?

 

                                                           

55f6tc.gif                     

Postado

local exstorage = 1499
-- quantos dias de premium precisa para tirar a red skull
local COST = 8000000
-- "yes" ou "no" // para retirar todos os frags
local REMOVE_FRAGS = "yes"
-- efeto usado quando tirar o red
local EFFECT = CONST_ME_YELLOW_RINGS
local config = {
battle = true, -- players deve estar sem battle (true or false)
}
 
function onSay(cid, words, param, channel)
   if (exhaustion.check(cid, exstorage) == true) then
      return doPlayerSendCancel(cid, "You are exhausted")
   end
 
   if config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then
      return doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não pode tirar red skull com battle.")
   end
 
   if getCreatureSkullType(cid) == SKULL_RED then
 
      if doPlayerRemoveMoney(cid, COST) then
         doCreatureSetSkullType(cid,0)
         doPlayerSendTextMessage(cid, 27, "Sua red skull foi removida!")
         doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
         doPlayerSetSkullEnd(cid, 0, getPlayerSkullType(cid))
         doSendMagicEffect(getPlayerPosition(cid), effect)
         doRemoveCreature(cid)
      else
         doPlayerSendCancel(cid, "Você precisa de " ..COST.. " gold coins para remover a red skull.")
      end
   else
      doPlayerSendCancel(cid, "Você não está red skull.")
   end
 
   exhaustion.set(cid, exstorage, 30)
 
   return true
end
 

-"Supra Omnes Lux Lucis"

- Acima de todos brilha a Luz -

5VGnDyBz.png

Postado
  • Autor

Não funciono.

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

 

                                                           

55f6tc.gif                     

  • 3 weeks later...
Postado
  • Autor
local exstorage = 1499
-- quantos dias de premium precisa para tirar a red skull
local COST = 8000000
-- "yes" ou "no" // para retirar todos os frags
local REMOVE_FRAGS = "yes"
-- efeto usado quando tirar o red
local EFFECT = CONST_ME_YELLOW_RINGS
local config = {
battle = true, -- players deve estar sem battle (true or false)
}
 
function onSay(cid, words, param, channel)
   if (exhaustion.check(cid, exstorage) == true) then
      return doPlayerSendCancel(cid, "You are exhausted")
   end
 
   if config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then
      return doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não pode tirar red skull com battle.")
   end
 
   if getCreatureSkullType(cid) == SKULL_RED then
 
      if doPlayerRemoveMoney(cid, COST) then
         doCreatureSetSkullType(cid,0)
         doPlayerSendTextMessage(cid, 27, "Sua red skull foi removida!")
         doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
         doPlayerSetSkullEnd(cid, 0, getPlayerSkullType(cid))
         doSendMagicEffect(getPlayerPosition(cid), effect)
         doRemoveCreature(cid)
      else
         doPlayerSendCancel(cid, "Você precisa de " ..COST.. " gold coins para remover a red skull.")
      end
   else
      doPlayerSendCancel(cid, "Você não está red skull.")
   end
 
   exhaustion.set(cid, exstorage, 30)
 
   return true
end
 

Ele não funciono.

 

                                                           

55f6tc.gif                     

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.7k

Informação Importante

Confirmação de Termo