JDB
OtLand Veteran
- Joined
- Jun 1, 2009
- Messages
- 4,145
- Solutions
- 2
- Reaction score
- 115
The Forgotten Server 0.3.5
Tested & Working.
data/actions/actions.xml
data/actions/scripts/blessings.lua
Tested & Working.
data/actions/actions.xml
PHP:
<action uniqueid="1000" event="script" value="blessings.lua"/>
data/actions/scripts/blessings.lua
Lua:
local cost = 50000
function onUse(cid, item, fromPosition, itemEx, toPosition)
for i = 1,5 do
if (getPlayerBlessing(cid, i) == true) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
doCreatureSay(cid, "You have already been blessed.", TALKTYPE_ORANGE_1)
elseif (getPlayerMoney(cid) < cost) then
doSendAnimatedText(getCreaturePosition(cid), "$$$", TEXTCOLOR_WHITE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need atleast ".. cost .." gold coins to be blessed.")
else
doPlayerRemoveMoney(cid, cost)
doPlayerAddBlessing(cid, i)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
doSendAnimatedText(getCreaturePosition(cid), "BLESSED!", TEXTCOLOR_RED)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been blessed by all five of the gods.")
end
return true
end
end
Last edited: