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

Few script needed for OT newbie! (:

Shinobino

New Member
Joined
Jan 26, 2009
Messages
39
Reaction score
0
Hello guys! I started my OT 'carreer'. I need few scripts for my future OT.

1. Ring of the life - Power ring - when wearing it player's health is increased to 125% of his health, f.e. 100 hp normally, when wearing ring 125 hp.

2. Ring of the mana - Ring of the sky - when wearing it player's mana is increased to 120% of his mana, f.e. 100 mana normally, when wearing ring 120 mana.

3. Exp ring - Emerald bangle - last for XX hours, while wearing player gets 50% more exp.

4. Exp potion - usable just 1 time, then it dissapear, when using it players will get XXXX exp, f.e. 1 million.

5. Mwall rune that shot wall of 3 mwalls. MWALL MWALL MWALL ( like this, didnt know how to explain correctly =p ), 15 charges.

Thanks for everone who will help me =)
Greetings
 
1.
items.xml
Code:
<item id="2166" article="a" name="power ring">
		<attribute key="weight" value="80" />
		<attribute key="slotType" value="ring" />
		<attribute key="transformEquipTo" value="2203" />
		<attribute key="stopduration" value="1" />
		<attribute key="showduration" value="1" />
	</item>

Code:
<item id="2203" article="a" name="power ring">
		<attribute key="weight" value="80" />
		<attribute key="slotType" value="ring" />
		<attribute key="decayTo" value="0" />
		<attribute key="transformDeEquipTo" value="2166" />
		<attribute key="maxhealthpercent" value="125" />
		<attribute key="duration" value="300" />
		<attribute key="showduration" value="1" />
	</item>

2.
items.xml

Code:
<item id="2123" article="a" name="ring of the sky">
		<attribute key="weight" value="40" />
		<attribute key="slotType" value="ring" />
		<attribute key="maxmanapercent" value="120" />
	</item>

movements.xml
Code:
<movevent type="Equip" itemid="2123" slot="ring" event="function" value="onEquipItem"/>
	<movevent type="DeEquip" itemid="2123" slot="ring" event="function" value="onDeEquipItem"/>

4.
actions/scripts/expPotion.lua
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local exp = 1000000
local msg = "You recieved one million experience!"
	doPlayerAddExperience(cid, exp)
	doPlayerSendTextMessage(cid, 22, msg)
return true
end

actions/actions.xml
PHP:
<action itemid="ITEM_ID_HERE" event="script" value="expPotion.lua"/>
 
magicalwall.lua
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1497)

local area = createCombatArea(AREA_WALLFIELD2, AREADIAGONAL_WALLFIELD2)
setCombatArea(combat, area)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

lib/spells.lua (add to the end)
Code:
AREA_WALLFIELD2 = {
	{0, 1, 3, 1, 0}
}

AREADIAGONAL_WALLFIELD2 = {
	{0, 0, 0, 0, 0},
	{0, 0, 1, 1, 0},
	{0, 1, 3, 0, 0},
	{0, 1, 0, 0, 0},
	{0, 0, 0, 0, 0},
}
 
Back
Top