Sign in to follow this  
Followers 0
sweetlady

Gw bot script Help with func

22 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

up anyone?

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

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]

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

up

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Well, I've tried using msgbox and the software GIMP with the pixelsearch to test my func and it still doesnt work. No msgbox pop-up. So I'm really wondering what I'm doing wrong with my func.

Share this post


Link to post
Share on other sites

Just solved my problem.

Can close the tread now thx.

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

My tread is still open? Thx all but guys you can close it now since I've answered my question myself after a week of pulling my hairs off my head. :D

Edited by sweetlady

Share this post


Link to post
Share on other sites

Up to the top

Share this post


Link to post
Share on other sites

Why bumping a thread that is solved?

Trying to annoy us or something?

No just trying to have it closed.

Share this post


Link to post
Share on other sites

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.


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0