Item Para Remover Black E Red Skull

benibarreto2
em Scripts

benibarreto2

Vivendo e Aprendendo
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 18/07/10Posts: 22

Tipo do script:Remover Black skull e red skull

Protocolo (versão do Tibia):8.6

Servidor utilizado: Mix Yourots 0.0.4

Nível de experiência: iniciante

Adicionais/Informações:

 

Queria um item que removesse o black e o red skull

mais seria um item pra kda skull por exemplo um pro red skull e um pro black skull

 

Por favor mim ajudem vlws

 

By:DangeX

Te Ajudei? Gosta de mim? Entao Da um Clikezinho Ali embaixo no add.png e Use Minha Fan Bar!

dangerfan.png

By moskitinho

Vodkart

Sumus Validus
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 21/05/10Posts: 3406Gênero: Masculino

Red skull

 

 

function onUse(cid, item, fromPosition, item2, toPosisition) 

local config={
RemoveOnUse = "yes" -- remover o item ao usar ("yes" or "no") 
}

if getCreatureSkullType(cid) == SKULL_RED 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)
if (config.RemoveOnUse == "yes") then 
doRemoveItem(item.uid, 1)
end
else
doPlayerSendCancel(cid,"You don't have red skull.") 
doSendMagicEffect(getPlayerPosition(cid), 2) 
end 
return TRUE
end

 

 

 

 

Black Skull

 

 

function onUse(cid, item, fromPosition, item2, toPosisition) 

local config={
RemoveOnUse = "yes" -- remover o item ao usar ("yes" or "no") 
}

if 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)
if (config.RemoveOnUse == "yes") then 
doRemoveItem(item.uid, 1)
end
else
doPlayerSendCancel(cid,"You don't have Black Skull.") 
doSendMagicEffect(getPlayerPosition(cid), 2)
end 
return TRUE
end

 

 

bossisg.png

benibarreto2

Vivendo e Aprendendo
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 18/07/10Posts: 22

Red skull

 

 

function onUse(cid, item, fromPosition, item2, toPosisition) 

local config={
RemoveOnUse = "yes" -- remover o item ao usar ("yes" or "no") 
}

if getCreatureSkullType(cid) == SKULL_RED 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)
if (config.RemoveOnUse == "yes") then 
doRemoveItem(item.uid, 1)
end
else
doPlayerSendCancel(cid,"You don't have red skull.") 
doSendMagicEffect(getPlayerPosition(cid), 2) 
end 
return TRUE
end

 

 

 

 

Black Skull

 

 

function onUse(cid, item, fromPosition, item2, toPosisition) 

local config={
RemoveOnUse = "yes" -- remover o item ao usar ("yes" or "no") 
}

if 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)
if (config.RemoveOnUse == "yes") then 
doRemoveItem(item.uid, 1)
end
else
doPlayerSendCancel(cid,"You don't have Black Skull.") 
doSendMagicEffect(getPlayerPosition(cid), 2)
end 
return TRUE
end

 

 

 

 

mais tipo aonde eu boto o item que eu vou querer ?

Te Ajudei? Gosta de mim? Entao Da um Clikezinho Ali embaixo no add.png e Use Minha Fan Bar!

dangerfan.png

By moskitinho

Vodkart

Sumus Validus
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 21/05/10Posts: 3406Gênero: Masculino

os script sao em Actions/scritps

 

ai dps vc vai em actions.xml e adiciona

 

<action itemid="ITEM ID" script="nome do arquivo red skull.lua" />

 

<action itemid="ITEM ID" script="nome do arquivo black skull.lua" />

bossisg.png

benibarreto2

Vivendo e Aprendendo
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 18/07/10Posts: 22

Vlw ae vodkart +REP pra vc =D

 

Resolvido !

Te Ajudei? Gosta de mim? Entao Da um Clikezinho Ali embaixo no add.png e Use Minha Fan Bar!

dangerfan.png

By moskitinho

joseanpereira

avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 29/03/13Posts: 215Char no Tibia: gm

mano poderia fazer uma para ot 9.83 para min por favor

Lucasfelipexp

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 25/09/13Posts: 5

Pode ser os ID iguais para o redskull eo blackskull ?

MarioFerreira

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 04/02/14Posts: 5

vou testar para 9.83 depois posto ai!