... leia meo post abaixo
info
Grupo: Visconde
Registrado: 11/08/10
Posts: 477
Reputação: +175
Gênero: Masculino

Editado Outubro 18 por Eskylo
Continua voltando ao level 1 ![]()
Abrass
info
Grupo: Visconde
Registrado: 11/08/10
Posts: 477
Reputação: +175
Gênero: Masculino

ah desculpa. n tinha testado aki, eu acho q precisa ser preparedeath em vez de death na funcao
local config = {
ammyID = 2130,
lossExp = false,
lossItems = false
}
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) then
if (getPlayerSlotItem(cid, 2).itemid == config.ammyID) then
if (config.lossExp == false) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0)
end
doCreatureSetDropLoot(cid, config.lossItems)
return true
end
end
return true
end
ai vai ter q troca isso no creaturescripts/xml tb
Eu testei né um ot private aqui deu certo, mas quando vo testa no meu online ele volta pro level 1, sendo que e o mesmo ot.
Abrass ![]()
Editado Outubro 12 por Carnavotu
Preciso de mais uma ajuda, meu ot e xp alto, level baixo o amulet não faz perder level mais quando almenta de mais ele volta pro level 1, alguém sabe arruma?
Abrass
info
Grupo: Herói
Registrado: 23/12/08
Posts: 2.4k
Reputação: +359
Gênero: Masculino
Char no Tibia: Gordo Warlike

isso e erro na distro do seu ot , troque por outra! nunca funcionara se nao mudar!
fuiz
Cabei de troca, e ainda persiste o erro.
Abrass
info
Grupo: Artesão
Registrado: 13/07/11
Posts: 104
Reputação: +4
Char no Tibia: Willliam Serravalle

tenta trocar o loos na vocation com migo tbm foi assim
bota 0 em vez de 30
info
Grupo: Campones
Registrado: 15/09/11
Posts: 44
Reputação: +16
Char no Tibia: Bielzin Ziika

Em que pasta do seu OT voce colocou esse script ?
Voce precisa colocar em data/creaturescripts e criar um arquivo preparedeath.lua e colocar seu script , dai depois adiciona uma linha em data/creaturescripts/login e adicione isso :
registerCreatureEvent(cid, "onPrepareDeath")end
Espero que de certo ..
Editado Outubro 15 por StremeMakky
Um outro ponto de vista de fazer o script ![]()
local ammyID = 2130
function onDeath(cid, lastHitKiller, mostDamageKiller)
registerCreatureEvent(cid, "onPrepareDeath")
if isPlayer(cid) then
if (getPlayerSlotItem(cid, 2).itemid == ammyID) then
for i = 1, 5 do
doPlayerAddBlessing(cid, i)
end
end
end
return true
end
Editado Outubro 15 por Busc4pe
Churupetinhaa já puis e almenta um poco o level depois as pessoas com mais perde de novo. StremeMakky já existe um preparedeath.lua no creatureevents. StremeMakky esse script perde level?
Abrass
info
Grupo: Campones
Registrado: 15/09/11
Posts: 44
Reputação: +16
Char no Tibia: Bielzin Ziika

Entao, amigo, so adiciona a linha em login :
registerCreatureEvent(cid, "onPrepareDeath")end
E no arquivo preparedeath.lua adiciona o script do Eskylo :
local config = {ammyID = 2130,
lossExp = false,
lossItems = false
}
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) then
if (getPlayerSlotItem(cid, 2).itemid == config.ammyID) then
if (config.lossExp == false) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0)
end
doCreatureSetDropLoot(cid, config.lossItems)
return true
end
end
return true
end
Caso tenha mais duvidas poste o arquivo preparedeath.lua , eu mostro para voce como colocar .
E voce precisa ir em items.xml e colocar isso :
</item><item id="2130" article="an" name="NOME DO SEU AMULET">
<attribute key="weight" value="420" />
<attribute key="slotType" value="necklace" />
<attribute key="charges" value="1" />
<attribute key="preventDrop" value="1" />
Fale se persistir voltando para o level 1 .
Editado Outubro 15 por StremeMakky
info
Grupo: Artesão
Registrado: 13/07/11
Posts: 104
Reputação: +4
Char no Tibia: Willliam Serravalle

da uma olhada nesse topico aki
tipo assim vai na sua aol red skull bota la <attribute key="preventDrop" value="9999999" />
e la em vacation.xml vc bota nas vocation que nao tem loss vc adiciona o loos e bota 0 se nao for isso me esuqesi
Testa Os 3 acho que o utimo e melhor
pra ver se vai
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)if isPlayer(cid) == true then
if (getPlayerSlotItem(cid, 2).itemid == 2138) then
doCreatureSetDropLoot(cid, false)
doPlayerSetLossPercent(cid, experience, 0)
doCreatureAddHealth(cid, health,40000)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
return TRUE
end
end
return TRUE
end
local config = {ammyID = 2130,
lossExp = false,
lossItems = false
}
function onDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) then
if (getPlayerSlotItem(cid, 2).itemid == config.ammyID) then
if (config.lossExp == false) then
doPlayerSetLossPercent(cid, experience, 0)
end
doCreatureSetDropLoot(cid, config.lossItems)
return true
end
end
return true
end
-- Sebasbe and Nicekid(Xtibia) --function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) == TRUE then
if (getPlayerSlotItem(cid, 2).itemid == 2196) and getPlayerSkullType(cid) >= 4 then
doCreatureSetDropLoot(cid, false)
doPlayerSetLossPercent(cid, experience, 0)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
return TRUE
end
end
return TRUE
end
Editado Outubro 15 por Churupetinhaa
StremeMakky ja tem a linha:
function onLogin(cid)
registerCreatureEvent(cid, "onPrepareDeath")
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
end
Editado Outubro 15 por Carnavotu





info
Grupo: Campones
Registrado: 10/05/09
Posts: 74
Reputação: +18
Bom galera estou com um script de um aol que ele nao perde lvl e quando ta black e red skull nao perde nada, mas o problema e quando o player morre volta pro level 1, alguem sabe resolve?
Script:
local config = { ammyID = 2130, lossExp = false, lossItems = false } function onDeath(cid, lastHitKiller, mostDamageKiller) if isPlayer(cid) then if (getPlayerSlotItem(cid, 2).itemid == config.ammyID) then if (config.lossExp == false) then doPlayerSetLossPercent(cid, experience, 0) end doCreatureSetDropLoot(cid, config.lossItems) return true end end return true endAbrass, Bom feriado