I'll create and upload a video tomorrow, till then I'll be taking suggestions for what I should add to the bot
Just a quick tip, you don't have to jam all your persists (or inputs/outputs for that matter) onto one line. You can have multiple lines for each, for example:
Makes things much nicer to edit and read.Code:@name Defence Bot @outputs Fire @persist EO:entity State Name:string Follow:entity Aim @persist Accuracy Firez Weapon Range Height Pos:vector @persist Grabed:entity Target:entity Online Grab Hold:vector @trigger none
I'll create and upload a video tomorrow, till then I'll be taking suggestions for what I should add to the bot
Hey this looks cool,
i have it as a chip but cant get it to work or do anything apart from spam quote at the side of the screen..
help ?
Meh, not to troll but.
THE GENERIC! IT BURNS!
Seriously though, what's with everyone making floating E2 defense bots.
They all offer the same thing. It's getting repetitive.
yea, sounds really cool but i cant get mine to work. for some odd reason i type 'bot,help' and it just spams constantly things on the right side of my screen any advice on getting it to work?
The very short answer is use this:
(Time*1)/1000 = 1 chip interval I use 20 cause it almost always works. If your chip doesn't do anything that requires multiple executions to finish you can do an interval of 500 which can ease things with your CPU somewhat. But less than 15 probably wouldn't be good, as you want it to have accurate timing.Code:Time=20 interval(Time) K = curtime() - entity():owner():lastSaidWhen() < (Time*1)/1000
If K doesn't trigger every time, multiply Time by 2, so K is true for 2 intervals.
Or you can do this if you need to use Time*2 or greater and don't want repeated text prints:
That way Once is only true the first interval after K is true.Code:@persist Once Time=20 interval(Time) K = curtime() - entity():owner():lastSaidWhen() < (Time*2)/1000 if(K){Once=1} if(Whatever & Once){ print("Do whatever here") #put whatever here Once=0 }
You may be able to use this to work with runOnTick(1), but K won't work so some sort thing like saving the chat string in a different variable and comparing if it changed since last execution and then using that and Once in place of K.
I don't use the once function as much, something like that should work for you.
Last edited by Captain Maim; 06-03-2009 at 05:34 AM.
One last thing, you can probably use a table to make your help function easier to work with.
Help["item",string] = "Description!"
Help["item2",string] = "Description!"
if(Chat:left-???- == "help" & Help[HelpItem,string]!="" ) {
hint(Help[HelpItem,string],7)
}
Something like this.
beep boop
Nice code, ill try it out later.
Bookmarks