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-nmm6 (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-nmm6 (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-nmm6 (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
random 1 player in region
Author Message
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #9
RE: random 1 player in region
The problem with the function is that it fires on every character in the region and it uses local variables to gather information... Skul, you should know better lol Tongue

This is untested and I'm sure it can be done in a better way, but I just wrote it on the fly hoping it solves your problem right away Smile

Code:
[function luckyplayer]
region.allclients luckyplayer_choose_rnd
if (<region.tag0.luckyplayers>)
  local.player=<eval {1 <region.tag0.luckyplayers>}>
  local.player=<region.tag0.luckyplayer.<dlocal.player>>
  uid.<local.player>.f_luckyplayer
endif
region.cleartags luckyplayers

[function luckyplayer_choose_rnd]
region.tag0.luckyplayers += 1
region.tag.luckyplayer.<dregion.tag0.luckyplayers>=<uid>

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
09-02-2012 11:42 PM
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
random 1 player in region - Alias - 08-30-2012, 08:46 PM
RE: random 1 player in region - Skul - 08-31-2012, 05:21 AM
RE: random 1 player in region - Alias - 08-31-2012, 06:36 AM
RE: random 1 player in region - Alias - 08-31-2012, 07:35 PM
RE: random 1 player in region - Alias - 09-02-2012, 05:02 AM
RE: random 1 player in region - Skul - 09-02-2012, 05:03 AM
RE: random 1 player in region - Alias - 09-02-2012, 05:26 AM
RE: random 1 player in region - Alias - 09-02-2012, 08:59 PM
RE: random 1 player in region - Ben - 09-02-2012 11:42 PM
RE: random 1 player in region - Alias - 09-03-2012, 01:17 AM
RE: random 1 player in region - Skul - 09-03-2012, 10:32 AM
RE: random 1 player in region - Ben - 09-03-2012, 10:46 AM

Forum Jump:


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