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

Lua Spell'

marcos16

Falkhonn
Joined
May 4, 2012
Messages
224
Reaction score
1
You can magic give critical?
Example:
Attacking a spell with a magic sword that has 50% chance to critical. When the magic goes on the hit player multiply also multiplies the sword attack ... Is it possible? [Varying the critical chance of the value of each item]
 
No. Every server has. It is a multiplied attack, you choose the percentage that the item will have the critical hit.
But what I am using is a code added.
After adding the code in the source just put it in item.xml in attack item that you want
Code:
<attribute key="criticalhitchance" value="5"/>

If I want with the magic item to also multiply the damage
 
you could have a custom spell function that all spells call with the variables needed to execute combat, so you call it in every spell instead of just doCombat(...) and in there you check for crit chance and change dmg

or you can change the onCombat/onhealthchange function w/e ur code is using to change crit dmg and allow it for spells also

your script probably has COMBAT_MELEE or something in the combat script, if you add COMBAT_SPELL it will work
 
Last edited:
you can, but it depends on how the critical chance is done, if dmg is added in source no, but some scripts add it via onHealthChange or onCombat or w/e its called, and then ez to add to spells
 
Couldn't you just script the weapon and add a math.random chance to execute critical damage, and if not chance >= x execute regular damage?
 
Back
Top