JO
action

item que não cai nada do corpo com black e red skull

Por joseanpereira, 09 de jun. de 2013 em Actions e Talkactions

9
958
09 de junho de 2013 às 10:15

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

EnselfE
09 de junho de 2013 às 13:29

Não entendi muito bem voce quer um item que não drope os item se morrer black ou red?

09 de junho de 2013 às 13:37

sim mano se o red ou o black morre não e para cair nada se ele estiver com o item

EnselfE
09 de junho de 2013 às 13:58

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

09 de junho de 2013 às 14:22

mano esta dando erro quando abre aparece failed nem chega a abrir o otserv

EnselfE
09 de junho de 2013 às 14:36

 

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

 

 

09 de junho de 2013 às 15:00

mano e para colocar onde? esse Scripts ?

 

mano onde eu coloco o ID do item ai ?

EnselfE
09 de junho de 2013 às 15:08

Creatures scripts.

09 de junho de 2013 às 15:30

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