Postado Março 11, 2014 11 anos 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.
Postado Março 11, 2014 11 anos 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?
Postado Março 12, 2014 11 anos 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 -
Postado Março 12, 2014 11 anos Autor Não funciono. Editado Abril 1, 2014 11 anos por Rodrigo0lg (veja o histórico de edições)
Postado Abril 1, 2014 11 anos 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.
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.