BE

Item Para Remover Black E Red Skull

Por benibarreto2, 30 de jul. de 2010 em Scripts

tibia
script
otserv
8
6.4k
benibarreto2B
30 de julho de 2010 às 18:59

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

VodkartV
31 de julho de 2010 às 00:04

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

 

 

Editado Julho 31 por Vodkart

benibarreto2B
31 de julho de 2010 às 00:47

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 ?

VodkartV
31 de julho de 2010 às 00:58

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" />

benibarreto2B
31 de julho de 2010 às 08:52

Vlw ae vodkart +REP pra vc =D

 

Resolvido !

Editado Julho 31 por DangerX

2 anos depois...
26 de maio de 2013 às 13:38

mano poderia fazer uma para ot 9.83 para min por favor

5 meses depois...
28 de outubro de 2013 às 15:30

Pode ser os ID iguais para o redskull eo blackskull ?

4 meses depois...
11 de fevereiro de 2014 às 13:46

vou testar para 9.83 depois posto ai!