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

TFS [0.3.6] Check blessings

daneria

New Member
Joined
Dec 24, 2008
Messages
92
Reaction score
0
Location
Poland <3
Hiho,
I need talkaction script. When you say !checkbless, it will show you how many blessings you have.
It is possible to do ?;)
 
wish it helps

LUA:
function onSay(cid, words, param)
    if getPlayerBlessing(cid, 1) and getPlayerBlessing(cid, 2) and getPlayerBlessing(cid, 3) and getPlayerBlessing(cid, 4) and getPlayerBlessing(cid, 5) then
	        doPlayerSendCancel(cid,'You have 5 blessings')
	elseif getPlayerBlessing(cid, 1) and getPlayerBlessing(cid, 2) and getPlayerBlessing(cid, 3) and getPlayerBlessing(cid, 4) then
	        doPlayerSendCancel(cid,'You have 4 blessings')
	elseif getPlayerBlessing(cid, 1) and getPlayerBlessing(cid, 2) and getPlayerBlessing(cid, 3) then
	        doPlayerSendCancel(cid,'You have 3 blessings')
	elseif getPlayerBlessing(cid, 1) and getPlayerBlessing(cid, 2) then
	       doPlayerSendCancel(cid,'You have 2 blessings')
	elseif getPlayerBlessing(cid, 1) then
	        doPlayerSendCancel(cid,'You have 1 blessings')
    end    
    return 1
end
 
LUA:
function onSay(cid, words, param)
	local bless = 0;
	for i = 1, 5 do
		if getPlayerBlessing(cid, i) then
			bless = bless+1;
		end
	end    
	return doPlayerSendCancel(cid,(bless>0) and 'You are blessed by '.. bless ..' Gods.' or 'You are not blessed.') and false;
end

hymmm
 
or ceremonial ankh like rl tibia:
Code:
local blessings = {"\nWisdom of Solitude", "\nSpark of the Phoenix", "\nFire of the Suns", "\nSpiritual Shielding", "\nEmbrace of Tibia"}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local result = "Received blessings:"
	for i = 1, 5 do
		result = getPlayerBlessing(cid, i) and result .. blessings[i] or result
	end
	return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 20 > result:len() and "No blessings received." or result)
end
but it's not talkaction :p
 
Back
Top