Não entendi muito bem voce quer um item que não drope os item se morrer black ou red?
- Fórum
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- item que não cai nada do corpo com black e red skull
item que não cai nada do corpo com black e red skull
Por joseanpereira, 09 de jun. de 2013 em Actions e Talkactions
info
Grupo: Barão
Registrado: 29/03/13
Posts: 215
Reputação: +4
Char no Tibia: gm

sim mano se o red ou o black morre não e para cair nada se ele estiver com o item
1° passo
vá até data\creaturescripts\scripts e crie um arquivo.lua e renomeie para preparedeath.lua
dentro coloque:
function onDeath(cid, corpse, deathList)
if (getPlayerSlotItem(cid, 2).itemid == 2196) and getPlayerSkullType(cid) >= 10 then
doPlayerRemoveItem(cid, 2196, 1)
doCreatureSetDropLoot(cid, false)
end
return true
end
em data\creaturescripts\scripts\login.lua adiciona a linha:
registerCreatureEvent(cid, "SkullAmulet")
creaturescripts.xml adicione:
<event type="death" name="SkullAmulet" event="script" value="preparedeath.lua"/>
2° - passo
em items.xml substitua
<item id="2196" article="a" name="broken amulet"> [/s
<attribute key="weight" value="420" />
<attribute key="slotType" value="necklace" />
</item>
Por:
<item id="2196" article="a" name="Red Skull Amulet">
<attribute key="weight" value="420" />
<attribute key="slotType" value="necklace" />
</item>
Editado Junho 9 por Enself
info
Grupo: Barão
Registrado: 29/03/13
Posts: 215
Reputação: +4
Char no Tibia: gm

mano esta dando erro quando abre aparece failed nem chega a abrir o otserv
local config = {
redSkullAmulet = 1,
usarVipSystem = "disabled",
vipStora = 1,
premium = "disable", --
newLossPercent = 0,
}
function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
if not isPlayer(cid) then
return true or 0
end
if getPlayerItemCount(cid, config.redSkullAmulet) >= 1 then
if(getPlayerStorageValue(cid, config.vipStora) >= 1) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, config.newLossPercent)
elseif(config.premium == "enabled" and config.usarVipSystem == "disabled" and getPlayerPremiumDays(cid) >= 1) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, config.newLossPercent)
end
end
end
Tag
<event type="death" name="RedSkullAmulet" event="script" value="nomedoscript.lua"/>
info
Grupo: Barão
Registrado: 29/03/13
Posts: 215
Reputação: +4
Char no Tibia: gm

mano e para colocar onde? esse Scripts ?
mano onde eu coloco o ID do item ai ?
Creatures scripts.
info
Grupo: Barão
Registrado: 29/03/13
Posts: 215
Reputação: +4
Char no Tibia: gm

não esta dando erro mais ainda os item cai quando um player com red ou black skull morre



info
Grupo: Barão
Registrado: 29/03/13
Posts: 215
Reputação: +4
Char no Tibia: gm
quero um item que não deixe cair nada do corpo de reds e blacks
gente se a pessoa não tiver red e nem black e morrer sem blass e para cair normal o item e para funcionar apenas se tiver com red ou black skull