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
How to compare random values
Author Message
Skul
Master
**

Posts: 413
Likes Given: 0
Likes Received: 19 in 15 posts
Joined: Jun 2012
Reputation: 9



Post: #13
RE: How to compare random values
local.total can work, let's say you're using this on an npc to divvy gold at death, here's an example:
Code:
on=@death
local.total=<eval {1 15}> //example amount
if (<attackers>)
  local.divvy=<eval <local.total> /<local.attackers>> //divvy between all attackers
  for x 0 <eval <attackers> +-1>
    uid.<attacker.<local.x>.uid>.newgold <local.divvy> //give divided gold to the attacker
  endfor
endif
This event would be placed on the monster, or all monsters, however u choose to use it.

"I ask a question to the answer I already know."

Marchadium :: http://www.marchadium.ca/ :: Join us!
06-18-2014 08:00 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
How to compare random values - kn4tseb - 06-17-2014, 01:28 PM
RE: How to compare random values - XuN - 06-17-2014, 05:58 PM
RE: How to compare random values - kn4tseb - 06-18-2014, 12:05 AM
RE: How to compare random values - Seron - 06-18-2014, 12:50 AM
Re: How to compare random values - Extreme - 06-18-2014, 02:14 AM
RE: How to compare random values - Coruja - 06-18-2014, 02:21 AM
RE: How to compare random values - kn4tseb - 06-18-2014, 02:42 AM
RE: How to compare random values - kn4tseb - 06-18-2014, 07:22 AM
RE: How to compare random values - Extreme - 06-18-2014, 07:45 AM
RE: How to compare random values - Skul - 06-18-2014, 07:31 AM
RE: How to compare random values - kn4tseb - 06-18-2014, 07:51 AM
RE: How to compare random values - Extreme - 06-18-2014, 07:59 AM
RE: How to compare random values - Skul - 06-18-2014 08:00 AM
RE: How to compare random values - kn4tseb - 06-18-2014, 08:08 AM
RE: How to compare random values - kn4tseb - 06-18-2014, 09:12 AM
RE: How to compare random values - XuN - 06-18-2014, 07:19 PM
RE: How to compare random values - Coruja - 06-19-2014, 12:49 AM
RE: How to compare random values - kn4tseb - 06-19-2014, 01:33 PM

Forum Jump:


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