haxball / haxball-issues

115 stars 43 forks source link

Haxball Functions Headless - !rank or !bestplayer tutorial please #313

Closed MocSako closed 6 years ago

Wrathen commented 6 years ago

I can share a Turkish source for 1v1 Bot made in an older API but still works in the current API. https://hastebin.com/ixiyacuwuv.js

What you need to do is:

Ganji3469 commented 3 years ago

hastebin was bugged xd, you can it send me in private of discord? Duque de Sobral#0605

Egesahin2007 commented 2 years ago

I can share a Turkish source for 1v1 Bot made in an older API but still works in the current API. https://hastebin.com/ixiyacuwuv.js

What you need to do is:

  • Keep tracking of every player's wins-loses in an array. (oyuncular in the code I provided.)
  • When a player joins the room make a new player object for him.
  • When a player leaves the room delete the player object from the array.
  • When a player types "!rank" you search the player in the array and return his wins-loses (AnnounceOyuncuStatus(id) in the code I provided.)
  • When a player types "!bestplayer" you search all the array and find <the best win/lose ratio> or holder player then you announce him. (AnnounceTopOyuncu() in the code I provided.), Reis bana da atabilcen mi o kodu ya lütfen çok lazım discordumu veriyorum !flex#9670 lütfen ulaş bana
guilhermeabell commented 5 months ago

@Egesahin2007 @Wrathen hastebin link was bugged, send me in discord please?