Warcraft II Forum

Warcraft II => Mods & Development => Topic started by: iL on July 27, 2015, 07:23:40 AM

Title: GameBot source code
Post by: iL on July 27, 2015, 07:23:40 AM
Well, let me publish the gamebot source code here to let you deploy it on your own hardware.

gamebot is something you can deploy yourself and i have no time to work on that.

So, it has 3 parts in it:
1. stealthbot script () - used to receive commands from users.
2. war2 - creates games, presses start, exits the game.
3. nncron script - clicks mouse and keyboard on war2 screen.
nncron uses forth language, so that is quite specific language, i hope that is resolvable problem. Feel free to rewrite it to something well-known, like autoit or w/e.

stealthbot interconnects with nncron via emtpy files appeared on the same computer. Each file update activates a trigger to start some action for nncron. Then nncron enforces some action on war2 screen (keyboard clicks most likely).
There's almost to feedback from nncron+war2 to stealtbot. Exception is the gamebot appearing on the server.

So, example on how it works:
- you whisper gow ef to stealthbot.
- stealthbot creates the file "c:\nnCron\gowef.sem"
- nncron catches that file change and enforces create_game 1 event.
- nncron begin to click different buttons with some timeouts to create game with the required properties.
- then stealthbot waits for 30 sec and creates the file "c:\nnCron\gamestep4.sem"
- nncron generates the message: "The game will be autostarted in 1.5 min".
- if game owner whispers "start", stealthbot creates "c:\nnCron\startwar2.sem" file, then nncron starts the game, then waits, then trying to exit the game and trying to exit the game creation.

- also, if gamebot doesn't appear in chat for the expected period of time, stealthbot creates the file "c:\nnCron\resetwar2.sem", then nncron kills war2 process (if existing) and starts it again.

To be continued...
Title: Re: GameBot source code
Post by: iL on July 27, 2015, 09:23:35 AM
Well, no idea about the license to cover gamebot, let that be released under GPL license.
Stealthbot script:
Code: [Select]
' *
' * Copyright (C) 2015 il
' *
' * This program is free software; you can redistribute it and/or
' * modify it under the terms of the GNU General Public License
' * as published by the Free Software Foundation; either version 2
' * of the License, or (at your option) any later version.
' *
' * This program is distributed in the hope that it will be useful,
' * but WITHOUT ANY WARRANTY; without even the implied warranty of
' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
' * GNU General Public License for more details.
' *
' * You should have received a copy of the GNU General Public License
' * along with this program; if not, write to the Free Software
' * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

'il
'1.0
'&il_GameCreator:il

Public BotInChat, IsFirstJoin, TimerCheckAction, CheckActionAction, IsInGame, GameOwner
CreateObj "Timer", "TimerCheckAction"

Public BotInWork
BotInWork=0
' ----------------- Create file -------------------------------
Sub CreateFile(Filename)
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set file = fso.OpenTextFile(Filename,8,True)
  file.close
End Sub
' ----------------- Delete file -------------------------------
Sub DeleteFile(Filename)
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set file = fso.DeleteFile(Filename)
  file.close
End Sub
' ----------------- Write to file -----------------------------
Sub WriteToFile(Filename,Message)
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set file = fso.OpenTextFile(Filename, 2, False)
  file.WriteLine Message
  file.Close
End Sub
' ----------------- log ---------------------------------------
Sub Log(Message)
 AddQ "/w il " & Message
End Sub
' ----------------- Timer to check if command is finished -----
Sub TimerCheckAction_Timer()
  Log "timer event handled: " & CheckActionAction
  If IsInGame = 0 Then
    TimerCheckAction.Enabled = False
    WriteToFile  "c:\nnCron\resetwar2.sem", ""
    Init
  Else
    WriteToFile "c:\nnCron\gamestep" & IsInGame & ".sem", ""
    IsInGame = IsInGame - 1
  End If
End Sub
' ----------------- Start timer to check required action ------
Sub CheckAction(Interval, Action)
  Log "starting timer"
  TimerCheckAction.Interval = Interval
  CheckActionAction = Action
  TimerCheckAction.Enabled = True
End Sub
' ----------------- Init --------------------------------------
Sub Init()
  BotInChat = 0
  IsFirstJoin = 1
  IsInGame = 0
  CheckAction 20000, "IsFirstJoin"
End Sub
' ----------------- user whispers command ---------------------
Sub il_Event_WhisperFromUser(Username, Flags, Message, Ping)


If BotInWork = 0 Then

 Select Case Message
  Case "gow ef"
   If BotInChat = 1 Then
    WriteToFile "c:\nnCron\gowef.sem", ""
    AddQ Username & " requested gow ef, join"
    AddQ "/w " & Username & " please, whisper 'start' when ready, autostart in 2 min"
    CheckAction 30000, "PlayersWaiting"
    IsInGame = 4
    BotInChat = 0
    GameOwner = Username
   Else
    AddQ "/w " & Username & " please, wait GameBot on channel"
   End If
  Case "gow f"
   If BotInChat = 1 Then
    WriteToFile "c:\nnCron\gowf.sem", ""
    AddQ Username & " requested gow f, join"
    AddQ "/w " & Username & " please, whisper 'start' when ready, autostart in 2 min"
    CheckAction 30000, "PlayersWaiting"
    IsInGame = 4
    BotInChat = 0
    GameOwner = Username
   Else
    AddQ "/w " & Username & " please, wait GameBot on channel"
   End If
  Case "chop"
   If BotInChat = 1 Then
    WriteToFile "c:\nnCron\chop.sem", ""
    AddQ Username & " requested chop, join"
    AddQ "/w " & Username & " please, whisper 'start' when ready, autostart in 2 min"
    CheckAction 30000, "PlayersWaiting"
    IsInGame = 4
    BotInChat = 0
    GameOwner = Username
   Else
    AddQ "/w " & Username & " please, wait GameBot on channel"
   End If
  Case "start"
   If IsInGame > 0 Then
    Select Case Username
     Case GameOwner
      AddQ "/w " & Username & " starting game now"
      WriteToFile "c:\nnCron\gamestep1nc.sem", "" ' start, without cancel if failed
      CreateFile "c:\nnCron\mute.sem"
     Case Else
      AddQ "/w " & Username & " you are not game owner to start it"
    End Select
   Else
    AddQ "/w " & Username & " game is not requested, nothing to start"
   End If
  Case "resetwar2"
   Log "User " & Username & " restarted war2"
   TimerCheckAction.Enabled = False
   WriteToFile  "c:\nnCron\resetwar2.sem", ""
   Init
   
  Case Else
   AddQ "/w " & Username & " Please type 'gow ef', 'gow f' or 'chop'"
 
 End Select

 Else ' BotInWork=1
  AddQ "/w " & Username & " Sorry, bot in work, try later"
 End If ' BotInWork
End Sub

' ----------------- bot joins channel -------------------------
Sub il_Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString, Banned)
 Select Case Username
  Case "GameBot"
   BotInChat = 1
   If IsFirstJoin = 1 Then
'    WriteToFile "c:\nnCron\echo.sem", "/away Whisper to 'bot', please, I just create games, I'm a host bot"
    IsFirstJoin = 0
    TimerCheckAction.Enabled = False
    Log "Timer stopped: " & CheckActionAction
   Else
    TimerCheckAction.Enabled = False
    IsInGame = 0
    DeleteFile "c:\nnCron\mute.sem"
    Log "Timer stopped: " & CheckActionAction
   End If
'   AddQ Username & " joined channel"
 End Select

End Sub
' ----------------- bot leaves channel ------------------------
Sub il_Event_UserLeaves(Username, Flags)
 Select Case Username
  Case "GameBot"
   If BotInChat <> 0 Then
    TimerCheckAction.Enabled = False
    CheckAction 30000, "UserLeavesNoReason"
    Log "User leaved with no reason, timer started"
   End If
   BotInChat = 0
'   AddQ Username & " leaved channel"
 End Select

End Sub
' ----------------- start system ------------------------------
Sub il_Event_LoggedOn(Username, Product)
 If BotInWork = 0 Then
    WriteToFile  "c:\nnCron\startwar2.sem", ""
    Init
 End If ' BotInWork
End Sub

nncron script:
Code: [Select]
# *
# * Copyright (C) 2015 il
# *
# * This program is free software; you can redistribute it and/or
# * modify it under the terms of the GNU General Public License
# * as published by the Free Software Foundation; either version 2
# * of the License, or (at your option) any later version.
# *
# * This program is distributed in the hope that it will be useful,
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# * GNU General Public License for more details.
# *
# * You should have received a copy of the GNU General Public License
# * along with this program; if not, write to the Free Software
# * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

#CRONTAB FILE
# Classic crontab format:
# Minutes Hours Days Months WeekDays Years Command
# see 'example.tab'

#( purge-cron-log
    Time: 0 12 * * 5 *
    Action: PURGE-OLD: "log\*.log" 7
)#
#( mainsection

 VARIABLE SEM1 \ semaphore - 1 object - transaction for several clicks or keys

 : Click ( x y -- ) \ click to x y coords
  MOUSE-MOVE
  MOUSE-LBCLK
\  1000 PAUSE \ wait 1 second
 ;
 : enter_chat ( )
 SEM1 GET
 1000 PAUSE
 425 25 Click
 2000 PAUSE
 SEND-KEYS: "{ENTER}{DELAY 2000}{ENTER}{DELAY 200}m{DELAY 200}e{DELAY 1000}c{DELAY 3000}pAsSwOrD12{DELAY 200}GameBot{ENTER}"
 5000 PAUSE
 SEND-KEYS: "/away Whisper to 'bot', please, I just create games, I'm a host bot{ENTER}"
 SEM1 RELEASE
 ;
 : create_game ( gamename -- )
 SEM1 GET
 CASE
 1 OF \ 1=gowef
  SEND-KEYS: "@c{DELAY 1000}gow ef " \ create name browse classic gow
  10 RANDOM N>S SEND-KEYS \ name + random digit
  SEND-KEYS: "@b{DELAY 200}c{ENTER}{DELAY 200}g{ENTER}{DELAY 200}" \ browse classic gow
  SEND-KEYS: "@t{DELAY 200}{DOWN}{UP}{UP}{UP}{UP}{UP}{UP}{DOWN}{ENTER}" \ type melee
  SEND-KEYS: "@s{DELAY 200}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{LEFT}" \ speed ef
  SEND-KEYS: "@r{DELAY 200}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}" \ res high
  SEND-KEYS: "@i{DELAY 200}{DOWN}{UP}{UP}{UP}{UP}{UP}{ENTER}" \ tileset default
  SEND-KEYS: "{ENTER}" \ ok
 ENDOF
 2 OF \ 2=gowf
  SEND-KEYS: "@c{DELAY 1000}gow f " \ create name browse classic gow
  10 RANDOM N>S SEND-KEYS \ name + random digit
  SEND-KEYS: "@b{DELAY 200}l{ENTER}{DELAY 200}g{ENTER}{DELAY 200}" \ browse ladder gowbne
  SEND-KEYS: "@t{DELAY 200}{DOWN}{UP}{UP}{UP}{UP}{UP}{UP}{DOWN}{ENTER}" \ type melee
  SEND-KEYS: "@s{DELAY 200}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}" \ speed f
  SEND-KEYS: "@r{DELAY 200}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}" \ res high
  SEND-KEYS: "@i{DELAY 200}{DOWN}{UP}{UP}{UP}{UP}{UP}{ENTER}" \ tileset default
  SEND-KEYS: "{ENTER}" \ ok
 ENDOF
 3 OF \ 3=chop
  SEND-KEYS: "@c{DELAY 1000}chop " \ create name browse classic gow
  10 RANDOM N>S SEND-KEYS \ name + random digit
  SEND-KEYS: "@b{DELAY 200}o{ENTER}{DELAY 200}c{ENTER}{DELAY 200}" \ browse other chopfarms
  SEND-KEYS: "@t{DELAY 200}{DOWN}{UP}{UP}{UP}{UP}{UP}{UP}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}" \ type mapdef
  SEND-KEYS: "@s{DELAY 200}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}" \ speed f
  SEND-KEYS: "@r{DELAY 200}{DOWN}{UP}{UP}{UP}{UP}{ENTER}" \ res default
  SEND-KEYS: "@i{DELAY 200}{DOWN}{UP}{UP}{UP}{UP}{UP}{ENTER}" \ tileset default
  SEND-KEYS: "{ENTER}" \ ok
 ENDOF
 ENDCASE
 SEM1 RELEASE
 ;

 : gamestep4 ( )
 SEM1 GET
 FILE-EXIST: "c:\nnCron\mute.sem" IF
  EXIT
 THEN
 SEND-KEYS-DELAY: 20 0
 SEND-KEYS: "The game will be autostarted in 1.5 min{ENTER}"
 200 PAUSE
 SEND-KEYS: "I will leave after game start, i'm host bot{ENTER}"
 SEM1 RELEASE
 ;
 : gamestep3 ( )
 SEM1 GET
 FILE-EXIST: "c:\nnCron\mute.sem" IF
  EXIT
 THEN
 SEND-KEYS-DELAY: 20 0
 SEND-KEYS: "The game will be autostarted in 1 min{ENTER}"
 200 PAUSE
 SEND-KEYS: "I will leave after game start, i'm host bot{ENTER}"
 SEM1 RELEASE
 ;
 : gamestep2 ( )
 SEM1 GET
 FILE-EXIST: "c:\nnCron\mute.sem" IF
  EXIT
 THEN
 SEND-KEYS-DELAY: 20 0
 SEND-KEYS: "The game will be autostarted in 30 sec{ENTER}"
 200 PAUSE
 SEND-KEYS: "I will leave after game start, I'm host bot{ENTER}"
 SEM1 RELEASE
 ;
 : gamestep1nc ( )
 SEM1 GET
 SEND-KEYS-DELAY: 20 0
 SEND-KEYS: "@o{DELAY 200}{ENTER}" \ ok and close the msgbox if appeared
 10000 PAUSE
 10 10 Click
 SEND-KEYS: "{DELAY 200}e{DELAY 200}q{DELAY 200}q{DELAY 200}{BS}{BS}{BS}{DELAY 5000}{ENTER}" \ exit the game if started or del eqq if not
 SEM1 RELEASE
 ;
 : gamestep1 ( ) \ force exit if unable to start
 SEM1 GET
 SEND-KEYS-DELAY: 20 0
 SEND-KEYS: "@o{DELAY 200}{ENTER}" \ ok and close the msgbox if appeared
 10000 PAUSE
 10 10 Click
 SEND-KEYS: "{DELAY 200}e{DELAY 200}q{DELAY 200}q{DELAY 5000}{ENTER}" \ exit the game if started or del eqq if not
 SEND-KEYS: "{DELAY 2000}@c{DELAY 200}{ESC}" \ cancel game creation if no players joined
 SEM1 RELEASE
 ;
\ RunOnce
NoDel
Time: 0 0 21 5 * 2009
\ WatchHotKey: "^1"
Action:
 
)#
#( startwar2
NoDel
SingleInstance
WatchFile: "c:\nnCron\startwar2.sem"
Action:
   enter_chat
)#
#( resetwar2
NoDel
SingleInstance
WatchFile: "c:\nnCron\resetwar2.sem"
Action:
 SEM1 GET
   KILL: "Warcraft II BNE.exe"
   3000 PAUSE
 SEM1 RELEASE
   enter_chat
)#

#( gowef
NoDel
SingleInstance
WatchFile: "c:\nnCron\gowef.sem"
Action:
   1 create_game
)#

#( gowf
NoDel
SingleInstance
WatchFile: "c:\nnCron\gowf.sem"
Action:
   2 create_game
)#

#( chop
NoDel
SingleInstance
WatchFile: "c:\nnCron\chop.sem"
Action:
   3 create_game
)#
#( gamestep1nc_a
NoDel
WatchFile: "c:\nnCron\gamestep1nc.sem"
Action:
   gamestep1nc
)#
#( gamestep1_a
NoDel
SingleInstance
WatchFile: "c:\nnCron\gamestep1.sem"
Action:
   gamestep1
)#
#( gamestep2_a
NoDel
SingleInstance
WatchFile: "c:\nnCron\gamestep2.sem"
Action:
   gamestep2
)#
#( gamestep3_a
NoDel
SingleInstance
WatchFile: "c:\nnCron\gamestep3.sem"
Action:
   gamestep3
)#
#( gamestep4_a
NoDel
WatchFile: "c:\nnCron\gamestep4.sem"
Action:
   gamestep4
)#


#( echo
NoDel
SingleInstance
WatchFile: "c:\nnCron\echo.sem"
Action:
 SEM1 GET
 SEND-KEYS: "{DELAY 200}"
' SEND-KEYS: "/w il "
' S" c:\nnCron\echo.sem" FILE + 0 SEND-KEYS
 SEM1 RELEASE

)#

Fell free to ask any questions about that project if you want to implement it.
Title: Re: GameBot source code
Post by: EviL~Ryu on July 27, 2015, 11:07:11 AM
Excellent you finally posted it.


Sent from my Motorola DynaTAC 8000X using Tapatalk
Title: Re: GameBot source code
Post by: Delete mine too on July 27, 2015, 12:41:47 PM
Very nice !!! So il you wrote this or claw??
Title: Re: GameBot source code
Post by: I hate naggers on July 27, 2015, 12:43:34 PM
il wrote this. i used caughtphrases.htm and parsing, he used file creation
Title: Re: GameBot source code
Post by: Delete mine too on July 27, 2015, 12:47:19 PM
Ohhh okay! All 3 of ours look similar lol

I just didn't add a command engine.
Title: Re: GameBot source code
Post by: {Lance} on July 27, 2015, 01:20:10 PM
Thanks for following through on my request iL, much appreciated :)  This should help push things in the right direction as far as the lack of hosts as of late.  I plan to use this as is and extend it to suit my own needs with several of the idle vps's I have access to.  I'll publish any useful mods here,  encourage others to do the same.
Title: Re: GameBot source code
Post by: Delete mine too on July 27, 2015, 06:07:21 PM
Thanks for following through on my request iL, much appreciated :)  This should help push things in the right direction as far as the lack of hosts as of late.  I plan to use this as is and extend it to suit my own needs with several of the idle vps's I have access to.  I'll publish any useful mods here,  encourage others to do the same.
welcome to the mods section! ;)
Title: Re: GameBot source code
Post by: EviL~Ryu on July 27, 2015, 08:09:38 PM
Long overdue...


Sent from my Motorola DynaTAC 8000X using Tapatalk
Title: Re: GameBot source code
Post by: Delete mine too on July 27, 2015, 08:46:57 PM
I don't get why il involved the mouse click when it could of been done with hotkeys.
Title: Re: GameBot source code
Post by: iL on July 28, 2015, 01:18:41 AM
I don't get why il involved the mouse click when it could of been done with hotkeys.
Just to click icon to start war2 should be located on 425 25. :)
Was too lazy to use hotkey for that...

Also to click menu when levaing the game. F10 not working  on pause for unknown reason.
Title: Re: GameBot source code
Post by: Delete mine too on July 28, 2015, 01:26:33 AM
Okay sounds about right.
Title: Re: GameBot source code
Post by: I hate naggers on July 28, 2015, 02:35:41 AM
Also to click menu when levaing the game. F10 not working  on pause for unknown reason.
damn, stupid w2. i think id rather use the unpause - leave game hotkey sequence
ctrl+p -> wait 1s -> alt+q -> q
Title: Re: GameBot source code
Post by: iL on July 28, 2015, 02:46:12 AM
ctrl+p -> wait 1s -> alt+q -> q
Also note that you are not able to know if pause if enabled or not.
You should follow exit sequence, then ctrl+p and repeat exit sequence.
Also 1s is quite long to let them pause again.
Also maybe there were some reason to pause.
Also there's no problem to mouse-click menu, fortunately it's always located in the same place and not clickable in game lobby.

BTW i didn't check alt+q, maybe it works on pause, need to try.
Title: Re: GameBot source code
Post by: Delete mine too on July 28, 2015, 03:05:36 AM
I just forced the bot to loss and he leaves like he lost when activated. No hotkeys necessary to leave game!

That's why i love how i could read/write memory with macros.
Title: Re: GameBot source code
Post by: iL on July 28, 2015, 03:32:29 AM
I just forced the bot to loss and he leaves like he lost when activated. No hotkeys necessary to leave game!
I didn't work with memory values at all in this project. Only native client with keys/clicks. Very poor feedback to stealthbot, but quite working solution...
Title: Re: GameBot source code
Post by: Delete mine too on July 28, 2015, 05:06:31 PM
I just forced the bot to loss and he leaves like he lost when activated. No hotkeys necessary to leave game!
I didn't work with memory values at all in this project. Only native client with keys/clicks. Very poor feedback to stealthbot, but quite working solution...
Well that's how I feel I don't care how you did it. You made it happen no one else did. Awesome works great!

Title: Re: GameBot source code
Post by: EviL~Ryu on July 28, 2015, 05:23:08 PM

I just forced the bot to loss and he leaves like he lost when activated. No hotkeys necessary to leave game!
I didn't work with memory values at all in this project. Only native client with keys/clicks. Very poor feedback to stealthbot, but quite working solution...

Your first mistake using a stealthbot haha, weak coding...


Sent from my Motorola DynaTAC 8000X using Tapatalk
Title: Re: GameBot source code
Post by: Thomas29 on July 29, 2015, 06:11:26 PM
I Did Not Know I Could Connect To Your Server With My Stealthbot What Do I Have To Do And What Information To Input In Order To Do That!
Title: Re: GameBot source code
Post by: Delete mine too on July 29, 2015, 06:49:50 PM
Use hashes and server.war2.ru
Title: Re: GameBot source code
Post by: {Lance} on August 19, 2015, 01:00:24 PM
Ok as promised, here is the new Stealthbot script.  It's a COMPLETE re-write from the ground up.  There is not a single line of code left from iL's bot from Stealthbot or NNCron.  What he had written was a good base, but it was really terrible as far as flexibility and extensibility.  The idea he had however,  spot on.  Using Stealthbot was definately the way to go.

Ok, so how the F does one use this thing?  Well,  here are the requirements

1.  You must be able to host already.  Either from a VPS or a machine you have access to that is WINDOWS (XP through Win8 will work, IDK about Win10,  I used Win7 and WinXP during development of the bot).  Duuh.  If you cant host, this script is NOT for you.
2.  Decent IT experience.  This is not for the faint of heart.
3.  AutoIt must be installed on the machine that will be hosting games.  There is nothing to configure, you simply need to make sure it's installed and thats it.  Stealthbot accesses Autoit's feature via the COM object that comes with Autoit
4.  2 PVPGN Accounts on server.war2.ru.  One should be called YOURNAME_HostBot and the other should be called YOURNAME_GameBot.  You can use whatever names you want, but that naming convention makes them easy for other players to spot and will know who the owners are.
5.  And finally, Stealthbot This is the heart of the Hostbot.  There are PLENTY of docs on how to setup Stealthbot for PVPGN.  Once You get your YOURNAME_HostBot working and logging in with Stealhbot, the rest is cake.

Steps,  do in this order:

1.  Setup 2 PVPGN Accounts on the RU server YOURNAME_HostBot and YOURNAME_GameBot
2.  Download and install Autoit from https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe (https://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe)
3.  Download and install Stealthbot from:  http://www.stealthbot.net/sb/Development/482/StealthBotSetup.msi (http://www.stealthbot.net/sb/Development/482/StealthBotSetup.msi)
4.  Open Stealthbot and you will be present with a "Profile" window.  Click "Create Profile"
5.  Give it a name,  Click ok
6.  Double Click the new profile that just showed up in the launcher
7.  Navigate to Settings->Bot Settings->General Settings and fill out the following:
    a.  Username - This is the YOURNAME_HostBot that you created in Step 1
    b.  Password - Duh, take a guess what this is for lmao.  PW for YOURNAME_HostBot
    c.  Server - type in: server.war2.ru
    d.  cdkey - type in: pvpgn
    e.  HomeChannel - Type: War2BNE     OR  You can use your own clan channel if you want.  It can be any channel really.
    f.  Bot Owner - This is your real War2 username.  It's not used in our script but it needs to be filled in none the less.
    g.  Warcraft II BNE -  MAKE SURE TO CLICK THIS BUTTON!!
8.  Navigate to Advanced Settings
    a.  Connection Method - Select "Local Hash" from the drop down
    b.  Click "Apply and Close"
9.  Navigate to Scripting->Open Script Folder
    a.  Right click anywhere in this dir and select "New Text Document" and name it "hostbot.txt"
    b.  Cut/Paste the code I have in this post into the hostbot.txt file
    c.  Modify the "Configuration" section in hostbot.txt with your YOURNAME_GameBot and YOURNAME_HostBot information.  You can also enable/disable autohosting as well as some other things.  I recommend leaving autohosting OFF until you're bot is working perfectly.  Then and only then should you enable the autohosting capabilities.
10. Close the Script Directory window
11. Navigate to Scripting->Reload Scripts
12. Click "Connect"
13. Type /msg YOURNAME_HostBot reboot

If everything went ok, then War2 "should" open and autologin to your YOURNAME_GameBot user and then wait for commands.  Use another computer to test it with.

This is my makeshift "TODO" List. 
* = 100% Complete
~ = Functional but not yet used in a bot command (Partially Complete)

* Optimize code and make it FAR more extensible/flexible/easier to use (yes, I rewrote the ENTIRE bot,  theres not a single line left from iL's old bot,  this is a complete rewrite from scratch.  The only thing that remains is iL's GPL License header lol.
* replace Timer with LongTimer (miliseconds to seconds since Timer sux ass with a 65K limit)
* replace nncron with autoit.
* create new InGame
* autohost games for new players
* add banning and kicking based on slots
~ Make Log() log to file AND the bot owner.
~ add a tVb game type
~ add a FFA game type
~ add feature to allow player to setup all the settings
~Allow any BUILT IN map to be played by giving each map an assigned # that cooresponds to the number of up/down arrows in the built in maps dir.

Title: Re: GameBot source code
Post by: I hate naggers on August 19, 2015, 01:18:08 PM
~Allow any BUILT IN map to be played by giving each map an assigned # that cooresponds to the number of up/down arrows in the built in maps dir.
wouldnt it be better to have a little interface with 'browse' button, which then saves the selected map path and overwrites it in w2 registery?
Title: Re: GameBot source code
Post by: {Lance} on August 19, 2015, 01:21:25 PM
That's trying to make the chicken before the Egg.  Such a system first needs an Index,  that is what the index is for.  Other functions would be able to utilize it.  Whether its another function call, or some GUI.  But generally, Stealthbot scripts dont have a GUI toolkit to begin with.  One could be put together autoit but it would be rudimentary at best.
Title: Re: GameBot source code
Post by: iL on August 19, 2015, 03:32:45 PM
hostbot.txt
Wow, read your code, it looks really beautiful, powerful and easy to understand!
Looks like you are very experienced in VB.
Nice that you hold the whole code into stealthbot instead of splitting it to autoit.
I didn't even know that stealthbot supports COM-objects and how to use them.
I still didn't try to setup it just because i have no working environment now, i'll try it later.

I'd say the only thing i see to optimize are hardcoded values in ban and kick subs.

Also what do you think about password games? Do we need that or ban/kick is enough?

~ Make Log() log to file AND the bot owner.
Looks like logging should be supported as embedded stealthbot function, but i didn't try that...

~ add a tVb game type
~ add a FFA game type
~ add feature to allow player to setup all the settings
~Allow any BUILT IN map to be played by giving each map an assigned # that cooresponds to the number of up/down arrows in the built in maps dir.
Would be insteresting how to do that not too complicated for users. I'd say 5-7 presets (gow ef, gow f, chop tvb, etc) would also be fine.
Title: Re: GameBot source code
Post by: {Lance} on August 19, 2015, 04:16:50 PM
Heh,  well it looks good because I've been developing for uhm, about... ya, 28 years now.  This is my FIRST VBS project btw.  So it's kinda cool that it looks good ;)  Passworded games actually function in this bot, I just dont have it enabled.  But it's easily enabled,  I've tested it and it works fine.  I just dont like pw'd games personally so I didnt add it.  But the feature is there for anyone else to use if they want to put it together.  Kick and Ban works great right now as is.  I use it in the bot that is running now to boot laggers, etc.    It's not a perfect app, but I am satisfied with the end results because its very flexible, easily modified, and easy to extend.  I have lots of examples of how to do things.  I think the coolest thing in the entire app is the Sleep() command.  VBS doesnt have a Sleep command!!!  I couldnt believe it and spent like 2 days searching for the sleep command in VBS and came to the conclusion that............. there just isnt one.  So, I used the next best thing,  Background ping and ping the localhost hahahaha.  Ya I'm sneaky like that :)  I didnt want to use Timers because everytime I used them, the app would lag and this nasty window would pop up saying "Script taking a long time to execute,  Continue/End".  But with ping, the script is not the one doing the sleeping, it's the OS instead so it doesnt lag anything and it even excepts other commands like it were multithreaded almost even though it isnt.

My main goal was to have a working bot,  but a bigger goal was to produce something that others could modify/enhance easily.  I still have some cleanup to do such as switching the ban/kick functions to use the Click() function I created.  They work as is, but they take a lot of space the way they are coded right now.  Using the utility functions I can cut that down.
Title: Re: GameBot source code
Post by: iL on August 20, 2015, 09:57:28 AM
Wow, first VBS project!
Your programming style is great, i still mix different styles in one project, yours is perfect.

My hostbot was just the 1-st working version that required refactoring what you did. I'd reach something like your code after 4-5 full refactorings i think. You are much more experienced programmer than me.

Oh, i didn't find your Sleep implementation firstly, i thought it's embedded VBS function, lol. Yes, great idea, i think i also used ping localhost as 1 sec sleep timeout, i don't remember my project and language where i used it...

BTW, doesn't Sleep block the bot events until it finishes? Need to test how it works...
I also had some problems with timers in my hostbot version, just forgot the details..

You even care of teamviewer handling, i just closed teamviewer and forced restart war2 after that.
You even care of left and right handed mouse.

You also implemented several reasonable states for your bot, i've not been able to do that when making it myself.

Your code inspired me to refactor my antihack backend that is also partly similar with this project: also several states to control, more friendly language for me (php), so i hope to rewrite and release antihack soon.
Title: Re: GameBot source code
Post by: {Lance} on August 20, 2015, 11:23:55 AM
I was at first expecting ping to affect the "Event" hooks as well.... But it didnt!  So it kinda acts like a multi-threading app even though its not.  The bot still accepts commands even while it's sleeping which is kinda weird.  But the code directly after the sleep.... never runs until the sleep finishes which is weird.  In otherwords,  it works perfectly lol.  PHP is by far my favorite language.  All of the modifications I did to the PVPGN server were all done because I put a PHP interpreter into PVPGN itself so that it could run PHP code natively.  The result was that I could code PVPGN features............ and never have to restart pvpgn.  Ever.  I think I even suggested that to you once before too.  It sure does make life so much easier without having to deal with C all the time lol.  All of the new /COMMAND commands I had,  those were all written in PHP.  Even the antihack and hardware ban features were written in PHP.  Both on the server and the client side.  The only difference is that the client side PHP was compiled into windows executable files with Winbinder (which used phc-win).  There are some new kids on the block that I want to try for that such as HHVM (HipHop for PHP by Facebook),  and some others but Winbinder is by far the best I've ever used.  Another bi-product of using PHP rather than C for PVPGN was that I only needed 1 codebase for 2 platforms (web and PVPGN).  If you havent noticed already,  I like to try to do everything I can to keep my code all in one nice little area so that it can be easily re-used ;)  In general, I like to code lots of smaller pieces of code that can be re-used rather than 1 big long massive function that does everything under the sun.
Title: Re: GameBot source code
Post by: {Lance} on August 31, 2015, 02:23:01 AM
Here is a second iteration of the GameBot.  These are changes I was going to add last week but ran into a ban that caused all sorts of delays.  Anyway,  things are back to normal so here's something to chew on.

The following is sort of a changelog of the major changes/additions,  * = complete,  ! = planned,  ~ = functional but not yet implemented

* Optimize code and make it FAR more extensible/flexible/easier to use (yes, I rewrote the ENTIRE bot,  theres not a single line

left from iL's old bot,  this is a complete rewrite from scratch.  The only thing that remains is iL's GPL License header lol.
* replace Timer with LongTimer (miliseconds to seconds since Timer sux ass with a 65K limit)
* replace nncron with autoit.
* create new InGame
* autohost games for new players
* add banning based on slots
~ Make Log() log to file AND the bot owner.
* add a tVb game type
* add a FFA game type
* add feature to allow player to setup all the settings
* Allow any BUILT IN map to be played by giving each map an assigned # that cooresponds to the number of up/down arrows in the built in maps dir.

* Add a maint mode that only allows GameBotName, HostBotName, or HostBotOwner to use the bot.
* Temporarily Enable/Disable Autohosting by msging bot the "enable autohosting 5" or "disable autohosting" commands.
* Disallow Reboots when gamebot has been in a game for a short period of time, after that, reboots can take place.  Its to insure players dont reboot it to kick other people out of the game.  If bot has been in game for very long time, reboots are again allowed as it may be stuck in a game.

* Add Some new map settings. (Added GowBNE F, GOW F, Comps, etc)
* Allow people to start the bot if its an autohosted game (!TODO:  Change this to only allow people in the current game to start the game)
!make a list of admin users to protect certain commands.
!make a list of commands that can be given to certain users.
!Force Bot to rejoin Server every time it exits a game so that it doesnt have latency issues.  Make a Rejoin function to do this.
* Backspace before Enter at the vic screen will get rid of the e
~ Add announcement for caught hackers (waiting for iL to produce proper Json data)
! Add announcement for num players in bot hosted games.

-----------------------------------------------------------------------
Here are some examples of how to use the bot as a PLAYER.  These are not as userfriendly as I'd like, but I dont think it can be simplified any further.  The best plan I could come up with are "Presets".  I have 1 example of a "Preset" called "gowcomps".

The defaults of a game can by changed by sending the bot a list of commands in this order as seen below:
/msg EF_HostBot MapName Speed AutoStartTime GameType NumOfCPUs MapResources FixedOrder OnePeon GamePassword

Valid values for MapName:  gow, gowbne
Valid values for Speed: ef, f
Valid values for AutoStartTime:  1 to 15
Valid values for GameType: Melee, FFA, TvB
Valid values for  NumOfCPUs: 0 to 4 (I may increase that later)
Valid values for MapResources: High, Low, Default
Valid values for FixedOrder: Yes, No
Valid values for OnePeon: Yes, No
Valid values for Password: Anything you want.

Defaults to Gow Old EF with a Time of 5 mins
/msg EF_HostBot gow

Gow Old F with a time of 5 minutes
/msg EF HostBot gow f

Gow Old EF with a time of 3 minutes
/msg EF_HostBot gow ef 3

Old Gow on F with 0 CPUs in TVB on Low resources Format that will start in 5 Mins  (NOTE: If you try to add CPUs to a TvB game, it will tell you that you cannot do that.)
/msg EF_HostBot gow f 5 TvB 0 Low

Old Gow EF that has 2 CPUs on Low res and the game will start in 10 mins
/msg EF_HostBot gow f 5 Melee 2 Low

Gow BNE F that starts in 5 mins
/msg EF_HostBot gowbne

Gow BNE EF that starts in 5 mins
/msg EF_HostBot gowbne ef

Gow BNE EF That starts in 3 mins
/msg EF_HostBot gowbne ef 3

and so on.  There are lots of different combinations now that users have full control over pretty much all of the settings.

The 1 preset I have is this and it allows numeric argument:
Defaults to GowBNE EF with 4 CPUs and starts in 5 mins
/msg EF_HostBot gowcomps

Same as above but with only 1 CPU
/msg EF_HostBot gowcomps 1

Same as above but with only 2 CPUs
/msg EF_HostBot gowcomps 2

Same as above but with only 3 CPUs
/msg EF_HostBot gowcomps 3

Same as above but with only 4 CPUs
/msg EF_HostBot gowcomps 4
Title: Re: GameBot source code
Post by: Delete mine too on September 17, 2015, 05:38:58 PM
You should look into adding memory editing in this. You could rely on map names instead of #1 to get the first map and also to have unlimited amount of maps.

Also wish we could have multiple of these bots going. I could give you the info to make the bot stay and play the game if wanted. That should make it an 8 player game again. Also tons of cool shit.
Title: Re: GameBot source code
Post by: Crash3r on September 18, 2015, 12:53:05 PM
Lance,
Thank you for writing hostbot

I have modified hostbot2 and launched PBALL_HostBot, with 2 maps so far: 60men, and 45men

I fixed a bug, when checking "Fixed Order" the next step was to hit enter to start the game, however hitting enter just unchecked Fixed Order so the game never started.

I fixed it by reordering the game setup - so it did Fixed Order then did Map Resources then hit enter to start the game.

The next thing I did is finish writing the GameTeams section so there is 1v1 (2v6), 2v2 (3v4), 3v3 (4v4), 3v4 (4v4). Game Teams for some reason Blizzard did not give it a hotkey like all the others lol! But I worked around that by first "T" for Game Type, then TAB over to Teams then DOWN to open the menu and then UP 7x to reset the settings to the top

However, it should be kept in mind that the key strokes for GameTeams selection are only correct if a 4v4 map is used, for a 3v3 map there are different options (obviously 4v4 is not an option) so the key strokes are different.

To handle this I created GameTeams names such as 31v1 - meanining the selection of 1v1 on a 3v3 map type.


In pball it was a bit more complicated than GoW because the maps are Fixed Order.
Because of Fixed Order, a different map is required for each Game Team - take for example a 1v1 60men - player 2 needs to be lined up across from player 3, but in a 2v2, player 2 and 3 need to be on the same side.

So a seperate map was created for each (thanks xXxSmeagolxXx), and presets were made for "601v1" "602v2" etc


Everything is working and I plan to launch a few other custom map bots

I just have one problem - After pball_gamebot starts the game, the game begins but is very laggy, then after about 15seconds everyone drops

In the game were hostbot and I on the same network (sep ports forwarded) and 1 other player on a different network

This happened 2 times that I tested, so far no succesful games because of it


Any ideas?

thanks
Title: Re: GameBot source code
Post by: GaNzTheLegend on September 18, 2015, 02:13:51 PM
thanks for your contribution archer
Title: GameBot source code
Post by: EviL~Ryu on September 18, 2015, 02:19:13 PM
thanks for your contribution archer

Maybe time to integrate him back into society?

[emoji50]


Sent from my Motorola DynaTAC 8000X using Tapatalk
Title: Re: GameBot source code
Post by: GaNzTheLegend on September 18, 2015, 02:20:40 PM

thanks for your contribution archer

Time to integrate him back into society?


Sent from my Motorola DynaTAC 8000X using Tapatalk
I see no harm in him posting on the forums but it's up to the Admins.

Sent from my SGH-I317M using Tapatalk

Title: GameBot source code
Post by: EviL~Ryu on September 18, 2015, 02:22:36 PM

thanks for your contribution archer

Time to integrate him back into society?


Sent from my Motorola DynaTAC 8000X using Tapatalk
I see no harm in him posting on the forums but it's up to the Admins.

Sent from my SGH-I317M using Tapatalk

Hmmm...Riley you ready to be a good slave like the rest of us? [emoji52]


Sent from my Motorola DynaTAC 8000X using Tapatalk
Title: Re: GameBot source code
Post by: Delete mine too on September 18, 2015, 02:47:01 PM
Lance,
Thank you for writing hostbot

I have modified hostbot2 and launched PBALL_HostBot, with 2 maps so far: 60men, and 45men

I fixed a bug, when checking "Fixed Order" the next step was to hit enter to start the game, however hitting enter just unchecked Fixed Order so the game never started.

I fixed it by reordering the game setup - so it did Fixed Order then did Map Resources then hit enter to start the game.

The next thing I did is finish writing the GameTeams section so there is 1v1 (2v6), 2v2 (3v4), 3v3 (4v4), 3v4 (4v4). Game Teams for some reason Blizzard did not give it a hotkey like all the others lol! But I worked around that by first "T" for Game Type, then TAB over to Teams then DOWN to open the menu and then UP 7x to reset the settings to the top

However, it should be kept in mind that the key strokes for GameTeams selection are only correct if a 4v4 map is used, for a 3v3 map there are different options (obviously 4v4 is not an option) so the key strokes are different.

To handle this I created GameTeams names such as 31v1 - meanining the selection of 1v1 on a 3v3 map type.


In pball it was a bit more complicated than GoW because the maps are Fixed Order.
Because of Fixed Order, a different map is required for each Game Team - take for example a 1v1 60men - player 2 needs to be lined up across from player 3, but in a 2v2, player 2 and 3 need to be on the same side.

So a seperate map was created for each (thanks xXxSmeagolxXx), and presets were made for "601v1" "602v2" etc


Everything is working and I plan to launch a few other custom map bots

I just have one problem - After pball_gamebot starts the game, the game begins but is very laggy, then after about 15seconds everyone drops

In the game were hostbot and I on the same network (sep ports forwarded) and 1 other player on a different network

This happened 2 times that I tested, so far no succesful games because of it


Any ideas?

thanks

No, no, no!!
I fixed a bug, when checking "Fixed Order" the next step was to hit enter to start the game, however hitting enter just unchecked Fixed Order so the game never started.

This makes no sense dude. Fixed Order is not at the same screen as ok for game start..... also enter sends text not starts game.... alt + O for okay...... its not time yet archer you still have 5 months of being banned ;) All these minor changes lol...
Title: Re: GameBot source code
Post by: EviL~Ryu on September 18, 2015, 03:01:25 PM

Lance,
Thank you for writing hostbot

I have modified hostbot2 and launched PBALL_HostBot, with 2 maps so far: 60men, and 45men

I fixed a bug, when checking "Fixed Order" the next step was to hit enter to start the game, however hitting enter just unchecked Fixed Order so the game never started.

I fixed it by reordering the game setup - so it did Fixed Order then did Map Resources then hit enter to start the game.

The next thing I did is finish writing the GameTeams section so there is 1v1 (2v6), 2v2 (3v4), 3v3 (4v4), 3v4 (4v4). Game Teams for some reason Blizzard did not give it a hotkey like all the others lol! But I worked around that by first "T" for Game Type, then TAB over to Teams then DOWN to open the menu and then UP 7x to reset the settings to the top

However, it should be kept in mind that the key strokes for GameTeams selection are only correct if a 4v4 map is used, for a 3v3 map there are different options (obviously 4v4 is not an option) so the key strokes are different.

To handle this I created GameTeams names such as 31v1 - meanining the selection of 1v1 on a 3v3 map type.


In pball it was a bit more complicated than GoW because the maps are Fixed Order.
Because of Fixed Order, a different map is required for each Game Team - take for example a 1v1 60men - player 2 needs to be lined up across from player 3, but in a 2v2, player 2 and 3 need to be on the same side.

So a seperate map was created for each (thanks xXxSmeagolxXx), and presets were made for "601v1" "602v2" etc


Everything is working and I plan to launch a few other custom map bots

I just have one problem - After pball_gamebot starts the game, the game begins but is very laggy, then after about 15seconds everyone drops

In the game were hostbot and I on the same network (sep ports forwarded) and 1 other player on a different network

This happened 2 times that I tested, so far no succesful games because of it


Any ideas?

thanks

No, no, no!!
I fixed a bug, when checking "Fixed Order" the next step was to hit enter to start the game, however hitting enter just unchecked Fixed Order so the game never started.

This makes no sense dude. Fixed Order is not at the same screen as ok for game start..... also enter sends text not starts game.... alt + O for okay...... its not time yet archer you still have 5 months of being banned ;) All these minor changes lol...

5 months? I don't ever recall an "official" ban term being set...


Sent from my Motorola DynaTAC 8000X using Tapatalk
Title: Re: GameBot source code
Post by: Delete mine too on September 18, 2015, 03:05:19 PM
He's a theif that tried to sell stolen property. His parents are disappointed in him. He tried to frame me which blow up in his vagina. BAN FOREVER REALLY!! I don't support riley ever.
Title: Re: GameBot source code
Post by: Crash3r on September 18, 2015, 03:16:20 PM
Lance,
Thank you for writing hostbot

I have modified hostbot2 and launched PBALL_HostBot, with 2 maps so far: 60men, and 45men

I fixed a bug, when checking "Fixed Order" the next step was to hit enter to start the game, however hitting enter just unchecked Fixed Order so the game never started.

I fixed it by reordering the game setup - so it did Fixed Order then did Map Resources then hit enter to start the game.

The next thing I did is finish writing the GameTeams section so there is 1v1 (2v6), 2v2 (3v4), 3v3 (4v4), 3v4 (4v4). Game Teams for some reason Blizzard did not give it a hotkey like all the others lol! But I worked around that by first "T" for Game Type, then TAB over to Teams then DOWN to open the menu and then UP 7x to reset the settings to the top

However, it should be kept in mind that the key strokes for GameTeams selection are only correct if a 4v4 map is used, for a 3v3 map there are different options (obviously 4v4 is not an option) so the key strokes are different.

To handle this I created GameTeams names such as 31v1 - meanining the selection of 1v1 on a 3v3 map type.


In pball it was a bit more complicated than GoW because the maps are Fixed Order.
Because of Fixed Order, a different map is required for each Game Team - take for example a 1v1 60men - player 2 needs to be lined up across from player 3, but in a 2v2, player 2 and 3 need to be on the same side.

So a seperate map was created for each (thanks xXxSmeagolxXx), and presets were made for "601v1" "602v2" etc


Everything is working and I plan to launch a few other custom map bots

I just have one problem - After pball_gamebot starts the game, the game begins but is very laggy, then after about 15seconds everyone drops

In the game were hostbot and I on the same network (sep ports forwarded) and 1 other player on a different network

This happened 2 times that I tested, so far no succesful games because of it


Any ideas?

thanks

No, no, no!!
I fixed a bug, when checking "Fixed Order" the next step was to hit enter to start the game, however hitting enter just unchecked Fixed Order so the game never started.

This makes no sense dude. Fixed Order is not at the same screen as ok for game start..... also enter sends text not starts game.... alt + O for okay...... its not time yet archer you still have 5 months of being banned ;) All these minor changes lol...

I was talking about game creation, not game start dumbass

When ENTER is sent right after checking Fixed Order, it is then unchecked instead of creating the game. I fixed it by reordering the game creation steps.

It was a simple bug, Lance would have fixed it but he probably never came across it because he hasnt had to use any maps that use Fixed Order yet

I also finished up what Lance had started on with GameTeams and added in my own game presets and map navigations. What have you done? Nothing

No bother explaining anyways to someone who claims to be a l33t programmer but actually doesnt know or do shit

Youre not a l33t hacker either as you claim to be, I'd call you a script kiddie, but you dont even know how to USE the scripts much less write them! lmao what a newb

Your pretty worthless dude... nuff said

Stop jacking this thread with nonsense about some archer guy

Just want to know why my bot lags out and everyone drops right after the game starts
Title: GameBot source code
Post by: EviL~Ryu on September 18, 2015, 03:24:33 PM
...

Stop jacking this thread with nonsense about some archer guy
....

Oh brother....[emoji29]




Sent from my Motorola DynaTAC 8000X using Tapatalk
Title: Re: GameBot source code
Post by: Certified MENSA Genius Brain (smart) on September 18, 2015, 03:27:55 PM
this dumb bot is whispering me trying to get me to play paintball.  It's a menace to the server
Title: Re: GameBot source code
Post by: Crash3r on September 18, 2015, 03:29:39 PM
It doesnt have whisper/greeting on ... and its not even online right now


http://server.war2.ru/status/ (http://server.war2.ru/status/)


Due to the fact that it drops players when the games starts. Once again, the reason for this thread
Title: Re: GameBot source code
Post by: Certified MENSA Genius Brain (smart) on September 18, 2015, 03:33:04 PM
I didn't say it happened right now, but it happened one of the previous times i logged on.  We have to find some good, creative, final solutions to the pball question on this server.
Title: Re: GameBot source code
Post by: EviL~Ryu on September 18, 2015, 03:34:38 PM

this dumb bot is whispering me trying to get me to play paintball.  It's a menace to the server

You think anything custom related is a menace [emoji19], but he should fix it that...


Sent from my Motorola DynaTAC 8000X using Tapatalk
Title: Re: GameBot source code
Post by: Crash3r on September 18, 2015, 03:38:36 PM
"the pball question on this server" ?

Not sure what that is, pretty sure no one asked you anything actually.

As for whispering, I will make sure my bots do not whisper... it would be too much if all the bots whispered everyone every time they entered the main channel

Now thank you for that, coming from a mod whose job I thought was to keep threads on topic.

Back to the topic of the thread, gamebot, and the reason for my posting:

My bot lags after game start and shortly after, everyone drops. Any ideas?

thanks
Title: Re: GameBot source code
Post by: Certified MENSA Genius Brain (smart) on September 18, 2015, 03:40:13 PM
Maybe if a person plays a set number of pball games, they get a "NEWB" tag applied to their account, and they get interned to a special pball channel when they log in.  Then if they play enough gow games, the restrictions are removed.  The channel topic of the special pball channel might say something like, "Gow will set you free."
Title: Re: GameBot source code
Post by: Crash3r on September 18, 2015, 03:43:02 PM
someone please sideline this idiot to flame wars please? lmao
Title: Re: GameBot source code
Post by: Certified MENSA Genius Brain (smart) on September 18, 2015, 03:50:09 PM
Flame wars/offtopic forum... that might be a good place for all pball related chat and all pball posters, since pball is off-topic by nature.  Pballers are an inferior species of player with suspect morals.  Look no further than the criminal Archer for evidence of that.
Title: Re: GameBot source code
Post by: Certified MENSA Genius Brain (smart) on September 18, 2015, 03:51:08 PM
If pballers fail to convert after some time in their sanctioned channel/subforum, I think we could periodically shower them with bans.
Title: GameBot source code
Post by: EviL~Ryu on September 18, 2015, 03:53:11 PM
Maybe if a person plays a set number of pball games, they get a "NEWB" tag applied to their account, and they get interned to a special pball channel when they log in.  Then if they play enough gow games, the restrictions are removed.  The channel topic of the special pball channel might say something like, "Gow will set you free."

LMFAO

Learn to get along with everyone you homo. Only thing Garden of Whores will probably give you is a stiff neck from constantly failing asleep to its game play...ah so boring...[emoji19]


Sent from my Motorola DynaTAC 8000X using Tapatalk
Title: Re: GameBot source code
Post by: EviL~Ryu on September 18, 2015, 03:58:52 PM

If pballers fail to convert after some time in their sanctioned channel/subforum, I think we could periodically shower them with bans.


Pfft...

(http://truthaboutguns-zippykid.netdna-ssl.com/wp-content/uploads/2012/04/courtesy-someecards.com_.jpg)


Sent from my Motorola DynaTAC 8000X using Tapatalk
Title: Re: GameBot source code
Post by: Crash3r on September 18, 2015, 04:07:35 PM
Ok I just tried another time :


PBALL_GameBot created game,
I joined
CptCook joined

I whispered start to hostbot

Game started.

10seconds of laggy game play

I switch screens to look at GameBot

GameBot quits for a draw

Cpt Cook and I drop from the game.


I think this must be related to me playing and gamebot hosting from same network

Going to try to get some kind of VPN up and try again
Title: Re: GameBot source code
Post by: Crash3r on September 18, 2015, 04:20:04 PM
First successful PBALL Bot game!

I connected to VPN then to War2, then started a bot game and played with cpt cook again

This time when pball bot quit, we both stayed!

Game was laggy as hell but I think its because of the VPN

but the bot works
Title: Re: GameBot source code
Post by: Certified MENSA Genius Brain (smart) on September 18, 2015, 04:28:23 PM
part of war2 is the sword, but another equal part of war2 is the hammer, symbolizing the resource management portion of the game, ie peons getting gold from the mines, etc.  therefore, i think this is an appropriate banner for those seeking an answer to the pball question:

(http://i.imgur.com/JlhuwMK.png)

just gotta make it into an icon now
Title: GameBot source code
Post by: EviL~Ryu on September 18, 2015, 04:56:28 PM
Whoa, your not a dimwit after all [emoji33]


Sent from my Motorola DynaTAC 8000X using Tapatalk
Title: Re: GameBot source code
Post by: Crash3r on September 18, 2015, 05:18:31 PM
Chop bot is up - "CHOP_HostBot"


Whisper one of these game codes to CHOP_HostBot to create a game:

chop1v1
chop2v2
chop3v3


Pball bot is up and working but the maps are not properly lined up but still playable.
Smeagol is making some revisions and those should be done this weekend. In the mean time, you can still test things out

Whisper one of these game codes to PBALL_HostBot to create a game:

601v1
602v2
603v3

451v1
452v2
453v3

Can someone make us some BOT icons... would be cool heres my current bot names

chop_hostbot
chop_gamebot
pball_hostbot
pball_gamebot
Title: Re: GameBot source code
Post by: Delete mine too on September 18, 2015, 05:48:44 PM
Lance,
Thank you for writing hostbot

I have modified hostbot2 and launched PBALL_HostBot, with 2 maps so far: 60men, and 45men

I fixed a bug, when checking "Fixed Order" the next step was to hit enter to start the game, however hitting enter just unchecked Fixed Order so the game never started.

I fixed it by reordering the game setup - so it did Fixed Order then did Map Resources then hit enter to start the game.

The next thing I did is finish writing the GameTeams section so there is 1v1 (2v6), 2v2 (3v4), 3v3 (4v4), 3v4 (4v4). Game Teams for some reason Blizzard did not give it a hotkey like all the others lol! But I worked around that by first "T" for Game Type, then TAB over to Teams then DOWN to open the menu and then UP 7x to reset the settings to the top

However, it should be kept in mind that the key strokes for GameTeams selection are only correct if a 4v4 map is used, for a 3v3 map there are different options (obviously 4v4 is not an option) so the key strokes are different.

To handle this I created GameTeams names such as 31v1 - meanining the selection of 1v1 on a 3v3 map type.


In pball it was a bit more complicated than GoW because the maps are Fixed Order.
Because of Fixed Order, a different map is required for each Game Team - take for example a 1v1 60men - player 2 needs to be lined up across from player 3, but in a 2v2, player 2 and 3 need to be on the same side.

So a seperate map was created for each (thanks xXxSmeagolxXx), and presets were made for "601v1" "602v2" etc


Everything is working and I plan to launch a few other custom map bots

I just have one problem - After pball_gamebot starts the game, the game begins but is very laggy, then after about 15seconds everyone drops

In the game were hostbot and I on the same network (sep ports forwarded) and 1 other player on a different network

This happened 2 times that I tested, so far no succesful games because of it


Any ideas?

thanks

No, no, no!!
I fixed a bug, when checking "Fixed Order" the next step was to hit enter to start the game, however hitting enter just unchecked Fixed Order so the game never started.

This makes no sense dude. Fixed Order is not at the same screen as ok for game start..... also enter sends text not starts game.... alt + O for okay...... its not time yet archer you still have 5 months of being banned ;) All these minor changes lol...

I was talking about game creation, not game start dumbass

When ENTER is sent right after checking Fixed Order, it is then unchecked instead of creating the game. I fixed it by reordering the game creation steps.

It was a simple bug, Lance would have fixed it but he probably never came across it because he hasnt had to use any maps that use Fixed Order yet

I also finished up what Lance had started on with GameTeams and added in my own game presets and map navigations. What have you done? Nothing

No bother explaining anyways to someone who claims to be a l33t programmer but actually doesnt know or do shit

Youre not a l33t hacker either as you claim to be, I'd call you a script kiddie, but you dont even know how to USE the scripts much less write them! lmao what a newb

Your pretty worthless dude... nuff said

Stop jacking this thread with nonsense about some archer guy

Just want to know why my bot lags out and everyone drops right after the game starts


You said next thing to do is start game. That's your fault newb. I claim to be l33t rofl... I got people for that bro how do you think you got doxed?

Can you see the difference between me and you? I'm here to help you are here to destroy and steal. You're a bird that can't fly. Prison is around the corner for crumbs like you.

You failed to frame me idiot.
You failed at war2.
You failed at life.
You failed at hacking. Archer is dead. Riley chase.

Title: Re: GameBot source code
Post by: {Lance} on September 18, 2015, 06:21:41 PM
Hahaha holy shit blid cracks me up.  I love the pball hate posts :D  The one where they get a tag and can become unrestricted by playing gow...... omg I was in tears laughin lol
Title: Re: GameBot source code
Post by: {Lance} on September 18, 2015, 06:22:35 PM
As for laggy issues, you cant play from the same network without changing the game ports on one of the machines in the registry.
Title: Re: GameBot source code
Post by: Delete mine too on September 18, 2015, 06:41:15 PM
@Archer

I don't design shit? Hmm pretty funny. See now I guess you can say that since you don't have access to certain catagories here. What I wrote in 4 hours would take you years of copy and paste and being spoonfeed. Now don't make me quote you on your pms. Tupac I can't load a bot, how do I do this, tupac help me I am a newb and suck cock.

Remember I'm not lance I won't call. I'll show up to your fucking door. Don't take it as a threat I have no intentions on violence. Maybe I'll take your parents for lunch. Show them all your bullshit and how it all tracks back to you. Try me bitch. The look on their face when they see you are a criminal. I know how the preppy lifestyle is there. I'm almost certain they will dis own you.
Title: Re: GameBot source code
Post by: EviL~Ryu on September 18, 2015, 07:43:29 PM

@Archer
...
Remember I'm not lance I won't call. I'll show up to your fucking door. Don't take it as a threat I have no intentions on violence...

[emoji16]




Sent from my Motorola DynaTAC 8000X using Tapatalk
Title: Re: GameBot source code
Post by: Crash3r on September 18, 2015, 07:55:47 PM
Lance,

I can't get it to work... I have each bot on a different registry port. Each port is forwarded to each bot.

My client is also on a sep port, and port forwarded...

Still everytime a game starts players get dropped once the bot quits the game (10seconds after start)

Worst game lag I've ever seen for those 10 seconds of play time.



I noticed how your bot is getting "losses" while mine only gets draws


Did u program it to stay for 2minutes instead of 10 seconds?

Title: Re: GameBot source code
Post by: {Lance} on September 18, 2015, 08:32:05 PM
It stays for a longer period in case someone in game is lagging right at the start because you cant quit when its up.
Title: Re: GameBot source code
Post by: Crash3r on September 18, 2015, 08:37:28 PM
ok cool maybe i will add that to mine too later if it becomes a problem...


PBALL AND CHOP BOTS ARE WORKING!!!!

I put them on a VPN with ports forwarded and have tested several games now with zero lag, and works perfect



Stoked.


Still dont know why i couldnt get it working with me playing on the same network as bot but whatever it works now


Thanks Lance
Title: Re: GameBot source code
Post by: EviL~Ryu on September 18, 2015, 09:13:24 PM
So Lance are you going to Riley's for thanksgiving [emoji54]?


Sent from my Motorola DynaTAC 8000X using Tapatalk
Title: Re: GameBot source code
Post by: Delete mine too on September 18, 2015, 09:58:26 PM
Riley sounds so gay lol. He trying to make a custom map host bot which I made years ago and coded myself. Without using somebody else's work.
Title: Re: GameBot source code
Post by: Crash3r on September 18, 2015, 11:28:44 PM
lmao hear that Lance? Tupac made hostbot before you!!! Tupac thinks hes a programmer lmao

I didnt steal Lance's work, I credit him in my bot profiles (/finger PBALL_HostBot ...)

If you have ever written in a programming language (doubtful), you are using someone else's work. A real programmer would know that. But congratualtions on making a hostobt before lance! Oh do please post the source code so we can all laugh at your stupid wannabe ass

Only a newb thinks revinventing the wheel for each of his programs is some kind of accomplishment
Title: Re: GameBot source code
Post by: EviL~Ryu on September 18, 2015, 11:34:10 PM
You kids play nice now [emoji50]


Sent from my Motorola DynaTAC 8000X using Tapatalk
Title: Re: GameBot source code
Post by: Delete mine too on September 19, 2015, 01:26:04 AM
lmao hear that Lance? Tupac made hostbot before you!!! Tupac thinks hes a programmer lmao

I didnt steal Lance's work, I credit him in my bot profiles (/finger PBALL_HostBot ...)

If you have ever written in a programming language (doubtful), you are using someone else's work. A real programmer would know that. But congratualtions on making a hostobt before lance! Oh do please post the source code so we can all laugh at your stupid wannabe ass

Only a newb thinks revinventing the wheel for each of his programs is some kind of accomplishment
Nah I ditched the macro way and working on a real host BOT. And I admire lances work no bashing here. But I made mine even before iL's was made. It's not that hard to send a few key to a game window. I definitely love the way lances can keep war2 minimized. Reminds me of the old starcraft channel spammer.

Anyways I can tell you are hurt. It's okay archer as you admit you using lances code and not making your own like I did so I don't expect you to see why this way is stupid it works, it's highly boring because you mainly timing, sending keys one way or another..... but too bad I don't know nothing huh ?

You want to make a real bot get the source for SCGP, there is code left for W2GP. There now make a real one. You must be leet now because you can tell a game window to press a
Button or send keys.... let's see u try the real way.

There ask around I just gave you info on warcraft 2 game protocol. Not much done so maybe you can finsh it?? Nah didn't think so
Title: Re: GameBot source code
Post by: Crash3r on September 19, 2015, 10:34:12 AM
Cool man, good luck with that. Just add to the list of 'projects' tupac has been working on since '95.

Meanwhile Lance comes back to war2 for a few days, releases a hostbot that is practical, functional, and scalable to any map/game type, and begins hosting the first (or second after IL's) ever GoW Bot.

Then Crash3r, a Network Engineer who knows almost nothing about programming and makes no claims to, modifies Lance's code to add working Team Selections, Fixed Order, and several custom map selections, then releases the first ever PBALL and Chop Bots.


Tupac: Hey guys im working on altering the mem values so we can all control critters who fly and drop fireballs

Crash3r: Who gives a shit? I just made the first ever PBALL and Chop bots.

Tupac: Thats easy, I've been working on THE REAL WAY of doing that for years.

Crash3r: Cool story bro
Title: Re: GameBot source code
Post by: Delete mine too on September 19, 2015, 12:32:49 PM
Hahaha you didn't make shit ;) now sit the fuck down.

Can I expect you to be at dinner with your parents? I'm going to LIVE stream our encounter. Then make a youtube video "how to catch a newbie skid archer"

Best part is when I setup a website and it has a video, sceenshots, you know the stuff that shows up when applying for a new job. We'll since you failed at framing me, I guess it my turn to frame you eh? But yeah anyways small world I know To many people In Valparaiso, IN

Archer picks up his phone and plans to hand with his buddies at the local bar. But he didn't know about tupac going. Hahahah soon my friend. Dinner on me tell your parents.
Title: Re: GameBot source code
Post by: Certified MENSA Genius Brain (smart) on September 19, 2015, 12:43:20 PM
Maybe wait until he's actually doing something wrong again before getting so creepy, Tupac.
Title: Re: GameBot source code
Post by: Delete mine too on September 19, 2015, 01:33:47 PM
Maybe wait until he's actually doing something wrong again before getting so creepy, Tupac.

Why weird ? He told me he wanted to meet?

Shit I made more then you can pay someone to do newb. Make something yourself completely or gtfo.
Title: GameBot source code
Post by: EviL~Ryu on September 19, 2015, 03:05:46 PM
Cool man, good luck with that. Just add to the list of 'projects' tupac has been working on since '95.

Meanwhile Lance comes back to war2 for a few days, releases a hostbot that is practical, functional, and scalable to any map/game type, and begins hosting the first (or second after IL's) ever GoW Bot.

Then Crash3r, a Network Engineer who knows almost nothing about programming and makes no claims to, modifies Lance's code to add working Team Selections, Fixed Order, and several custom map selections, then releases the first ever PBALL and Chop Bots.


Tupac: Hey guys im working on altering the mem values so we can all control critters who fly and drop fireballs

Crash3r: Who gives a shit? I just made the first ever PBALL and Chop bots.

Tupac: Thats easy, I've been working on THE REAL WAY of doing that for years.

Crash3r: Cool story bro

Blid: eh custom? Your BOTH BANISHED FOR SUPPORTING SUCH WITCHCRAFT.

[emoji55]


Sent from my Motorola DynaTAC 8000X using Tapatalk
Title: Re: GameBot source code
Post by: xXxSmeagolxXx on September 25, 2015, 06:34:28 PM
Smeagol said it don't do men no good to play GOW and BNE's, GOW and BNE's is just a way to say a different kind of custom, and buffalo chips is all it means to me. Blid said he was an old Warcraft 2 player he was looking for the truth. Blid does not care for PBall, RPGs, customs or the loot, Smeagol looked at him and said you are a liar. Well Blid was disillusioned to say the least he grabbed Smeagol by the collar and he jerked him to his feet. There was something cold and shiny laying by Blid's head so he started to believe the things Smeagol said. ;) Lmao.
Title: Re: GameBot source code
Post by: xXxSmeagolxXx on October 06, 2015, 04:47:25 AM
Nobody probably got the reference in little the story I told about me and Blid haha. It is from an old classic country song by Tom T Hall - Faster Horses(The Cowboy and the Poet). I just took the lyrics and put a Warcraft 2 and PBall spin on it lol.
http://www.youtube.com/watch?v=vnvMcX95G20 (http://www.youtube.com/watch?v=vnvMcX95G20)