The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Combat %
Author Message
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #11
RE: Combat %
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
01-26-2014 03:37 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Combat % - Pidrila - 01-22-2014, 12:48 AM
RE: Combat % - darksun84 - 01-22-2014, 01:16 AM
RE: Combat % - Pidrila - 01-22-2014, 01:48 AM
RE: Combat % - Wap - 01-22-2014, 06:24 AM
RE: Combat % - Pidrila - 01-22-2014, 09:33 PM
RE: Combat % - Runcuks - 01-22-2014, 10:47 PM
RE: Combat % - XuN - 01-22-2014, 09:43 PM
RE: Combat % - Pidrila - 01-25-2014, 07:52 PM
RE: Combat % - XuN - 01-25-2014, 08:02 PM
RE: Combat % - Pidrila - 01-25-2014, 08:12 PM
RE: Combat % - XuN - 01-26-2014 03:37 AM
RE: Combat % - Pidrila - 01-26-2014, 05:47 AM
RE: Combat % - Pidrila - 01-26-2014, 08:10 AM
Re: RE: Combat % - Pidrila - 01-27-2014, 01:11 AM
Re: RE: Combat % - Pidrila - 01-27-2014, 01:11 AM
RE: Combat % - Pidrila - 01-27-2014, 07:44 PM
RE: Combat % - Alaric - 01-27-2014, 08:18 PM
RE: Combat % - Pidrila - 01-28-2014, 12:37 AM
RE: Combat % - darksun84 - 01-28-2014, 12:52 AM
RE: Combat % - Pidrila - 01-28-2014, 01:02 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)