Use Este Sistema do Doidin!
Data>Actions>Scripts crie uma pasta.lua chamada limpador e coloque isso
-- [( 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 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
A Tag , nao Sei que item Voce quer ! Entao Acho que Tu Consegue Fazer , se nao consiguir fale q eu mando!







info
Grupo: Barão
Registrado: 01/06/10
Posts: 230
Reputação: +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
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 ende 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 Agosto 11 por felipedorgas