• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Need Talkaction Bless!!!

Crayon

New Member
Joined
Mar 23, 2009
Messages
29
Reaction score
0
I Need One talkaction Script Of Blessing!!!!

for example:


!bless

or one npc!


:P ty
 
This script will remove 5000 gold coins for the 5 blessings

PHP:
local money = 5000
function onSay(cid, words, param)
	if doPlayerRemoveMoney(cid, money) == TRUE then
		for i = 1, 5 do
			doPlayerAddBlessing(cid, i)
		end
	else
		doPlayerSendCancel(cid, "You don\'t have enough money!")
	end
end

You can change the amount of money in "local money = 5000"
 
Ok use this one by artofwork its more complete xD

PHP:
-- !blessing by artofwork
local bless = {1, 2, 3, 4, 5}
local cost = 75000 -- Cost in gp.
local maxlevel = 1000

function onSay(cid, words, param)
local lvl = getPlayerLevel(cid)
local new_cost = (lvl * cost) / 500
local target = getPlayerGUID(cid)


	for i = 1, table.maxn(bless) do
		if(getPlayerBlessing(cid, bless[i])) then
			doPlayerSendCancel(cid, "You have already have been blessed.")
			return TRUE
		end
	end
	
	if (getPlayerLevel(cid) >= maxlevel)  then
		if(doPlayerRemoveMoney(cid, new_cost) == TRUE) then
			for i = 1, table.maxn(bless) do
			doPlayerAddBlessing(cid, bless[i])
			doPlayerPopupFYI(cid, "You have successfully been blessed.")
		end
		else
		doPlayerPopupFYI(cid, "You need to have "..new_cost.."gp to buy blessings.")
		end
	
	elseif(getPlayerLevel(cid) < maxlevel) then
		if(doPlayerRemoveMoney(cid, cost) == TRUE) then
			for i = 1, table.maxn(bless) do
			doPlayerAddBlessing(cid, bless[i])
			end
			doPlayerPopupFYI(cid, "You have successfully been blessed.")
		else
			doPlayerPopupFYI(cid, "You need to have "..cost.."gp to buy blessings.")
		end
	end
	return FALSE
end
 
Code:
function onSay(cid, words, param)
    if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then
        doPlayerSendCancel(cid,'You have already got one or more blessings!')
    else
        if doPlayerRemoveMoney(cid, 60000) == TRUE then
            doPlayerAddBlessing(cid, 1)
            doPlayerAddBlessing(cid, 2)
            doPlayerAddBlessing(cid, 3)
            doPlayerAddBlessing(cid, 4)
            doPlayerAddBlessing(cid, 5)
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE)
            doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have been blessed by the gods!')
        else
            doPlayerSendCancel(cid, "You need 6 crystal coin to get blessed!")
        end
    end    
    return 1

This script works properly.
 
Back
Top