danne3131
Active Member
- Joined
- Jun 26, 2008
- Messages
- 390
- Solutions
- 1
- Reaction score
- 48
Ive got this fully working !bless for tfs 1.1 .. right now it costs 50k whatever level you are..
Ive wounder if anyone got the required Lua skill to make the bless price like real tibia, The higher level the more it will cost !
Thanks in advance, Yours Daniel
Ive wounder if anyone got the required Lua skill to make the bless price like real tibia, The higher level the more it will cost !
Code:
local bless = {1, 2, 3, 4, 5}
local cost = 50000 -- Cost in gp.
function onSay(cid, words, param)
local player = Player(cid)
for i = 1, table.maxn(bless) do
if player:hasBlessing(bless[i]) then
return player:sendCancelMessage("You already have all blessings.")
end
end
if player:removeMoney(cost) then
for i = 1, table.maxn(bless) do
player:addBlessing(bless[i])
end
player:sendTextMessage(MESSAGE_INFO_DESCR, "You have bought all blessings.")
player:say("You have bought all blessings.", TALKTYPE_MONSTER_SAY)
player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_YELLOW)
else
player:sendCancelMessage("You don't have enough money.")
end
return true
end