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-nmm6 (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-nmm6 (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-nmm6 (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
Pidrila
Apprentice
*

Posts: 36
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2013
Reputation: 0



Post: #1
Combat %
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..
01-22-2014 12:48 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Combat %
tag.ArmorbonusDam = <eval (9*<str>) / 100> or you can use tag.ArmorbonusDam =<muldiv <str> 9 100>
(This post was last modified: 01-22-2014 01:17 AM by darksun84.)
01-22-2014 01:16 AM
Find all posts by this user Like Post Quote this message in a reply
Pidrila
Apprentice
*

Posts: 36
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2013
Reputation: 0



Post: #3
RE: Combat %
thanks
01-22-2014 01:48 AM
Find all posts by this user Like Post Quote this message in a reply
Wap
Journeyman
*

Posts: 138
Likes Given: 6
Likes Received: 7 in 6 posts
Joined: Mar 2012
Reputation: 3

UORPG.net

Post: #4
RE: Combat %
Good nickname. Big Grin
01-22-2014 06:24 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Pidrila
Apprentice
*

Posts: 36
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2013
Reputation: 0



Post: #5
RE: Combat %
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
01-22-2014 09:33 PM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

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



Post: #6
RE: Combat %
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.
01-22-2014 09:43 PM
Find all posts by this user Like Post Quote this message in a reply
Runcuks
Journeyman
*

Posts: 179
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Nov 2012
Reputation: 0



Post: #7
RE: Combat %
(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
01-22-2014 10:47 PM
Find all posts by this user Like Post Quote this message in a reply
Pidrila
Apprentice
*

Posts: 36
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2013
Reputation: 0



Post: #8
RE: Combat %
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
01-25-2014 07:52 PM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

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



Post: #9
RE: Combat %
(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>)
01-25-2014 08:02 PM
Find all posts by this user Like Post Quote this message in a reply
Pidrila
Apprentice
*

Posts: 36
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Apr 2013
Reputation: 0



Post: #10
RE: Combat %
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..
01-25-2014 08:12 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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