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
R99
Author Message
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #9
RE: R99
LOCAL.RAND=<EVAL {1 1000}>
IF (<LOCAL.RAND><=5) //0.5% Chance Loot Drop

has the same results as

IF (<R1,1000><=5) //0.5% Chance Loot Drop

which is the same as

IF (<R><=5) //0.5% Chance Loot Drop

...except that in these versions, there less for the server to do since there is less script to parse, no allocation of memory for the temporary local string variable, no evaluation of the random {}, no assignment of the resulting integer to the string value, no re-evaluation of the string back to an integer in the if statement...

To be fair however, this all takes place in microseconds.inside a @Death trigger that does not get called all that often. :-)
04-28-2013 12:13 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
R99 - Art - 04-19-2013, 04:53 PM
RE: R99 - x77x - 04-19-2013, 05:40 PM
RE: R99 - Art - 04-19-2013, 05:59 PM
RE: R99 - UltimaAku - 04-21-2013, 07:31 PM
RE: R99 - Rattlehead - 04-27-2013, 05:43 PM
RE: R99 - x77x - 04-22-2013, 07:00 AM
RE: R99 - Wap - 04-22-2013, 11:18 AM
RE: R99 - Gil Amarth - 04-22-2013, 09:36 PM
RE: R99 - RanXerox - 04-28-2013 12:13 AM
RE: R99 - Art - 04-28-2013, 05:18 PM
RE: R99 - Rattlehead - 04-28-2013, 06:47 PM

Forum Jump:


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