• 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!

!bless debug!

MxSoft

Leave Tibia, Live Life.
Joined
Dec 22, 2009
Messages
1,804
Solutions
1
Reaction score
44
Location
Mexico
hi i have debug in !bless use, i think is because the messages it gaves, because im usign 8.62 here is the script :)
Code:
  local bless =  {1, 2, 3, 4, 5}
local cost = 50000
function onSay(cid, words, param)
    for i = 1, table.maxn(bless) do
        if(getPlayerBlessing(cid, bless[i])) then
            doPlayerSendCancel(cid, "You have already all blessings.")
            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 by the Five Gods!" ,19)
       
    else
        doPlayerSendCancel(cid, "You don\'t have enough money.")
    end
    return TRUE
end
 
Code:
local config = {
	price = 50000
}

function onSay(cid, words, param, channel)
	for i = 1, 5 do
		if doPlayerRemoveMoney(cid, config.price) then
			if not getPlayerBlessing(cid, i) then
				doPlayerAddBlessing(cid, i)
				doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
				doCreatureSay(cid, "You have been blessed!", TALKTYPE_ORANGE_1)
				break
			else
				doPlayerSendCancel(cid, "Sorry, you have all the blessings.")
			end
		else
			doPlayerSendCancel(cid, "Sorry, you do not have enough money.")
		end
	end
	
	return true
end
 
Last edited:
Back
Top