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

Lua Donator items

Demonkil

Beginner Mapper
Joined
Dec 21, 2007
Messages
468
Reaction score
12
I was wondering how to make items like ex.

dragon scale legs, have mana regain 100 mana every 1 sec, and have +%10 to sd damage.

may someone please show me a basic idea of how to do it or point me to a new tut, thanks rep will be given
 
... id be carefull with the items you put on your shop. you'd be suprised how easy an item that gives 100 per tick can screw a server over.
 
... id be carefull with the items you put on your shop. you'd be suprised how easy an item that gives 100 per tick can screw a server over.
In server owner's eyes, it's all about money. I could say that many server owners don't really care about such things.
 
Making shop items....people should learn it doing it by themselves since they wanna earn money with it...but i give u a hint...its items.xml and movements.xml
 
to have mana regain 100 mana every 1 sec... your item should be like this:

<item id="2469" name="dragon scale legs">
<attribute key="weight" value="4800"/>
<attribute key="armor" value="10"/>
<attribute key="slotType" value="legs"/>

<attribute key="manaGain" value="100"/> <!-- how much mana -->
<attribute key="manaTicks" value="1000"/> <!-- ticks -->
</item>
to hit Death Damage +10%... I don't know, maybe something like ElementBlaBlaBla or scripts... :S

EDIT:

in a support post, please, give a solution and does not create more doubts. yeah I know that many and many Ots goes down because of its owners eyes, but i think that the given idea by DemonKil of 100MP/sec are only for example purposes...
 
Last edited:
+10% sd damage,
Code:
local combat = {}
for i = 1, 2 do
	table.insert(combat, createCombatObject())
	setCombatParam(combat[i], COMBAT_PARAM_TARGETCASTERORTOPMOST, TRUE)
	setCombatParam(combat[i], COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
	setCombatParam(combat[i], COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
	setCombatParam(combat[i], COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
	setCombatFormula(combat[i], COMBAT_FORMULA_LEVELMAGIC, i == 1 and -1.3 or 1.43, -30, i == 1 and -1.8 or 1.98, 0)
end

function onCastSpell(cid, var)
	return doCombat(cid, combat[getPlayerSlotItem(cid, CONST_SLOT_LEGS).itemid == 2469 and 2 or 1], var)
end
 
+10% sd damage,
Code:
local combat = {}
for i = 1, 2 do
	table.insert(combat, createCombatObject())
	setCombatParam(combat[i], COMBAT_PARAM_TARGETCASTERORTOPMOST, TRUE)
	setCombatParam(combat[i], COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
	setCombatParam(combat[i], COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
	setCombatParam(combat[i], COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SUDDENDEATH)
	setCombatFormula(combat[i], COMBAT_FORMULA_LEVELMAGIC, i == 1 and -1.3 or 1.43, -30, i == 1 and -1.8 or 1.98, 0)
end

function onCastSpell(cid, var)
	return doCombat(cid, combat[getPlayerSlotItem(cid, CONST_SLOT_LEGS).itemid == 2469 and 2 or 1], var)
end
wow!, it's very simple... I'll rep++ you x)
 
to have mana regain 100 mana every 1 sec... your item should be like this:

to hit Death Damage +10%... I don't know, maybe something like ElementBlaBlaBla or scripts... :S

EDIT:

in a support post, please, give a solution and does not create more doubts. yeah I know that many and many Ots goes down because of its owners eyes, but i think that the given idea by DemonKil of 100MP/sec are only for example purposes...


so if i want -+%10 to phis or sd do i just put it in there and it will work or do i have to put something in a diff file also. and the only reason i am doing donations is for a dedi server :p
 
No i want protection, so like i have a golden helmet that absorbes %20 of sd damage i.e if sum1 hits 1000 with sd with the helmet it will be 800. like that i mean
 
<item id="2471" article="a" name="golden helmet">
<attribute key="description" value="It is the famous Helmet of the Stars."/>
<attribute key="weight" value="3200"/>
<attribute key="armor" value="12"/>
<attribute key="slotType" value="head"/>
<attribute key="absorbPercentDeath" value="20"/>
</item>

??
 
items.xml
Code:
	<item id="2471" article="a" name="golden helmet">
		<attribute key="description" value="It's the famous Helmet of the Stars."/>
		<attribute key="weight" value="3200"/>
		<attribute key="armor" value="12"/>
		<attribute key="slotType" value="head"/>
		<attribute key="absorbPercentDeath" value="20"/>
	</item>
movements.xml
Code:
	<movevent type="Equip" itemid="2471" slot="head" event="function" value="onEquipItem"/>
	<movevent type="DeEquip" itemid="2471" slot="head" event="function" value="onDeEquipItem"/>
 
Back
Top