SphereCommunity
Combat % - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Combat % (/Thread-Combat)

Pages: 1 2


Combat % - Pidrila - 01-22-2014 12:48 AM

Hey, i just wanna ask you guys for a little advice...

i am making combat system, i get bonus damage from armors..
like this

Code:
if <isevent.E_ACID2>
tag.ArmorbonusDam = <eval(<str>/29)>

How i can set the % from <str> not <str>/29 but to be like this

Code:
tag.ArmorbonusDam = <eval(9% of <str>)>

sorry for my english..


RE: Combat % - darksun84 - 01-22-2014 01:16 AM

tag.ArmorbonusDam = <eval (9*<str>) / 100> or you can use tag.ArmorbonusDam =<muldiv <str> 9 100>


RE: Combat % - Pidrila - 01-22-2014 01:48 AM

thanks


RE: Combat % - Wap - 01-22-2014 06:24 AM

Good nickname. Big Grin


RE: Combat % - Pidrila - 01-22-2014 09:33 PM

Which trigger is right in combat, for a spells?? i tryed on=@spellcast
if <ismage>
argn1= (<str>/20)
serv.log im casting - <name> and hitting <act.name>
elif <iswarior>
argn1= (<str>/50)
.......

how to get right trigger?

and there is nothing happens


RE: Combat % - XuN - 01-22-2014 09:43 PM

Read this: http://wiki.sphere.torfo.org/index.php/@SpellCast

Argn1= Spell Number
Argn2= Strenght of the spell (in some way)

And, if nothing happens, the problem will be your <IsMage> or <IsWarior> functions, or the trigger not added to an event added to the player.


RE: Combat % - Runcuks - 01-22-2014 10:47 PM

(01-22-2014 09:33 PM)Pidrila Wrote:  Which trigger is right in combat, for a spells?? i tryed on=@spellcast
if <ismage>
argn1= (<str>/20)
serv.log im casting - <name> and hitting <act.name>
elif <iswarior>
argn1= (<str>/50)
.......

how to get right trigger?

and there is nothing happens

Uz On=@GetHit pameegini


RE: Combat % - Pidrila - 01-25-2014 07:52 PM

i got it no @GetHit

the function of combat damage of spells for me is
Code:
IF (<SRC.ISPLAYER>)
    src.tag.warskillproc = <eval(<src.tag.warskill>/50)>
    src.tag.DamPercent = <eval((<src.tag.magicPower_firelord_book>) + (<src.tag.ArmorbonusDam>)>
    src.tag.argn1 = (<src.tag.DamPercent>+<src.tag.warskillproc>)
    ARGN1 += <src.tag.argn1>
ENDIF

but then is the problem, i need to set spell numbers , to set damage for each spell

tried this, but can;t resolve it..
Code:
IF ( <SERV.SPELL(<ARGN>==18 )>
src.tag.spellstrenght = 20
elif (<ARGN>==30)&&(<ARGN>==42)&&(<ARGN>==49)
src.tag.spellstrenght = 10
else
src.tag.spellstrenght = 5
endif



RE: Combat % - XuN - 01-25-2014 08:02 PM

(01-25-2014 07:52 PM)Pidrila Wrote:  tried this, but can;t resolve it..
Code:
IF ( <SERV.SPELL(<ARGN>==18 )>
src.tag.spellstrenght = 20
elif (<ARGN>==30)&&(<ARGN>==42)&&(<ARGN>==49)
src.tag.spellstrenght = 10
else
src.tag.spellstrenght = 5
endif

Look at your first and second IF, the second one is correctly done, the first one should look similar to it, but with only (<argn>==18), and for the damage itself you should add this tag to the combate damage function:
src.tag.argn1 = (<src.tag.DamPercent>+<src.tag.warskillproc>+<src.tag.spellstrenght>)


RE: Combat % - Pidrila - 01-25-2014 08:12 PM

that was only like test function, but it wont work with elif (<ARGN>==30)&&(<ARGN>==42)&&(<ARGN>==49) because it is on=@gethit trigger..
and i cant do it on spelleffect trigger, because my damage system is on gethit trigger..