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
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
List of skills (highest to lowest)
Author Message
Soulless
Super Moderator
****

Posts: 335
Likes Given: 29
Likes Received: 49 in 27 posts
Joined: Jun 2012
Reputation: 12

Ye Olde Sphere

Post: #1
List of skills (highest to lowest)
Can anyone see a better way of creating this script? it def will lag the player if they did it often. I just got it all working, i think im just having a dumb day, but if anyone can do this better please feel free to chime in.

Code:
[function rankskill] //compare 1 skill to the other 48 and return ranking
for 48
if (<<serv.skill.<argn>.key>> == <<serv.skill.<local._for>.key>>) && (<argn>!=<local._for>)
local.sameas += 1
endif
if (<<serv.skill.<argn>.key>> > <<serv.skill.<local._for>.key>>)
local.betterthan += 1
endif
endfor
return <eval (48-<local.betterthan>)>


[function compareskills]
serv.log <local.rank>
for 48    //set skill ranks
if !(<local.skill<rankskill <local._for>>>)
local.skill<rankskill <local._for>>=<serv.skill.<local._for>.key>
else


local.x=<rankskill <local._for>>
local.messedup=1
while <local.messedup>
if (<local.skill<eval <local.x>>>)
local.x -= 1
else
local.skill<eval <local.x>>=<serv.skill.<local._for>.key>
local.messedup=

endif
endwhile

endif
endfor


for 48     //test in console to see if it lists right
serv.log <local.skill<eval <local._for>>>
endfor
(This post was last modified: 07-23-2012 01:05 AM by Soulless.)
07-22-2012 09:34 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
List of skills (highest to lowest) - Soulless - 07-22-2012 09:34 PM

Forum Jump:


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