• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

MoveEvent Blessed Amulet,Can be changed to Blessed Forever aol :D

Hatsune Miku

Intermediate OT User
Joined
Jan 22, 2009
Messages
370
Reaction score
139
So I was on premium board to check if there was something cool and I saw a guy asking for a Blessed forever aol :p He wanted to have a Forever aol that blesses you, unfortunately I don't have a forever aol and cba to find a good one :p so I just made the "Bless" part :p Works perfectly on TFS 0.3.6 V8.2 (Cyko version :p)

So in movements.xml
XML:
<!-- Bless amulet -->
<movevent type="Equip" itemid="XXXX" event="script" value="blessedamulet.lua"/>

Save this as blessedamulet.lua
The script file:
Lua:
function onEquip(cid, item, slot)
	if getPlayerBlessing(cid,5) then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have already been blessed")
	doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_GREEN)
else
for i = 1,5 do
doPlayerAddBlessing(cid,i)
end
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have received blessings!")
	doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA)
	end
	--Forever aol script :P
	return true
	--Made by Xedite
	end

At --Forever aol script :p
You can put your aol script without
Lua:
function onEquip(cid, item, slot)
And it should probably work :p if not just post your Forever aol script and I will fix it :p (Don't bother posting me errors that occured after you put in your Forever aol script:p cause I won't know what wrong anyway.)

If you have any errors with the script as it is right now :p Post me your errors :p altho I'm pretty sure it works fine :p
 
[04/06/2015 17:19:51] [Error - LuaScriptInterface::loadFile] data/movements/scripts/blessedamulet.lua:1: unexpected symbol near '['
[04/06/2015 17:19:51] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/blessedamulet.lua)
[04/06/2015 17:19:51] data/movements/scripts/blessedamulet.lua:1: unexpected symbol near '['
 
Code:
function onEquip(cid, item, slot)
    if not getPlayerBlessing(cid,5) then
        for i = 1,5 do
            doPlayerAddBlessing(cid,i)
        end
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "The amulet has shielded you with the 5 blessings!")
    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_ENERGYAREA)
    end
return true
end
 
Barth it looks like you copied some of the
Lua:
 wrap into your file. That's probably what caused the error.
 
Back
Top