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

Blessings Prob [Rep+]

Alls

New Member
Joined
Jan 17, 2008
Messages
26
Reaction score
1
Well,i do not know if the script is wrong,
when I used the version 0.3.5 this works great!
now that I upgrade to 0.3.6,this script stop working,
I do not know where is the problem, if the libs or the sources or functions.lua.

Can you help give tips on where this problem is coming?;)

Obs:When I upgrade to 0.3.6 I did not replace some things in 0.3.5


PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        doCreatureSay(cid, "You are blessed now !", TALKTYPE_ORANGE_1)
            doPlayerAddBlessing(cid, 1)
            doPlayerAddBlessing(cid, 2)
            doPlayerAddBlessing(cid, 3)
            doPlayerAddBlessing(cid, 4)
            doPlayerAddBlessing(cid, 5)
	 doRemoveItem(item.uid,1)
    end
 
Use Item & Bless
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local bless = { 1, 2, 3, 4, 5 }
	for i = 1, #bless do
		if(getPlayerBlessing(cid, bless[i]) then
			doPlayerSendCancel(cid, "You have the blessings.")
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
		else
			doPlayerAddBlessing(cid, bless[i])
			doCreatureSay(cid, "You have been blessed!", TALKTYPE_ORANGE_1)
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
			doRemoveItem(item.uid, 1)
		end
		return true
	end
end

Talk & Bless
Code:
function onSay(cid, words, param, channel)
	local cfg = {
		cost = 50000,
		bless = { 1, 2, 3, 4, 5 }
	}
	for b = 1, #cfg.bless do
		if(getPlayerMoney(cid) < cfg.cost) then
			doPlayerSendCancel(cid, "You do not have enough money.")
		elseif(getPlayerBlessing(cid, cfg.bless[b]) then
			doPlayerSendCancel(cid, "You have the blessings.")
		else
			doPlayerRemoveMoney(cid, cfg.cost)
			doPlayerAddBlessing(cid, cfg.bless[b])
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
			doCreatureSay(cid, "You have been blessed.", TALKTYPE_ORANGE_1)
		end
		return true
	end
end
 
Use Item & Bless
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local bless = { 1, 2, 3, 4, 5 }
	for i = 1, #bless do
		if(getPlayerBlessing(cid, bless[i]) then
			doPlayerSendCancel(cid, "You have the blessings.")
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
		else
			doPlayerAddBlessing(cid, bless[i])
			doCreatureSay(cid, "You have been blessed!", TALKTYPE_ORANGE_1)
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
			doRemoveItem(item.uid, 1)
		end
		return true
	end
end

Talk & Bless
Code:
function onSay(cid, words, param, channel)
	local cfg = {
		cost = 50000,
		bless = { 1, 2, 3, 4, 5 }
	}
	for b = 1, #cfg.bless do
		if(getPlayerMoney(cid) < cfg.cost) then
			doPlayerSendCancel(cid, "You do not have enough money.")
		elseif(getPlayerBlessing(cid, cfg.bless[b]) then
			doPlayerSendCancel(cid, "You have the blessings.")
		else
			doPlayerRemoveMoney(cid, cfg.cost)
			doPlayerAddBlessing(cid, cfg.bless[b])
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
			doCreatureSay(cid, "You have been blessed.", TALKTYPE_ORANGE_1)
		end
		return true
	end
end



What is the command? ^.-
 
Back
Top