Jump to content

Gw bot script Help with func


Recommended Posts

I all, I have a little problem. I made a func to scan in front of my character on the minimap to check if the area is clear of enemies so that my character can continue walking when area clear.

So here's the func:

CODE
;scan if enemy is in front of us

Func ScanEnemy1()

PixelSearch(91, 477, 154, 506, 0xff0000, 10)

If @error then

Sleep( 100 )

PixelSearch(91, 477, 154, 506, 0xff0000, 10)

if @error then return False

EndIf

return True

EndFunc

And here's how I've used it in my script:

CODE
;go to Lissah

PrepMoveTo()

MoveTo(1, 17619, -17449)

MoveTo(1, 15697, -15812)

MoveTo(1, 13328, -14471)

MoveTo(1, 11022, -12727)

MoveTo(1, 10985, -12696)

RndSleep(200)

;check enemy in path

StopMoveTo()

RndSleep(500)

If ScanEnemy1() Then

Sleep(100)

EndIf

If Not ScanEnemy1() Then

PrepMoveTo()

EndIf

Still it doesnt work. Anyone have an idea why?

Thanks for the Help

Edited by sweetlady
Link to comment
Share on other sites

I have this thing against bots used for play against other people who play the game at the same time. (In other words you interact with other players in the game environment) If this is not that type of game, I'll help you. If it is like for World of Warcraft for example, then my suggestion for you is to play the game as intended and not cheat with a bot.

Link to comment
Share on other sites

I have this thing against bots used for play against other people who play the game at the same time. (In other words you interact with other players in the game environment) If this is not that type of game, I'll help you. If it is like for World of Warcraft for example, then my suggestion for you is to play the game as intended and not cheat with a bot.

It is for Guild Wars which is an MMO, like WOW as you said. So I guess I wont be having your input. Sad. If by any chance u want to help me out, all it does right now is running to a certain point on the map. Just trying to get it past 2 different groups of enemies.

Well at least thx for replying :P

Link to comment
Share on other sites

I agree with you Volley. Our online clan have dealt with lame cheats for a decade now and it does nothing more than ruin the game for other people. It's cooler if you're rubbish at a game, to suck with style!! At least people know you're playing to the best of YOUR ability.

Having said that, this is a help forum - and not the place for an ethical or moral discussion. Luckily I don't know the answer to your problem! :P

Link to comment
Share on other sites

Well thanks for your comments folks. So you all know, I have finished the game with multiple characters both in NM and HM. So I was just having fun. So I guess I wont be receiving any help from this forum. Thanks guys. No hard feelings, and I actually agree with you.

Edited by sweetlady
Link to comment
Share on other sites

Well thanks for your comments folks. So you all know, I have finished the game with multiple characters both in NM and HM. So I was just having fun. So I guess I wont be receiving any help from this forum. Thanks guys.

I do agree with volly. I have played and been an admin over quite a few online games. I do think for the most part these just hurt the game.

However, I also say that if somebody needs help they should receive it.

Code wise I don't see a problem with your script. What is going on? What's not working?

1) Is it not getting the pixel color?

2) Is it erroring out and exiting the script?

Link to comment
Share on other sites

I'm not at home right now, so I can't check it very well. But it looks like it will always return true?

;scan if enemy is in front of us
Func ScanEnemy1()
PixelSearch(91, 477, 154, 506, 0xff0000, 10)
If @error then
Sleep( 100 )
PixelSearch(91, 477, 154, 506, 0xff0000, 10)
EndIf
If @error then
Return False
Else
Return True; I haven't really used Return in awhile. So i'm not sure if this is right. But give it a shot.
EndIf
EndFunc

Try that

Edited by Firestorm

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

I'm not at home right now, so I can't check it very well. But it looks like it will always return true?

;scan if enemy is in front of us
Func ScanEnemy1()
PixelSearch(91, 477, 154, 506, 0xff0000, 10)
If @error then
Sleep( 100 )
PixelSearch(91, 477, 154, 506, 0xff0000, 10)
EndIf
If @error then
Return False
Else
Return True; I haven't really used Return in awhile. So i'm not sure if this is right. But give it a shot.
EndIf
EndFunc

Try that

Thx FIreStorm, I'll give it a try and keep you posted.
Link to comment
Share on other sites

Thx FIreStorm, I'll give it a try and keep you posted.

Hey FireStorm, I've tried with the way you did for the Func and used it like:

If Scanenemy1() = False then

PrepMoveTo()

Endif

But it didnt work.

So I thought if you guys want I could post my whole script. Althought its only the part where I have it scan in front on my charc that I have a problem with.

I've also tried several other things with no success. I'm starting to panic a bit :P

Anyhow, if anyone has an idea, please dont be shy.

Later All and thx for the help again

Edited by sweetlady
Link to comment
Share on other sites

up

Have you tested your function witch a static image like a screenie that can reproduce the situation where there is an enemy, and vice versa? Maybe this is guild wars that use an anti cheat engine that make pixelsearch not work while in game. You can also try to put some msgbox to see when the function return false and when it return true, this may help you to understand what is happening.

Link to comment
Share on other sites

Have you tested your function witch a static image like a screenie that can reproduce the situation where there is an enemy, and vice versa? Maybe this is guild wars that use an anti cheat engine that make pixelsearch not work while in game. You can also try to put some msgbox to see when the function return false and when it return true, this may help you to understand what is happening.

Yea, well I've taken a screeny to get my coordinates for the pixelsearch but the idea of doing a msgbox is not a bad idea. I'll give it a try. Plus, I'll try using GIMP for the screenie. At least it will give me some infos as it works or not. Because god knows I've tried several things with my func.

Thx I'll keep you posted

Edited by sweetlady
Link to comment
Share on other sites

  • Developers

No just trying to have it closed.

Don't see any reason why we would have to do that for you. Just leave it alone.

Just quit bumping it.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...