Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loop through characters
- get the player-name('pN')
- get the player-Lvl('pL')
- get the player-sum('pS'[make sure to take alignment, hero, and potions into account])
- setup fnick and fsum to store the current best fight
- setup bnick and bsum to store the secondary best fight(for if no characters have a greater sum and level than you)
- if (player-level < your-level) exit loop
- if (player-name != yourcharacter-name) {
- if ((pL = null) or (pL > yourlevel)) and ((pS is null) or (fsum is null) or (ps < fsum) {
- set fnick to pN
- set fSum to pS
- }
- elseif ((pL = null) or (pL >= yourlevel)) and ((pS = null) or (bsum is null) or (pS < bsum) {
- set bnick to pN
- set bSum to pS
- }
- }
- loop next
- if (fnick != null) { return fnick }
- else { return bnick }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement