Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. loop through characters
  2. get the player-name('pN')
  3. get the player-Lvl('pL')
  4. get the player-sum('pS'[make sure to take alignment, hero, and potions into account])
  5. setup fnick and fsum to store the current best fight
  6. setup bnick and bsum to store the secondary best fight(for if no characters have a greater sum and level than you)
  7. if (player-level < your-level) exit loop
  8. if (player-name != yourcharacter-name) {
  9. if ((pL = null) or (pL > yourlevel)) and ((pS is null) or (fsum is null) or (ps < fsum) {
  10. set fnick to pN
  11. set fSum to pS
  12. }
  13. elseif ((pL = null) or (pL >= yourlevel)) and ((pS = null) or (bsum is null) or (pS < bsum) {
  14. set bnick to pN
  15. set bSum to pS
  16. }
  17. }
  18. loop next
  19. if (fnick != null) { return fnick }
  20. else { return bnick }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement