Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Wizardry Online - Auto Bonus Point ReRoller


  • Please log in to reply
224 replies to this topic
Xionanx
  • Members
  • 6 posts
  • Last active: Dec 25 2012 04:30 AM
  • Joined: 14 Nov 2012
Ok, I am trying to make a script to Auto Reroll the bonus points in Wizardry Online until it gets a 30+ and then stop. But frankly I have no clue how to get it to work. what I have so far is a Macro that will ReRoll when a key is pressed by clicking the coordinates on the screen, but what I need/want it to do is just keep on rolling with no interaction until it gets a good result.

Here is what I TRIED that did not work:

loop{
getKeyState, isLocked, ScrollLock, T
if isLocked == "D"
{ImageSearch, , , 921, 582, 975, 610, image.jpg
if ErrorLevel = 1
{
click 962, 635, 5
sleep 100
click 1032, 1161, 5
sleep 100
click 877, 1088, 5
sleep 100
click 897, 1162, 5
sleep 100
}
else if ErrorLevel = 0
	    MsgBox The icon was found
}
}

Which "should" keep rerolling as long as scroll lock is on and it doesn't find a match for the image for the number I'm looking for. However, it doesn't do anything and I have hit an impasse.

Suggestions are more then welcome, as I could be approaching this completely wrong.

Iggy_
  • Members
  • 90 posts
  • Last active: Nov 16 2012 05:55 PM
  • Joined: 29 May 2011
Change
if isLocked == "D"
to
if (isLocked == "D")
and you should be good to go. That if statement was not working - it needed to be evaluated as an expression I guess.

Xionanx
  • Members
  • 6 posts
  • Last active: Dec 25 2012 04:30 AM
  • Joined: 14 Nov 2012
sadly, it still does nothing, even after making that change.. no messages and no mouseclicks.

Iggy_
  • Members
  • 90 posts
  • Last active: Nov 16 2012 05:55 PM
  • Joined: 29 May 2011
Well there was one other ImageSearch possibility, when it can't run due to missing image file or something and ErrorLevel is 2. You could add
else

MsgBox ImageSearch failed to run
like this
loop

{

getKeyState, isLocked, ScrollLock, T

if (isLocked == "D")

{

ImageSearch, , , 921, 582, 975, 610, image.jpg

if ErrorLevel = 1

{

click 962, 635, 5

sleep 100

click 1032, 1161, 5

sleep 100

click 877, 1088, 5

sleep 100

click 897, 1162, 5

sleep 100

}

else if ErrorLevel = 0

MsgBox The icon was found

else

MsgBox ImageSearch failed to run

}

sleep 500

}
to get a message in that case.

Xionanx
  • Members
  • 6 posts
  • Last active: Dec 25 2012 04:30 AM
  • Joined: 14 Nov 2012
I'll see if thats the problem, it could be that my image file isn't loading and/or is sitting in the wrong directory.

EDIT: Yep, that seems to be the issue, getting failed to run error so I'm guessing my image is not working out. See if I can correct that, and I'll be back as I'll likely have NEW problems here soon as this is the first time I have worked with image search.... so yeah, probably gonna have issues.

EDIT2: OK, so now it just seems to cycle through and doesn't seem to be able to find the image I'm looking for, I have attached a screenshot here so you have a reference of what I'm trying to look for. In the upper left hand corner of the screen you see the "Bonus Points: 7" listed. What I am trying to do is make a macro that will keep re rolling until the bonus points are 30+ but I feel like I'm going about this the wrong way.

Posted Image

Kamikamaaza
  • Members
  • 3 posts
  • Last active: Nov 16 2012 06:50 PM
  • Joined: 14 Nov 2012
loop
{
getKeyState, isLocked, ScrollLock, T
if (isLocked == "D")
{
ImageSearch, , , 153, 287, 177, 300, C:\Users\Myname\Documents\zero.png
if ErrorLevel = 1
{
click 1042, 1042, 5
sleep 100
click 1175, 931, 5
sleep 100
click 892, 1041, 5
sleep 3000
click 961, 569, 5
sleep 100
}
else if ErrorLevel = 0
{
ImageSearch, , , 153, 287, 164, 300, C:\Users\Myname\Documents\six.png
if Errorlevel = 0
MsgBox The icon was found
}

else
MsgBox ImageSearch failed to run
}
sleep 100
}
Im working on the same issue as Xionanx and i got his basic search to work.

However i want it to run another search for a different file if the first search is succesfull. All ive managed so far is to crash Autohotkey right after it finds zero.png

Kamikamaaza
  • Members
  • 3 posts
  • Last active: Nov 16 2012 06:50 PM
  • Joined: 14 Nov 2012

EDIT2: OK, so now it just seems to cycle through and doesn't seem to be able to find the image I'm looking for, I have attached a screenshot here so you have a reference of what I'm trying to look for. In the upper left hand corner of the screen you see the "Bonus Points: 7" listed. What I am trying to do is make a macro that will keep re rolling until the bonus points are 30+ but I feel like I'm going about this the wrong way.



Your coordinates for the search grid seemed to be way off buddy

Xionanx
  • Members
  • 6 posts
  • Last active: Dec 25 2012 04:30 AM
  • Joined: 14 Nov 2012
Yeah, i was Originally searching the roll results, but i figured the transparency might give me issue to I moved to searching the distribution box, I had updated the coords on my end but didn't do it on the script i posted.

On a side note: Is that you Maaza from Tribe? Got a guildy who uses Kamikamaaza in games and would find it quite a coincidence to see you here, lol.

EDIT: And I still have my problem of it not "Seeing" the image on the screen, I have been testing with a basic 8 as that is a common roll, and even when 8's show up it just keeps right on rolling.

Kamikamaaza
  • Members
  • 3 posts
  • Last active: Nov 16 2012 06:50 PM
  • Joined: 14 Nov 2012
Not a coincidence buddy, im stalking you! Lets solve this on mumble this afternoon!

sildin
  • Members
  • 1 posts
  • Last active: Nov 17 2012 09:58 PM
  • Joined: 17 Nov 2012
ok, first i have almost NO idea how AHK works, i just know they do. and very little computer skills. that being said; someone said to have it check against a pic to see if it should reroll, instead have it look to see if the numbers DO match and reroll if they do. take a pic of a 6 then another of a 7 and so on. then when it rolls a number that you do not have a pic of, it will stop rolling due to an error. if the number is not hugh enough then take a pic of it and add it to the series. eventually you will have 6-?? untill you get like a 45 or something. but like i said, i do not know how to make it do that but it will look at stuff you do have.

if it works then i will have to get the script and the images from you. good luck.

JustBenHere
  • Members
  • 4 posts
  • Last active: Dec 07 2012 03:42 PM
  • Joined: 23 Nov 2012
You guys have any luck getting one to work?

Xionanx
  • Members
  • 6 posts
  • Last active: Dec 25 2012 04:30 AM
  • Joined: 14 Nov 2012
Sadly, no. Kamikmaaza got it worked out to find the number "2" but thats it, we just cant seem to get it to find any other number. Its gonna take better AHK scripters then I, because I'm just a dabbler and it was a miracle I got as far as I did.

Qryche51
  • Members
  • 1 posts
  • Last active: Dec 09 2012 07:50 PM
  • Joined: 01 Dec 2012
Here's my attempt at an Auto Roll Macro. It worked for me.

Used AutoHotKey/AutoIt3. Adjust coordinates/timing to your
resolution/system.

;AutoRoll Macro for Wizardry Online Bonus Points.
;All x,y coordinates are for 1280x1024.
;Press the right key to start the macro.
;Press ESC to stop the macro.
;Macro will automatically stop on 20 or higher.

right::
BreakLoop = 0
White = 0xffffff
Loop
{
;This section selects Character race/gender.
;Remove semicolon for whatever race/gender you are rolling for.
;click 445, 874, 5 ;Race Selection - Human (M)
;click 436, 914, 5 ;Race Selection - Human (F)
;click 569, 875, 5 ;Race Selection - Elf (M)
click 566, 917, 5 ;Race Selection - Elf (F)
;click 727, 878, 5 ;Race Selection - Dwarf (M)
;click 726, 920, 5 ;Race Selection - Gnome (F)
;click 874, 878, 5 ;Race Selection - Porkul (M)
;click 861, 910, 5 ;Race Selection - Porkul (F)

sleep 60 ;A slight pause
;Start the rolling
click 569, 984, 5 ;OK Button
Sleep 2000 ;Wait until the roll is done
;Search for white pixels in the area on the screen where a tens digit
;would be after the roll is done. This one stops on a 2 (20) or higher
;in the tens place.
PixelSearch, Px, Py, 617, 500, 627, 520, White, 0, Fast RGB
if (ErrorLevel = 0)
break
;Stop macro
if (BreakLoop = 1)
break
;Continue to next roll
click 637, 544, 5 ;OK Button on bonus points dialog.
sleep 60 ;Pause
click 720, 982, 5 ;Cancel character and reroll another.
sleep 60 ;Wait for Server
}
return
Esc::
BreakLoop = 1
return

;Used to stop macro when a 1 is in the tens place.
;PixelSearch, Px, Py, 622, 500, 632, 520, White, 0, Fast RGB

Go0devil
  • Members
  • 16 posts
  • Last active: Dec 26 2012 01:28 PM
  • Joined: 02 Dec 2012

removed.



Go0devil
  • Members
  • 16 posts
  • Last active: Dec 26 2012 01:28 PM
  • Joined: 02 Dec 2012

removed.