• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Buy Bless = Lose All Items On Death

God Mythera

Veteran OT User
Joined
Aug 11, 2012
Messages
2,048
Solutions
2
Reaction score
256
Location
United States
hello im trying to get Bless fixed, when i buy bless on a test char and die i lose all items ;s

this is my script
Code:
-- !blessing by leo
local cost = 0 -- Cost in gp.

function onSay(cid, words, param)




if getPlayerBlessing(cid, 5) == TRUE then
doPlayerSendCancel(cid, "You have already have been blessed.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return TRUE
end

if doPlayerRemoveMoney(cid, cost) == TRUE then
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
doSendAnimatedText(getCreaturePosition(cid), 'Blessed!!!', TEXTCOLOR_WHITE)
return TRUE
else
doPlayerPopupFYI(cid, "You need to have "..cost.."gp to buy blessings.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
return TRUE
end



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

Talkaction script
Code:
 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
 
Check blessing config.lua
Code:
  -- Blessings
   -- NOTE: blessingReduction* regards items/containers loss.
   -- eachBlessReduction is how much each bless reduces the experience/magic/skills loss.
  blessings = true
  blessingOnlyPremium = false
  blessingReductionBase = 30
  blessingReductionDecrement = 5
  eachBlessReduction = 8

Talkaction script
Code:
 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
thanks its fixed
 
Back
Top