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
Overriding combat 'misses', ACTDIFF?
Author Message
Murmur
Apprentice
*

Posts: 33
Likes Given: 3
Likes Received: 2 in 2 posts
Joined: Feb 2013
Reputation: 0



Post: #5
RE: Overriding combat 'misses', ACTDIFF?
Thanks again for your reply darksun84.

I went ahead and started testing a PLEVEL=1 character and found that in this particular instance it didn't matter.

However, I wanted to share what I have found messing around with this today:

From what I can tell, doing this in the @HitTry event:

Code:
ACTDIFF = <eval -10>

Makes you miss every single time.

Doing this below, as you said, makes you 'hit' every single time:
Code:
ACTDIFF = <eval 10>

Then, since I wanted to create my own 'chance to hit' code that depends on what your tactics skill is, solely, I started playing around with different values for ACTDIFF. What I found is that ANY value less than or equal to -10, makes you miss every time. And from my quick testing, ANY value greater than or equal to -9 makes you hit every single time. (Please correct me if I'm wrong).

So in my instance, I wanted to make code that if you have 100 or more Tactics, you would have a 1 in 10 chance to miss, said another way, a 9 in 10 chance to hit. So I created this code that seems to work perfectly for my uses:

Code:
IF <eval <I.tactics>> >= 100
    ACTDIFF = <eval RAND(-10,-1)>
    SAY actdiff is <ACTDIFF>
    RETURN 0
ENDIF

As you can see the use of a random number...

From my preliminary testing, this seems to work. However, I've run into another issue (of course!!!).

So in my @HitTry, I am first calculating my swing speed timer with ARGN1 based on my dex, then after that block of code, I'm using more code to decide what my chance to hit is by checking what my tactics is.

This is where I ran into an issue, I need a command like 'GOTO line 2314' or something like that. In otherwords, in my original @HitTry that I created to determine my swing time in reference to my DEX value, I was using RETURN 0 to jump out of the IF statements. What command do I need to use to 'jump' out of my swing speed code, and jump down to my chance to hit code?

Again I appreciate your time.
-Murmur

*you glance to your left to a region you just surveyed... you glimpse a magical being, more shadow than substance, caught midway in transformation... the figure smiles, the corners of his mouth jut upwards slightly on the edges, suddenly stretched to a length not at all human...*
(This post was last modified: 05-08-2017 07:11 AM by Murmur.)
05-08-2017 07:10 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Overriding combat 'misses', ACTDIFF? - Murmur - 05-08-2017 07:10 AM

Forum Jump:


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