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

A free blessing stone

poopsiedoodle

Gibe moni plos
Joined
Nov 23, 2011
Messages
2,457
Reaction score
585
Location
Georgia
I want to make a stone that you can use once every day to get free blessings, but, still being terrible at scripts, I have absolutely no idea how I would make that happen. Anyone wanna give me an example script? :3
 
LUA:
function onUse(cid, item, frompos, item2, topos) 

local b = 1,5
local storageValue = 9999
local exhaustTime = 86400

	if(isExhausted(cid, storageValue, exhaustTime)) then
		doPlayerSendDefaultCancel(cid, Sorry, you only can use this item after "24" hours.)
                return TRUE
        end            

	if not getPlayerBlessing(cid, b) then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You already have all blessings.")
	else
			doCreatureSetDropLoot(cid, false)
			doPlayerAddBlessing(cid, b)
			setExhaust(cid, storageValue)
			doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You have been blessed by the gods!")
	end
return true
end
 
@up any item you wish. Just put in the actions.xml the item id or the action id you will add to the "stone" and on use of that "stone" it will provide bless.
 
data/actions - actions.xml
LUA:
<action actionid="xxxx" script="name.lua"/>
changed actionid for action stone, name.lua for name script
 
Back
Top