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
Parrying new formula
Author Message
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #2
RE: Parrying new formula
Usually you just need a simple formula and return 0 (fail) or 1 (success), but @UseQuick is a bit tricky because using return 0/1 will skip skillgain, so you have to use return 2 to proceed with default internal action (skillgain) and deal with ARGN2 (action difficulty) / ARGN3 (force success/fail)

Code:
ON=@UseQuick
IF (<FLAGS> & statf_hasshield)
  ARGN2 = <eval (<PARRYING> * 150) / 1000>
ELSE
  ARGN2 = <eval (<PARRYING> * 75) / 1000>
ENDIF

IF (<ARGN2> > <R1000>)
  ARGN3=1   //tell internal functions that the action has succeed
ELSE
  ARGN3=-1  //tell internal functions that the action has failed
ENDIF
return 2
(This post was last modified: 12-27-2019 12:54 PM by Coruja.)
12-27-2019 12:50 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Parrying new formula - Snaigel - 12-26-2019, 07:06 PM
RE: Parrying new formula - Coruja - 12-27-2019 12:50 PM
RE: Parrying new formula - Snaigel - 12-27-2019, 02:49 PM

Forum Jump:


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