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

Attr Key

Nashalito

New Member
Joined
May 21, 2009
Messages
273
Reaction score
0
Hello.

I have this weapon 7434 , and i want everytime i hit it will attack + 300 fire /ice/death

i am using 0.3.6
 
Right now i got that script.
<item id="7434" article="a" name="Upgraded Pro Axe">
<attribute key="description" value="This is an upgraded Pro Axe. It adds fire damage to the enemy."/>
<attribute key="weight" value="11000"/>
<attribute key="defense" value="29"/>
<attribute key="attack" value="133"/>
<attribute key="weaponType" value="axe"/>
<attribute key="extradef" value="3"/>
</item>
 
In weapons.xml, find:
XML:
	<melee id="7434" level="75" unproperly="1" event="function" value="default"/>
and replace with:
XML:
	<melee id="7434" level="75" unproperly="1" event="script" value="pro_axe.lua"/>
create file: data/weapons/scripts/pro_axe.lua
LUA:
local physical = createCombatObject()
setCombatParam(physical, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(physical, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(physical, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)

local fire = createCombatObject()
setCombatParam(fire, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatFormula(fire, COMBAT_FORMULA_SKILL, 0, -300, 0, -300)

local ice = createCombatObject()
setCombatParam(ice, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE)
setCombatFormula(ice, COMBAT_FORMULA_SKILL, 0, -300, 0, -300)

local death = createCombatObject()
setCombatParam(death, COMBAT_PARAM_TYPE, COMBAT_DEATHDAMAGE)
setCombatFormula(death, COMBAT_FORMULA_SKILL, 0, -300, 0, -300)

function onUseWeapon(cid, var)
	return doCombat(cid, physical, var) and doCombat(cid, fire, var) and doCombat(cid, ice, var) and doCombat(cid, death, var)
end
 
Back
Top