Ir para conteúdo

Featured Replies

Postado
local corpse_ids = {
    [0] = 3065,
    [1] = 3058
}
 
 
function onPrepareDeath(cid, deathList)
    if getCreatureSkullType(cid) < 6 then
        if getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 11387 then
        doCreatureSetDropLoot(cid, false)
        doPlayerSetLossPercent(cid, experience, 5)
        doItemSetAttribute(doCreateItem(corpse_ids[getPlayerSex(cid)], 1, getThingPos(cid)), "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by " .. (isMonster(deathList[1]) and "a " .. string.lower(getCreatureName(deathList[1])) or isCreature(deathList[1]) and getCreatureName(deathList[1]) or "a field item") .. "")
 
        end
    end
    return true
    end
    

 

 

    <item id="11387" name="lucky clover amulet">
        <attribute key="description" value="It is rumoured to bring you good luck! Luck full blees." />
        <attribute key="weight" value="150" />
        <attribute key="charges" value="5" />
        <attribute key="showattributes" value="1" />
        <attribute key="slotType" value="necklace" />
        <attribute key="preventDrop" value="1" />

 

 

quero que ele tenha 5 cargas ,porque quando o player morre 5 vezes não ta sumindo ele .   item  usado em creaturescripts.

 

Postado
local corpse_ids = {[0] = 3065,[1] = 3058}
function onPrepareDeath(cid, deathList)
local colar = getPlayerSlotItem(cid, CONST_SLOT_NECKLACE)
if getCreatureSkullType(cid) < 6 and colar.itemid == 11387 then
        doCreatureSetDropLoot(cid, false)
        doPlayerSetLossPercent(cid, experience, 5)
        doItemSetAttribute(doCreateItem(corpse_ids[getPlayerSex(cid)], 1, getThingPos(cid)), "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by " .. (isMonster(deathList[1]) and "a " .. string.lower(getCreatureName(deathList[1])) or isCreature(deathList[1]) and getCreatureName(deathList[1]) or "a field item") .. "")
 	if colar.type > 1 then
		doChangeTypeItem(colar.uid, colar.type - 1)
	else
		doRemoveItem(colar.uid)
	end
end
return true
end

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Postado
  • Autor
2 horas atrás, Vodkart disse:

local corpse_ids = {[0] = 3065,[1] = 3058}
function onPrepareDeath(cid, deathList)
local colar = getPlayerSlotItem(cid, CONST_SLOT_NECKLACE)
if getCreatureSkullType(cid) < 6 and colar.itemid == 11387 then
        doCreatureSetDropLoot(cid, false)
        doPlayerSetLossPercent(cid, experience, 5)
        doItemSetAttribute(doCreateItem(corpse_ids[getPlayerSex(cid)], 1, getThingPos(cid)), "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by " .. (isMonster(deathList[1]) and "a " .. string.lower(getCreatureName(deathList[1])) or isCreature(deathList[1]) and getCreatureName(deathList[1]) or "a field item") .. "")
 	if colar.type > 1 then
		doChangeTypeItem(colar.uid, colar.type - 1)
	else
		doRemoveItem(colar.uid)
	end
end
return true
end

 

mano coloca o que no item.xml ?

o meu ta assim morri 5 vezes e não sumiu o colar.!

 

    <item id="11387" name="lucky clover amulet">
        <attribute key="description" value="It is rumoured to bring you good luck! Luck full blees." />
        <attribute key="weight" value="150" />
        <attribute key="charges" value="5" />
        <attribute key="showattributes" value="1" />
        <attribute key="slotType" value="necklace" />
    </item>

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo