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

Ceremonial ank gives blessings

calum69

New Member
Joined
Aug 12, 2007
Messages
346
Reaction score
3
Location
Great Britain
is it possible to use an item and get all blessings?

can somone post the coding for use item xx id recieve all bless and il put it into a script, thanks :)
 
Actions.xml is where you make the "Ceremonial Ank" give the blessings.

data/actions/scripts/script.lua
Code:
local cost = 50000
function onUse(cid, item, fromPosition, itemEx, toPosition)
	for i = 1, 5 do
		if(getPlayerBlessing(cid, i)) then
			doPlayerSendCancel(cid, "You already have all of the blessings.")
			return true
		end
	end
	if(getPlayerMoney(cid) < cost) then
		doPlayerSendCancel(cid, "You do not have enough money.")
	elseif(not isPremium(cid)) then
		doPlayerSendCancel(cid, "You must have a premium account.")
	else
		for v = 1, 5 do
			doPlayerAddBlessing(cid, v)
		end
		doPlayerRemoveMoney(cid, cost)
		doSendMagicEffect(getThingPos(cid), CONST_ME_FIREWORK_BLUE)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have received all of the blessings!")
		doRemoveItem(item.uid)
	end
	return true
end
 
jdb, he didn't ask for price or sth like that :p

LUA:
local itemid = xxxx

function onUse (cid, item, fromPosition, itemEx, toPosition)
  if item.itemid == itemid then
    for i = 1, 5 do
      doPlayerAddBlessing(cid, i)
    end
    doCreatureSay(cid,"You have been blessed!",TALKTYPE_ORANGE_1)
    doRemoveItem(item.uid)
  end
  return true
end
 
Last edited:
nice, cool script.

how do you add if already blessed send message you are already blessed.

and can you add something like
LUA:
doPlayerRemoveItem(cid,XXXX,X)
so people can set it to either cost an item or maybe set it to cost x gp
 
Last edited:
Back
Top