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

I need !Bless comment script

Kaywin

Lord of War WoW/Tibia 2D
Joined
Oct 24, 2008
Messages
541
Reaction score
6
Location
SwedeN
Hi

Can anyone find a bless script to me? I would like to write in game !Bless to get full bless (all 5 blessings).

I got TFS 0.3.5
 
Bless.lua
PHP:
function onSay(cid, words, param)
local fail = 0

	if getPlayerLevel(cid) < 31 then
		cost = 2000
	else
		cost = ((getPlayerLevel(cid) - 30) * 200) + 2000
	end
	
	if cost > 20000 then
		cost = 20000
	end

	for i = 1, 5 do
		if getPlayerBlessing(cid, i) then
			fail = fail + 1
		else
			if doPlayerRemoveMoney(cid, cost) == TRUE then
				doPlayerAddBlessing(cid, i)
				if i == 5 and not(fail == 5) then
					doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
				end
			else
				doPlayerSendCancel(cid, "You do not have enough money to buy all the blessings!")
				break
			end
		end
	end
	if fail == 5 then
		doPlayerSendCancel(cid, "You already have all the blessings!")
	end
return TRUE
end

Talkactions.xml
PHP:
	<talkaction words="!bless" event="script" value="bless.lua"/>

Rep me! +++
 
It do not work.

I past the first script in data/talkactions/scripts.


The next script did i past in data/talkactions

why do it not work? :p
 
Back
Top