Cubi Bot Problem

02/17/2014 11:11 cyberkeks95#1
hi,

ich arbeite gerade an einem Cubi-Bot auf vBot basis :)

Nun habe ich folgendes Problem:
Im gegensatz zu normalen NPCs fliegt der Cubi langsam vom spieler weg, selbst wenn man auf ihn schießt.
Bei normalen NPCs könnte man einfach hinterher fliegen
beim cubi geht das nicht, da sobald die protis draußen sind (und immer wieder über den cubi fliegen) ein Pixelbot den Cubi nicht erkennen kann und somit nicht weiß in welche richtung er fliegt

Hat jemand von euch ne idee wie man dieses Problem lösen könnte?
Ich dachte vielleicht könnt es klappen wenn der bot nur nach einem Teil des cubis suchen soll (z.b. einen Ecke)?

Gruß
Cyberkeks
_______________________________________________

hi,
at the monent im working on a cubi bot :)
the problem is that a Cubi is slowly moving away from the player, even if he shoots at it.
so the bot has to move next to the cubi.
I ask you now how to solve this problem?
When the protis are out, its impossible for a Pixelbot to detect the cubi, because they always fly over it.

if you have any idea, post it :)
i thought about searching only a part of the cubi (e.g. a corner), to localize it

regards
cyberkeks
02/17/2014 12:09 Scytex#2
Man könnte, schätze ich einfach mal, ein bestimmtes Schiff, z.B. Bastion, nehmen und dessen Spitzen, die er immer zum Gegner richtet, suchen lassen.
Also guckt der Bot erst wo die Mitte des Bildschirms wäre und danach in welche Richtung sich die Spitze bewegt hätte. In diese müsste er sich dann auch bewegen.

So sollte er immer dem Cubi folgen.
02/17/2014 13:22 TskulT#3
Make it hold the mouse button after selecting it, and the make it keep the mouse between the cubi and the ship(cubi will be visible at some blinks, put the imagesearch in the loop). Use command "Click down" to hold and "Click up" to release([Only registered and activated users can see links. Click Here To Register...]). And MouseMove, x, y to move the mouse. :)

Edit: the formula for getting the middle coords is at the point where it finds the cubi.

Code:
Click down

Loop{
	ImageSearch, CubiX, CubiY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, *20 sources\Cubikon.png
	if(ErrorLevel==0){
		Random, randx, -10, 15
		Random, randy, -5, 20
		clx := (((cx - CubiX) // 2) + CubiX)+randx
		cly := (((cy - CubiY) // 2) + CubiY)+randy
		MouseMove, %clx%, %cly%
	}else{
		break
	}
}

Click up
Something like that ^
02/17/2014 16:37 cyberkeks95#4
thank you i will try it :)