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

Get all bless by using an item

wafuboe

Active Member
Joined
Dec 24, 2010
Messages
884
Solutions
2
Reaction score
26
well i need a script that if you use a item you get all blesses and a nice animation also "You have been blessed"
then the item desapears..

also a talkaction that the prices of the blesses increment depending on your level comes handy too

ty :)
 
action:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == your_id_of_itemid then ---<  change 
		doPlayerAddBlessing(cid, 1) 
		doPlayerAddBlessing(cid, 2) 
		doPlayerAddBlessing(cid, 3) 
		doPlayerAddBlessing(cid, 4) 
		doPlayerAddBlessing(cid, 5) 	
		doRemoveItem(item.uid, 1)
	end
return true
end



talkaction:
Code:
function onSay(cid, words, param)

			if getPlayerLevel(cid) < 31 then
		    cost = 2000
	        elseif getPlayerLevel(cid) > 120 then
	        cost = 20000
	        else
		    cost = ((getPlayerLevel(cid) - 30) * 200) + 2000
	        end
			
		if doPlayerRemoveMoney(cid, cost) == TRUE then
			doPlayerSendCancel(cid,"From now you have all blessings.")
			doPlayerAddBlessing(cid, 1) 
			doPlayerAddBlessing(cid, 2) 
			doPlayerAddBlessing(cid, 3) 
			doPlayerAddBlessing(cid, 4) 
			doPlayerAddBlessing(cid, 5) 
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE)
		elseif doPlayerRemoveMoney(cid, cost) == FALSE then
			doPlayerSendCancel(cid,"You are not have enough money.")
		end
		
return true
end
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == your_id_of_itemid then ---<  change 
		for i = 1, 5 do
		doPlayerAddBlessing(cid, i)
	end
	doRemoveItem(item.uid, 1)
return true
end
Don't mind me. Just shortening this :)
 
Back
Top