LU
dúvida

Bless 8.660 Bugado Player Volta Ao Level 1

Por Luiiz1, 29 de jul. de 2012 em Scripts

bless
bug
xtibia
10
2.4k
Luiiz1L
29 de julho de 2012 às 13:10

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

Editado Julho 29 por Luiiz1

TchubakaT
29 de julho de 2012 às 13:14
-- !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

SkyLighS
29 de julho de 2012 às 13:28
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

Luiiz1L
29 de julho de 2012 às 13:32

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% ?

Editado Julho 29 por Luiiz1

SkyLighS
29 de julho de 2012 às 20:09

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

Luiiz1L
30 de julho de 2012 às 11:47

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.

TchubakaT
30 de julho de 2012 às 11:49
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

Luiiz1L
30 de julho de 2012 às 11:57

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

SkyLighS
30 de julho de 2012 às 12:02

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

Editado Julho 30 por SkyLigh

TchubakaT
30 de julho de 2012 às 12:08

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.