não entendi
ele tira os frags
mais não tira as skull?
ou ao contrario?
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

não entendi
ele tira os frags
mais não tira as skull?
ou ao contrario?
info
Grupo: Barão
Registrado: 01/06/10
Posts: 230
Reputação: +25

ele tira todos os frags e se eu tiver de white skull, ele tira a white skull,
+ se eu to com red skull, ele não tira,
"You don't remover your frags and skulls"
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

function onUse(cid, item, fromPosition, item2, toPosisition)
if getCreatureSkullType(cid) == SKULL_RED or getCreatureSkullType(cid) == SKULL_BLACK 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)
doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
doSendMagicEffect(getPlayerPosition(cid), 26)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,"You don't remover your frags and skulls.")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
return TRUE
end
info
Grupo: Barão
Registrado: 01/06/10
Posts: 230
Reputação: +25

agora só tira os frags e red skull quando ta red skull.
quando só tem frag e white skull, ele n tira
Editado Agosto 31 por felipedorgas
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

rs esqueci da white xD
function onUse(cid, item, fromPosition, item2, toPosisition)
if getCreatureSkullType(cid) == SKULL_WHITE or getCreatureSkullType(cid) == SKULL_RED or getCreatureSkullType(cid) == SKULL_BLACK 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)
doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
doSendMagicEffect(getPlayerPosition(cid), 26)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,"You don't remover your frags and skulls.")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
return TRUE
end
info
Grupo: Barão
Registrado: 01/06/10
Posts: 230
Reputação: +25

deu, vlw ![]()
rep.
aproveitando o topico,
eu queria tirar as mensagens, de quem loga e quem o seu double exp.
eu tentei tira uma parte e bugo, ai tirei as 2 mensagem, + fico apareçendo a hora em azul, no lugar aonde ia ter a mensagem ![]()
como posso deixa sem nada?
function onLogin(cid)
local rate = 1.5 -- 50%
local config = {vip = isVip(cid)}
if (config.vip == TRUE) then
doPlayerSetExperienceRate(cid, rate)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.welvip)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, config.not_vip)
end
return TRUE
end
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

function onLogin(cid) local rate = 1.5 -- 50% if isVip(cid) == TRUE then doPlayerSetExperienceRate(cid, rate) end return TRUE end
info
Grupo: Barão
Registrado: 01/06/10
Posts: 230
Reputação: +25

obg + uma fez, duvida sanada
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

reportado
info
Grupo: Conde
Registrado: 31/10/08
Posts: 871
Reputação: +199
Char no Tibia: Luis Felipe Knight

Tópico movido para a subseção referente a esta área.
Caso o usuário precise de ajuda avançada, deverá utilizar o mesmo tópico.
Abraços.
Vodkart, estou com problemas em meu servidor com a contagem de frags, tipo, quando seu tempo de redskull acabar e você voltar a matar apenas 1 player, a redskull volta. Daí eu pesquisei como fazia para remover essa skull e achei esse script que você postou aqui no fórum, já com o bug da white removido. Em fim, esse script não tem bug, tá 100%, mas tipo, se o player tiver acabado de pegar red skull ou black skull ele vai poder usar a potion, daí vai ficar muito fácil, porque ele não vai ter chance de morrer red skull ou black skull, o que eu quero é: ele só vai poder usar a potion em área de protect zone, em outras palavras, ele não vai poder usar ela se tiver atacado alguém, ele vai ter que esperar a pz dele sair para usar a potion. Estou usando o script abaixo.
<action itemid="7439" event="script" value="liquids/removefrags.lua"/>
Postado 31 agosto 2010 - 04:19
rs esqueci da white xD
function onUse(cid, item, fromPosition, item2, toPosisition)
if getCreatureSkullType(cid) == SKULL_WHITE or getCreatureSkullType(cid) == SKULL_RED or getCreatureSkullType(cid) == SKULL_BLACK 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)
doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
doSendMagicEffect(getPlayerPosition(cid), 26)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,"You don't remover your frags and skulls.")
doSendMagicEffect(getPlayerPosition(cid), 2)
end
return TRUE
end
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

function onUse(cid, item, fromPosition, item2, toPosisition)
if getCreatureSkullType(cid) < 3 then
return doPlayerSendCancel(cid,"You don't remover your frags and skulls.")
elseif getTilePzInfo(getCreaturePosition(cid)) == FALSE then
return doPlayerSendCancel(cid,"você precisa estar em protection zone.")
elseif getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then
return doPlayerSendCancel(cid,"Você precisa estar sem battler.")
end
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid, 0)
doCreatureSay(cid, "Your frags and skulls is cleaned!", 19)
doSendMagicEffect(getPlayerPosition(cid), 26)
doRemoveItem(item.uid, 1)
return TRUE
end
Perfeito mano, editei o script um pouquinho, troquei as mensagens do inglês para o português. Então vamos lá, no que você me passou, você colocou para remover somente red ou black skull (quando o player estiver em protect zone e sem battle), mas, se o player não tiver red ou black skull ele não vai conseguir usar, porque o iten não serve para remover frag, em outras palavras, se você tiver 1 frag, ele não vai remover, porque ele só remove red ou black skull, ou seja, isso é ótimo. Daí eu achei outro script e editei um pouco, esse script só remove os frags e não remove nenhum tipo de skull, em outras palavras, não remove red ou black skull e tipo, o player também só vai conseguir usar esse iten se estiver em protect zone e sem battle, porem, o único erro dele é: eu consigo usar ele mesmo se não tiver frag algum no meu character, tipo, se eu tiver com 0 frag e usar ele, eu vou conseguir usar normalmente (como se eu tivesse 1 frag) e logicamente vou gastá-lo ele de besta. O que eu quero é: tem como você colocar ele como o script que você me passou acima? Por exemplo: no script de cima, como eu já expliquei, você não pode usar ele se não tiver red ou black skull. Eu vou explicar melhor ainda: se eu já estiver com 0 frag, eu não vou conseguir mais usar ele, mas apartir do momento que eu estiver com 1 frag, eu vou conseguir usar, entendeu? Ah, tem como colocar ele para remover apenas 1 frag também? Tipo, se eu tiver 4 frags e usar o iten eu passaria a ter somente 3 frags. Ah, e aproveitando esse pedido, tem como você colocar tempo no script de remover skull? Tipo, 5 horas para usar novamente o script de remover skull, entende? Isso serve pro player não ficar usando direto.
Script que você ainda vai editar (remover frags):
-- [( Script created by Doidin for XTibia.com )] --
function onUse(cid, item, fromPosition, item2, toPosisition)
local rskulls = {green = SKULL_GREEN, red = SKULL_RED, black = SKULL_BLACK}
if getTilePzInfo(getCreaturePosition(cid)) == FALSE then
return doPlayerSendCancel(cid,"Você precisa está em protect zone.")
elseif getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then
return doPlayerSendCancel(cid,"Você não pode estar com battle.")
elseif isInArray(rskulls, getPlayerSkullType(cid)) then
doPlayerSendCancel(cid,"Você não pode remover red ou black skull, você só pode remover frags.")
doSendMagicEffect(getPlayerPosition(cid), 2)
else
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSay(cid, "Você removeu seus frags!", 19)
doSendMagicEffect(getPlayerPosition(cid), 26)
doRemoveItem(item.uid, 1)
return TRUE
end
end
Script que você já editou, só falta colocar o tempo (remover skull):
function onUse(cid, item, fromPosition, item2, toPosisition)
if getCreatureSkullType(cid) < 3 then
return doPlayerSendCancel(cid,"Você não está red ou black skull.")
elseif getTilePzInfo(getCreaturePosition(cid)) == FALSE then
return doPlayerSendCancel(cid,"Você precisa está em protect zone.")
elseif getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then
return doPlayerSendCancel(cid,"Você não pode estar com battle.")
end
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid, 0)
doCreatureSay(cid, "Sua red ou black skull foi removida com sucesso.", 19)
doSendMagicEffect(getPlayerPosition(cid), 26)
doRemoveItem(item.uid, 1)
return TRUE
end
Muito obrigado Vodkart, me ensina a te dar REP+?
Editado Março 31 por coriel
info
Grupo: Barão
Registrado: 01/06/10
Posts: 230
Reputação: +25
galera, o script ta certinho, tira os frags,
só não ta tirando red skull (6 frags)
obrgado.
function onUse(cid, item, fromPosition, item2, toPosisition) local rskulls = {green = SKULL_GREEN, red = SKULL_RED, black = SKULL_BLACK} if isInArray(rskulls, getPlayerSkullType(cid)) then doPlayerSendCancel(cid,"You don't remover your frags and skulls.") doSendMagicEffect(getPlayerPosition(cid), 2) else db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")") doCreatureSetSkullType(cid, 0) doCreatureSay(cid, "Your frags and skulls is cleaned!", 19) doSendMagicEffect(getPlayerPosition(cid), 26) doRemoveItem(item.uid, 1) return TRUE end end