eu queria que ele remove-se todos os frags, e skull tbm (red e black), menos a white
e que o item sumi-se qndo ele usa-se, e se ele usa-se sem ter frag, n sumi-se
function onUse(cid, item, frompos, item2, topos)
local removesCharges = "no" -- does it remove charges from rune?
local nonremskulls = -- These are the skulls it cant remove. If player has any of these, the rune wont work.
{
red = SKULL_RED,
green = SKULL_GREEN,
black = SKULL_BLACK
}
if isInArray(nonremskulls, getPlayerSkullType(cid)) then
doPlayerSendCancel(cid,"You can't remove this type of skull.")
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)
doPlayerSendTextMessage(cid,27,"Your frags have been removed.")
doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MAGIC_RED)
return TRUE
end
if(removesCharges == "no") then
if(item.type > 1) then
doChangeTypeItem(item.uid, item.type-1)
else
doRemoveItem(item.uid,1)
return TRUE
end
end
end
e tbm queria esclareçer uma duvida sobre o
doPlayerRemoveItem
por exemplo, como fasso pro npc pegar um item, ou outro item?
exemplo: o npc tem q pegar uma blue robe ou uma blue legs pra dar
Pergunta
felipedorgas 25
bom, tenhu o script, +ele n ta funcionando,
eu queria que ele remove-se todos os frags, e skull tbm (red e black), menos a white
e que o item sumi-se qndo ele usa-se, e se ele usa-se sem ter frag, n sumi-se
e tbm queria esclareçer uma duvida sobre o
doPlayerRemoveItem
por exemplo, como fasso pro npc pegar um item, ou outro item?
exemplo: o npc tem q pegar uma blue robe ou uma blue legs pra dar
uma golden armor.
oq presciso fazer?
obrigado
Editado por felipedorgasLink para o comentário
https://xtibia.com/forum/topic/139248-removedor-de-frag/Compartilhar em outros sites
17 respostass a esta questão
Posts Recomendados