Aol Especial

Carnavotu
em Scripts
  • 1
  • 2

Carnavotu

~~Rei Carnavotu~~
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/05/09Posts: 74

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
end

 

Abrass, Bom feriado :thumbsupsmiley:

Te Ajudei? Não Gosta De Mim? Use Meu Fan Bar

Eskylo

boa sorte
avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 11/08/10Posts: 477Gênero: Masculino

... leia meo post abaixo

Atenciosamente, Eskylo

 

 

Ironman-icon.png

.

.

Carnavotu

~~Rei Carnavotu~~
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/05/09Posts: 74

Continua voltando ao level 1 :winksmiley02:

 

Abrass

Te Ajudei? Não Gosta De Mim? Use Meu Fan Bar

Eskylo

boa sorte
avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 11/08/10Posts: 477Gê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

 

Atenciosamente, Eskylo

 

 

Ironman-icon.png

.

.

Carnavotu

~~Rei Carnavotu~~
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/05/09Posts: 74

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 :thumbsupsmiley:

Te Ajudei? Não Gosta De Mim? Use Meu Fan Bar

Carnavotu

~~Rei Carnavotu~~
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/05/09Posts: 74

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

Te Ajudei? Não Gosta De Mim? Use Meu Fan Bar

Piabeta Kun

Ex-Coordenador de Websites
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 23/12/08Posts: 2403Gênero: MasculinoChar no Tibia: Gordo Warlike

isso e erro na distro do seu ot , troque por outra! nunca funcionara se nao mudar!

 

fuiz

Daijobu!

 

Carnavotu

~~Rei Carnavotu~~
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/05/09Posts: 74

Cabei de troca, e ainda persiste o erro.

 

 

Abrass

Te Ajudei? Não Gosta De Mim? Use Meu Fan Bar

williamserravalle

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 13/07/11Posts: 104Char no Tibia: Willliam Serravalle

tenta trocar o loos na vocation com migo tbm foi assim

bota 0 em vez de 30

141831

Good For You
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 15/09/11Posts: 44Char 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 ..

Att,

StremeMakky

wigflip-ds.gif

wigflip-ds.gif

8ae65c69e4924e66af4fc3e44743c7e6.0.gif

Comecei Agora A Participar Do Forum Dia 13/10/11 . _____________________________________MSN : strememakky@hotmail.com

Meus Trabalhos

Nova Magia De Trap

Tente A Sorte 2

netflat2

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 13/10/11Posts: 5

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

Carnavotu

~~Rei Carnavotu~~
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/05/09Posts: 74

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

Te Ajudei? Não Gosta De Mim? Use Meu Fan Bar

141831

Good For You
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 15/09/11Posts: 44Char 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 .

Att,

StremeMakky

wigflip-ds.gif

wigflip-ds.gif

8ae65c69e4924e66af4fc3e44743c7e6.0.gif

Comecei Agora A Participar Do Forum Dia 13/10/11 . _____________________________________MSN : strememakky@hotmail.com

Meus Trabalhos

Nova Magia De Trap

Tente A Sorte 2

williamserravalle

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 13/07/11Posts: 104Char no Tibia: Willliam Serravalle

da uma olhada nesse topico aki

 

Clique aqui

 

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

Carnavotu

~~Rei Carnavotu~~
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/05/09Posts: 74

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

Te Ajudei? Não Gosta De Mim? Use Meu Fan Bar

  • 1
  • 2