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

Item Loss Less EXP after death [New AOL]

merfus

Member
Joined
Dec 27, 2011
Messages
214
Reaction score
5
Location
Poland
hello i need script for something like AOL but you dont lost EQ and you lost 50% Less Exp After death than normal, can anyone help me?
 
How Scripts Works: What you do is, you click on an item (of your choice) then it will transform to the new 50% less death loss, item. Then you put that item on and you will get 50% less death loss when you die. But you will have to do this every time you die.

Note: What this script does is just give you 3 blessings.

How to Setup: What you will have to do is edit a new necklace in items.xml (of your choice) and delete the attributes it already has and put these.
XML:
	<attribute key="weight" value="420"/>
	<attribute key="slotType" value="necklace"/>
	<attribute key="charges" value="1"/>
	<attribute key="preventDrop" value="1"/>
</item>

Then go to data/actions/scripts and make a new file, name it whatever you want. Then put this in it.

Lua:
local config = {
regular_aol =  -- Id for the item you want the player to use to transform it into the new aol.
edited_aol =  -- Id for the edited aol.
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) then
		doPlayerSendCancel(cid,'You have already used an aol!')
	else
		if item.uid == 20017 then -- Put any unique id you want, as long as its not in use.
			doTransformItem(regular_aol,edited_aol)
            doPlayerAddBlessing(cid, 1)
            doPlayerAddBlessing(cid, 2)
            doPlayerAddBlessing(cid, 3)
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE)
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You may now put on your new 50% less death loss Aol.")
		end
	end
	return 1
end
Easy config inside the script.

Then in actions.xml add this
XML:
	<action itemid="    " event="script" value="                 "/>  -- Put whatever item id you want, and put the name of the new file you just made.

Its not tested so try it out and give me the errors. If any ofcourse.
 
Its good script but
It's dont transform for new AOL who loss less 50% exp, it just after click add 1,2,3 bless. Player can Drop this later and he will still got that 3 bless.

It's still not that what i need but really thx for Try to Help :)
 
Hello there,

I am really bad in lua language. Just a beginner. I have changed Protegy's script a little bit... Don't blame me if it doesn't work - I wouldn't be surprised if it didnt lol.

If someone that is good at lua already sees that my script won't work, please don't blame me but tell me what is wrong. Everyone were beginners someday in the past.

PHP:
local config = {
regular_aol = -- Id for the item you want the player to use to transform it into the new aol.
edited_aol = -- Id for the edited aol.
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) then
		doPlayerSendCancel(cid,'You have already used an aol!')
	else
		if item.uid == 20017 then -- Put any unique id you want, as long as its not in use.
			doTransformItem(20017, edited_aol)
            doPlayerAddBlessing(cid, 1)
            doPlayerAddBlessing(cid, 2)
            doPlayerAddBlessing(cid, 3)
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE)
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You may now put on your new 50% less death loss Aol.")
		end
	end
	return 1
	elseif(getCreatureHealth(cid) and (getCreatureMana(cid))) <= (getCreatureMaxHealth(cid) and (getCreatureMaxMana(cid))) then
	doPlayerRemoveItem(cid, CONST_SLOT_NECKLACE, edited_aol)
	end
end
 
Aseki, thx for helping but i didn't watch it work or not.
See this lines:
Lua:
            doPlayerAddBlessing(cid, 1)
            doPlayerAddBlessing(cid, 2)
            doPlayerAddBlessing(cid, 3)

Its add player bless so when he put off this AOL he STILL WILL GET Bless.
You know what i mean? So i still search for script that AOL give you 50% loss less exp but when you put off it you will dont get 50% loss less exp.
 
Back
Top