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

how edit damage min and max of a weapon

Thorn

Spriting since 2013
Joined
Sep 24, 2012
Messages
2,203
Solutions
1
Reaction score
923
Location
Chile
NO SHOOTYPE EFFECT ON WEAPON
SORRY I MADE A MISTAKE IN TITLE D:

Hi, i have this problem, when i use a special vip spear it attacks like any knight weapon but with distance and in distance...but i would like to see a royal spear shoottype effect :S
plz help me, here are the data:
XML:
<item id="2427" article="a" name="Supreme Spear">
		<attribute key="weight" value="3000"/>
		<attribute key="attack" value="200"/>
		<attribute key="hitChance" value="100"/>
		<attribute key="weaponType" value="distance"/>
		<attribute key="range" value="10"/>
                <attribute key="shootType" value="royalspear" />
the last part i added but didn't work :S


and weapons:
XML:
<distance id="2427" script="catalyst spear.lua"/>

and spear lua:
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 47)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)

local area = createCombatArea( { {1, 1, 1},{1, 3, 1}, {1, 1, 1} } )
setCombatArea(combat, area)

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

oooh and besides plz teach me how to make the attack of it with min and max :D
 
Last edited:
It could be something like this:

XML:
<attribute key="shootType" value="royalspear"/>

And remove the following lines in your weapon lua script:

LUA:
setCombatParam(combat, COMBAT_PARAM_EFFECT, 47)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_DEATH)
 
Ok i will try :D

- - - Updated - - -

it didn't work :S, i still don't see any shoot type, it attacks like a regular knight weapon but from distance :S
 
LUA:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, 47)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ROYALSPEAR)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 1, 0, 1, 0)
 
local area = createCombatArea( { {1, 1, 1},{1, 3, 1}, {1, 1, 1} } )
setCombatArea(combat, area)
 
function onUseWeapon(cid, var)
	return doCombat(cid, combat, var)
end
 
Back
Top