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


RE: Combat % - XuN - 01-26-2014 03:37 AM

Read the notes and comments.

Code:
ON=@SpellEffect
if (<serv.spell.<argn>.flags>&spellflag_harm)    //this line checks for harmfull spells, so only these would pass to calculations
    IF (<ARGN>==18)
        src.tag.spellstrenght = 20
    elif (<ARGN>==30)&&(<ARGN>==42)&&(<ARGN>==49)
        src.tag.spellstrenght = 10
    else
        src.tag.spellstrenght = 5
    endif
    damage=0,dam_god,<src>    //We make the char receiving the spell to receive real damage, so the @GetHit trigger is being fired
endif

ON=@GetHit
IF (<SRC.ISPLAYER>) && (<tag0.spellstrenght>)    //if we are receiving damage marked (with the tag) as magic, we run the code
    //note that you made a IsPlayer check, so this will be run only if the attacker is a player, if the caster is a npc this won't be executed.
    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>+<src.tag.spellstrenght>)//Note: tag.DamPercent is doing a sum here, not really a percentaje
    ARGN1 += <src.tag.argn1>
    tag.spellstrenght    //we clear the tag
ENDIF



RE: Combat % - Pidrila - 01-26-2014 05:47 AM

XuN thanks for help, at now i am through phone, when i will be at home i will test this and reply for results Smile

Sent from my PAP4055DUO using Tapatalk


RE: Combat % - Pidrila - 01-26-2014 08:10 AM

thanks its working Wink but now how i can take effect when someone is stepping on fire field then player book who set the filed makes -1 charge for every step..

i tryed
if argn2damfire nothing happened..


Re: RE: Combat % - Pidrila - 01-27-2014 01:11 AM

Okey thanks everything is okey for now

Sent from my PAP4055DUO using Tapatalk


Re: RE: Combat % - Pidrila - 01-27-2014 01:11 AM

Okey thanks everything is okey for now

Sent from my PAP4055DUO using Tapatalk


RE: Combat % - Pidrila - 01-27-2014 07:44 PM

How i can set a TAG on @HIT when player hit, then use a function that locates the skill that is using to hit.. like if i am warrior class with weapon Club then set Tag .... tactics + macefighting if warrior with sword then tactics + swordsmanship ??, i tried with simple function if <action>=macefighting
Src.tag.skillbonus = <macefighting> and so for all skills, but the problem is that if i do this check then it takes all skills bonus, not that is used by hitting..

Sent from my PAP4055DUO using Tapatalk


RE: Combat % - Alaric - 01-27-2014 08:18 PM

1. Don't use tag for that but direct calculation
2. in trigger @hit - <argo.skill> is skill equiped weapon is using. and <<argo.skill>> is its value.


RE: Combat % - Pidrila - 01-28-2014 12:37 AM

(01-27-2014 08:18 PM)Alaric Wrote:  1. Don't use tag for that but direct calculation
2. in trigger @hit - <argo.skill> is skill equiped weapon is using. and <<argo.skill>> is its value.

thank you Smile


RE: Combat % - darksun84 - 01-28-2014 12:52 AM

Remember to add a check for wrestling !


RE: Combat % - Pidrila - 01-28-2014 01:02 AM

(01-28-2014 12:52 AM)darksun84 Wrote:  Remember to add a check for wrestling !

already checked Smile