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
Tactics, Focus or similar script
Author Message
XuN
Sphere Developer
*****

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



Post: #10
RE: Tactics, Focus or similar script
(09-26-2013 02:49 AM)Archaaz Wrote:  Ah, thanks! Between the three of you helping me this script will end up being two lines long....Smile

If you wanne improve it more I think you should cleanup code from SCP formula.settings and left up only what you are going to use, I mean...
Code:
[function f_combatsys_hitchance]
doswitch <def.scp.Combat_FormulasUsed>
   return <args> // SPHERE
   begin // Custom - Reference to scp.Combat_HitChance
      doswitch <def.scp.Combat_HitChance>
         return <args>
         return <qval <r100> <= <eval ((<<combat.skill.uor>> * 10) + 5000) / (((<src.<src.combat.skill.uor>> / 10) + 50) * 2)> ? 0 : -100>
         return <qval <r100> <= <f_combatsys_hitchance_aos> ? 0 : -100>
      enddo
   end
   return <qval <r100> <= <eval ((<<combat.skill.uor>> * 10) + 5000) / (((<src.<src.combat.skill.uor>> / 10) + 50) * 2)> ? 0 : -100>
   return <qval <r100> <= <f_combatsys_hitchance_aos> ? 0 : -100>
enddo
You have this and you are going to use AOS formulas? cleanup time!
Code:
[function f_combatsys_hitchance]
return <qval <r100> <= <f_combatsys_hitchance_aos> ? 0 : -100>
It will only last this part of function and you can /2 scripts size and what it's more important for you now... you get some experience in cleaning up! and also you will read up better what this scripts are doing.

And if you are going to work with SkillClasses with different damage bonus per class... it won't be a bad idea to cut up your main damage events and apply on that skillclasses with only their bonus so you can customize better.
09-26-2013 03:00 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Tactics, Focus or similar script - Archaaz - 09-24-2013, 07:08 PM
RE: Tactics, Focus or similar script - XuN - 09-25-2013, 09:31 PM
RE: Tactics, Focus or similar script - XuN - 09-26-2013, 01:26 AM
RE: Tactics, Focus or similar script - XuN - 09-26-2013 03:00 AM

Forum Jump:


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