Bless 8.660 Bugado Player Volta Ao Level 1

Luiiz1
Por Luiiz1
em Scripts

Luiiz1

Fight Now
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 03/12/11Posts: 75Char no Tibia: Goddess kimber

Meu servidor ( mapa proprio 4fun ) esta com um bug de que quando o player utiliza o bless ele volta ao level 1 , e muitas das vezes ele perde toda hp e toda mana e nao consegue mais logar , HELP AE !!

 

function onSay(cid, words, param)

if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then

doPlayerSendCancel(cid,'You have all bless!')

else

if doPlayerRemoveMoney(cid, 400000) == TRUE then

doPlayerAddBlessing(cid, 1)

doPlayerAddBlessing(cid, 2)

doPlayerAddBlessing(cid, 3)

doPlayerAddBlessing(cid, 4)

doPlayerAddBlessing(cid, 5)

doSendMagicEffect(getPlayerPosition(cid), 37)

doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, 'You have been blessed by the gods!')

else

doPlayerSendCancel(cid, "You need 100k to get blessed!")

doSendMagicEffect(getPlayerPosition(cid), 41)

end

end

return TRUE

end

 

 

config lua ;

blessingOnlyPremium = true

blessingReductionBase = 30

blessingReductionDecreament = 5

eachBlessReduction = 8

Tchubaka

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 19/07/12Posts: 395Char no Tibia: Billy Poul
-- !blessing by artofwork
local bless = {1, 2, 3, 4, 5}
local cost = 50000 -- Cost in gp.
local maxlevel = 1000

function onSay(cid, words, param)
local lvl = getPlayerLevel(cid)
local new_cost = (lvl * cost) / 500
local target = getPlayerGUID(cid)


   for i = 1, table.maxn(bless) do
       if(getPlayerBlessing(cid, bless[i])) then
           doPlayerSendCancel(cid, "You already have been blessed.")
           return TRUE
       end
   end

   if (getPlayerLevel(cid) >= maxlevel)  then
       if(doPlayerRemoveMoney(cid, new_cost) == TRUE) then
           for i = 1, table.maxn(bless) do
           doPlayerAddBlessing(cid, bless[i])
           doPlayerSendTextMessage(cid,19,"You have successfully been blessed.")
       end
       else
       doPlayerSendTextMessage(cid,19,"You need to have "..new_cost.."gp to buy blessings.")
       end

   elseif(getPlayerLevel(cid) < maxlevel) then
       if(doPlayerRemoveMoney(cid, cost) == TRUE) then
           for i = 1, table.maxn(bless) do
           doPlayerAddBlessing(cid, bless[i])
           end
           doPlayerSendTextMessage(cid,19,"You have successfully been blessed.")
       else
           doPlayerSendTextMessage(cid,19,"You need to have "..cost.."gp to buy blessings.")
       end
   end
   return FALSE
end

Te Ajudei? Então REP+ button_ok.png

SkyLigh

User X
avatar
Lorde
Lorde

INFOS

Grupo: LordeRegistrado: 23/07/12Posts: 2183Char no Tibia: Kissy
local bless = {1, 2, 3, 4, 5}
local cost = 80000
function onSay(cid, words, param)
for i = 1, table.maxn(bless) do
if(getPlayerBlessing(cid, bless[i])) then
doPlayerSendCancel(cid, "Voceja tem todas as bless.")
return TRUE
end
end
if(doPlayerRemoveMoney(cid, cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
end
doCreatureSay(cid, "You are now blessed!" ,19)
doSendMagicEffect(getPlayerPosition(cid), 49)
else
doPlayerSendCancel(cid, "Voce precisa de 80k para a bless.")
end
return TRUE
end

Att,
Kissy

Luiiz1

Fight Now
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 03/12/11Posts: 75Char no Tibia: Goddess kimber

vou testar

 

Skyligh , o seu ficou parcialmente bom , a nao ser que ele ainda esta perdendo level , menos level mais está perdendo , tem como colocar para ter perca 0% ?

SkyLigh

User X
avatar
Lorde
Lorde

INFOS

Grupo: LordeRegistrado: 23/07/12Posts: 2183Char no Tibia: Kissy

aki esta

local bless = {1, 2, 3, 4, 5}
local cost = 80000
function onSay(cid, words, param)
for i = 1, table.maxn(bless) do
if(getPlayerBlessing(cid, bless[i])) then
doPlayerSendCancel(cid, "Voceja tem todas as bless.")
return TRUE
end
end
if(doPlayerRemoveMoney(cid, cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
doPlayerSetLossSkill(cid, 0)
doCreatureSetDropLoot(cid, false)
end
doCreatureSay(cid, "You are now blessed!" ,19)
doSendMagicEffect(getPlayerPosition(cid), 49)
else
doPlayerSendCancel(cid, "Voce precisa de 80k para a bless.")
end
return TRUE
end

Att,
Kissy

Luiiz1

Fight Now
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 03/12/11Posts: 75Char no Tibia: Goddess kimber

errado amigo , esse bless o player se teletransportar para o temple por tanto vou tentar remorer o dropp loot pq meu ot ja nao dropa loot :)

 

protinho , tudo certo , rep ! pra vc .o.

Tchubaka

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 19/07/12Posts: 395Char no Tibia: Billy Poul
function onSay(cid, words, param)
if getPlayerBlessing(cid,5) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have already been blessed")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
else
if doPlayerRemoveMoney(cid, 50000) == TRUE then
for i = 1,5 do
doPlayerAddBlessing(cid,i)
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have received blessings!")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need 50,000 gp in backpack for blessings.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ICEAREA)
end
end
end

Te Ajudei? Então REP+ button_ok.png

Luiiz1

Fight Now
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 03/12/11Posts: 75Char no Tibia: Goddess kimber

a so sky nao perdia level por um tempo , mais depois paro e a do tchubaka tbm perde lvl :/

SkyLigh

User X
avatar
Lorde
Lorde

INFOS

Grupo: LordeRegistrado: 23/07/12Posts: 2183Char no Tibia: Kissy

ver agr !

 

local bless = {1, 2, 3, 4, 5}
local cost = 80000
function onSay(cid, words, param)
for i = 1, table.maxn(bless) do
if(getPlayerBlessing(cid, bless[i])) then
doPlayerSendCancel(cid, "Voceja tem todas as bless.")
return TRUE
end
end
if(doPlayerRemoveMoney(cid, cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
doPlayerSetLossSkill(cid, false)
end
doCreatureSay(cid, "You are now blessed!" ,19)
doSendMagicEffect(getPlayerPosition(cid), 49)
else
doPlayerSendCancel(cid, "Voce precisa de 80k para a bless.")
end
return TRUE
end

Att,
Kissy

Tchubaka

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 19/07/12Posts: 395Char no Tibia: Billy Poul

vai em config.lua procure por isso.

-- Blessings
-- NOTE: blessingReduction* regards items/containers loss.
-- eachBlessReduction is how much each bless reduces the experience/magic/skills loss.
blessings = true
blessingOnlyPremium = true
blessingReductionBase = 30
blessingReductionDecrement = 5
eachBlessReduction = 8

e configure ao seu gosto.

Te Ajudei? Então REP+ button_ok.png