Okay So, I've put in a bit more work, and i'm planning a few extra things.
I've been studying some of the packets, and i "THINK" , no promises, BUT , i "THINK" i may be able to make a simple AI to go along with the bot. Sort of like... if theres no one else in the server, then the bot will enter the bout list , and play, though do keep in mind, it would probably be alot like random.lua XD
where it looks like uke is having a seizure.
Actually i managed to make the bot do moves via the lua scripts, very basic ofc, but nonetheless it works
heres a sample of it
-- fighttest.lua
SendData("GRIP 1;0 0")
SendData("JOINT 1; 0 3 1 3 2 3 3 3 4 2 5 3 6 3 7 2 8 3 9 3 10 3 11 3 12 3 13 3 14 3 15 3 16 3 17 3 18 3 19 3")
SendData("PING")
All it really does, is extend the pecs i believe, i was just logging the packet from my toribash client, then copied over what was came from it.
Then i entered it into an lua file, and it seemed to work fine. Now, i've added a joint/body/joint state list into the program for later use. For now i'd like to get simpler things done first, then we'll kick it up a notch (BAM!)
So for a brief overview of whats 'Working'
-Connection
-Chat
-Login as admin(if you have the password for the server)
-Some simple lua scripting , not much but a few functions.
-Auto-Login #If set in the config file.
-Executes Scripts/startup.lua and Config.lua upon startup.
-Limited to one instance of the program at a time
-Logging system, saves logs on startup as (MM-DD-YYYY)(HH.MM.SS).log and
has a timestamp in the log lines as [HH:MM:SS]
-Colored console
Then some simple commands that are working
/kick <ID> #Just like in toribash
/Login #Logs you in with config's username/pass.
/auth <PASS> #Tries to log you in as admin
/spec #Makes the bot go to spectator mode
/quit #Sends QUIT, Terminates Connection and Suspends The Socket thread and hangs at a "Press any key to exit" line in the console.
/raw <DATA> #Sends raw data to the server , for example, i stated above , that i could make my guy fight via the lua scripting, thats an example of the raw data.
/run <SCRIPT_NAME.lua> #Reads and Executes an lua script that is designated in the Scripts folder.
Then some Lua Functions
Write("Some Text Here") - Would write Some Text Here, in the console window
GET("http://someurl.ext") - Visits a site, and returns the html text for further string manipulation, or maybe not.
Run("script.lua") - Runs another lua script.
SendData("RAW DATA") - Sends raw data to the server
Say("Msg here") - Sends a message ingame when connected.
So yeah... i think i covered mostly everything... theres probably something i left out but, i cant be bothered to check atm.
So when i finish writing a beta version, i may give it out to certain people for testing. But, i think to ensure that it is ONLY used for server purposes, i'll maybe charge X amount of toricredits for a 6 - 12 month license, which will be hardware locked to the computer the bot is hosted on.
OR
I could give the bot out for everyones use, but take out LUA scripting, and limit certain things within the console.
My biggest worry is people who will misuse the program for whatever reason
i.e, spamming, trying to exploit some things. But alongside of that , i could offer a licensed version as well which would include everything, and would be hardware locked as i mentioned above, and would be sold for a certain amount of toricredits (Probably no more than 15k for a 1 year license)
So... Yeah Sorry for the long post, but i wanted to get all this out now :P
If you have any questions, or have a server you might wanna use it on feel free to pm me or post here and i'll try to respond ASAP.
-Cheers,
Steve (oMejA)
EDIT: Hm, i've thought about this, and it seems like it might be do-able.. I'll have the bot make replays of each match as well..
The only problem i see, is in the packets.. i dont think i can make a complete replay.
From a random auto save
FRAME 0; 0 0 0 0
JOINT 0; 1 1 2 1 3 1 4 2 7 2 12 2 13 2 14 1 15 2 19 1
GRIP 0; 1 1
POS 0; 1.00000000 0.30000001 2.59000009 1.00000000 0.34999996 2.14000005 1.00000000 0.34999996 1.89000005 1.00000000 0.39999998 1.69000000 1.00000000 0.44999999 1.48999995 0.75000000 0.34999996 2.09000009 0.44999999 0.34999996 2.23999995 0.05000000 0.34999996 2.23999995 1.25000000 0.34999996 2.09000009 1.54999995 0.34999996 2.23999995 1.95000005 0.34999996 2.23999995 -0.34999999 0.29999995 2.23999995 2.34999990 0.29999995 2.23999995 0.80000001 0.44999999 1.39000005 1.20000005 0.44999999 1.39000005 0.80000001 0.44999999 1.04000002 1.20000005 0.44999999 1.04000002 1.20000005 0.44999999 0.44000000 0.80000001 0.44999999 0.44000000 0.80000001 0.34999996 0.04000000 1.20000005 0.34999996 0.04000000
QAT 0; 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000
LINVEL 0; 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
ANGVEL 0; 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
Well in the replays,
we have things like
FRAME
JOINT
GRIP
POS
QAT
LINVEL
ANGVEL
However, When i recieve an incoming packet, i dont get all this, i get.. joint, grip, and maybe one other thing, but i do see some garbled looking stuff containing
P_ANGVEL then a bunch of garbled text.. Meh *shrugs*
Maybe someone can help me out with this? Is it some sort of encryption/compression? Is there any way i might be able to.. decrypt/decompress if it is?
Anyways yeah. Hope someone can help with that.
Last edited by oMejA; Mar 24, 2008 at 06:02 AM.