Locked Home » Forums » Legacy & Archived » Archived Content » Vanguard » VGExtreme Programs

VGExtreme Crafting Bot - Completed : VGExtreme Programs

Posted: September 7th, 2007
ve_necro
like I said, the problem is that once it hits stage 3 the script ends, so when I tab out into VGExtreme I see on the bottom the following message.

ERROR: Line : 370, Char

On line 370 the text is:

Set objFile = objFSO.OpenTextFile(Logpath, ForReading)

Being new to Exhume Im still getting used to some of the functions but after looking through the script it seems that everything is in place as it should be, is this a file I should have on my computer somewhere?

Here is my file incase you can spot the mistake


Attachments:
CraftingBot.vbs Register to unlock hidden link
(19.3 KiB) Downloaded 17 times
Posted: September 7th, 2007
User avatar
Premium
Total Posts:6662 Joined:2004
It sounds like there is a problem in stage 3.

The easiest way is to add a TON of debuglog messages everywhere in your script to find out exactly where it crashed.

Ie add lines like so:

DebugLog "Entering Stage 3"
...
DebugLog "After Pressed Button 1"
...
DebugLog "Leaving Stage 3"

etc. Then on a crash, check your log and you can see approx where it crashed.

If you are more familiar with VB, you can add try/catch or error catching routines.

_________________
Use Search first, ask questions later!
Posted: September 7th, 2007
crimsonsoul24
When I run it It gets to the 2nd part and gives me this error

"Error: Line 373, Char: 0 :: Input Past End of File"

Line 373 is "strSearchString = objFile.ReadAll"
Posted: September 7th, 2007
Total Posts:266 Joined:2007
ok, I know what that means.

It either cannot find the VGLogDump.log file or the file is empty. See if the new version fixes it. Will upload it in about 5 minutes.
Posted: September 7th, 2007
Total Posts:266 Joined:2007
Updated version with this, download it and see if you still get the same error.

9-7-07: Added an error check to make sure that the script does not try to turn in a non-completed work order over and over, causing a loop where nothing gets done.
Will have to define the abandon button X,Y for mouseclick.
Also optimized the code for future enhancements.
Added function that should create and write to the VGLogDump.log file automatically.
Posted: September 7th, 2007
crimsonsoul24
I seem to randomly run off in a weird direction
Posted: September 7th, 2007
ve_necro
OK, the new version works a treat. Thank you for your help there strabomeeks, cannot wait for the refining part to be added too, my poor wrists will love you forever.

All thats left now is to find a crafting location where the NPC doesnt roam, not scared of being caught as I dont afk bot, as long as I reply to tells GM's are fine with me using 3rd party plug ins, or atleast we were taught that in EQ (was a guide for a while).

Keep up the good work there my friend

EDIT: Oh, out of curiosity, where is this set up for, save me having to make new waypoints with each alt.
Posted: September 7th, 2007
Total Posts:266 Joined:2007
I have it set up for Veskals exchange atm. I keep trying to get it so that if the person roams you follow them, but no matter how many movetomob() I put in there, I still seem to lose the window which puts the damn thing in an endless loop of clicking in two places on the screen. I will fix this next because I am tired of coming back and seeing it just standing there.

Crimson: When are you running off in a weird direction?? As soon as you start it, after you target the WO person?
Posted: September 7th, 2007
crimsonsoul24
Sometimes after I Get to the crafting bench, click on the WO, click begin, then after the crafting part comes up (where you start crafting) I'll turn right and start running for a good long while, then I'll run to the WO guy and it wouldn't bother me that much, except at Fisher's Pen I run into a tent that I have to stop the script and move out of :)
Posted: September 7th, 2007
Total Posts:266 Joined:2007
it sounds like you have told the script to hit D sometime after the crafting starts followed by W for a while, I really cant think of anything else that would be causing this and I cant get my guy to do it. Can you copy and past the code for whatever Stage it is happening it that you have and ill look over it.
Posted: September 7th, 2007
crimsonsoul24
strabomeeks wrote:it sounds like you have told the script to hit D sometime after the crafting starts followed by W for a while, I really cant think of anything else that would be causing this and I cant get my guy to do it. Can you copy and past the code for whatever Stage it is happening it that you have and ill look over it.
it happens at the first stage and I haven't touched that part (the part where you add the wood, or stone or what have you)
Posted: September 7th, 2007
Total Posts:266 Joined:2007
the only thing stage one says to do it hit hotkey one, wait 3 seconds, and hit hotkey2 if still in stage 1. I would verify that you have hotkey one on CS= and hotkey two on CS-. and that the last line of Hotkey 1 is /craftingselectaction1 and the last line of hotkey 2 is /craftingselectaction2.

The only other thing I can think of is that the script is moving to fast due to you experiancing lag and it checks to see if you are in stage1 before you actually are. What you can do to see if this is the case is find the part that says

If crafting_state = 4 then

and change the last line in that section from

sleep 1500

to something like 4000 and see if that helps.
Posted: September 8th, 2007
ve_necro
crimsonsoul24 I have had that issue too, currently Im going through the code again to see where I may have changed something by mistake, although its not everytime it does it.

As regards the NPC moving away, yes I too am getting a little frusterated by it losing the window and clicking thin air hehe, but I have a semi solution for you, not a great one but it helps most of the time.


Code: Register to unlock hidden link

'This turns in any completed work orders and gets new ones.
Sub Turnin()
        MoveToMob getTarget
        Mouse.LMouseClick LFW_X, LFW_Y, 1, 1
        Mouse.LMouseClick CT_X, CT_Y, 1, 1
        Mouse.LMouseClick FWO_X, FWO_Y, 1, 1
        Mouse.LMouseClick CB_X, CB_Y, 1, 1
        VGSendText "^+="
        Turninerror
        MoveToMob getTarget                                                                                                                 
        Mouse.LMouseClick FWO_X, FWO_Y, 1, 1
        Mouse.LMouseClick CB_X, CB_Y, 1, 1
        VGSendText "^+="
        Turninerror
        MoveToMob getTarget
        Mouse.LMouseClick FWO_X, FWO_Y, 1, 1
        Mouse.LMouseClick CB_X, CB_Y, 1, 1
        VGSendText "^+="
        Turninerror
        MoveToMob getTarget
        Mouse.LMouseClick AT_X, AT_Y, 1, 1
        Mouse.LMouseClick FWO_X, FWO_Y, 1, 1
            Do Until (Crafting_AvailableWorkOrderDifficulty = "")
                MoveToMob getTarget
                Sleep 1500
                    If (Crafting_AvailableWorkOrderDifficulty = "Difficulty: Easy") OR (Crafting_AvailableWorkOrderDifficulty = "Difficulty: Very Easy") Then 'You can decide wether or not you can handle harder WO's here
                        If (Crafting_AvailableWorkOrderSkill = "Skill: Mineralogy ") OR (Crafting_AvailableWorkOrderSkill = "Skill: Artificing ")Then 'This is where you set what work order skillset you desire
                        'If (Crafting_AvailableWorkOrderSkill = "Skill: Blacksmithing ") OR (Crafting_AvailableWorkOrderSkill = "Skill: Armor Smithing ")Then
                        'If (Crafting_AvailableWorkOrderSkill = "Skill: Tailoring ") OR (Crafting_AvailableWorkOrderSkill = "Skill: Outfitting ")Then
                        'If (Crafting_AvailableWorkOrderSkill = "Skill: Carpentry ") OR (Crafting_AvailableWorkOrderSkill = "Skill: Artificing ")Then
                            Mouse.LMouseClick CB_X, CB_Y, 1, 1
                            MoveToMob getTarget
                            Mouse.LMouseClick FWO_X, FWO_Y, 1, 1
                        Else
                            Mouse.LMouseClick DA_X, DA_Y, 1, 1
                            MoveToMob getTarget
                            Mouse.LMouseClick FWO_X, FWO_Y, 1, 1
                        End If
                    Else 
                        Mouse.LMouseClick DA_X, DA_Y, 1, 1
                        Mouse.LMouseClick DA_X, DA_Y, 1, 1
                        Mouse.LMouseClick DA_X, DA_Y, 1, 1
                        Mouse.LMouseClick DA_X, DA_Y, 1, 1
                        Mouse.LMouseClick DA_X, DA_Y, 1, 1
                        MoveToMob getTarget
                        Mouse.LMouseClick FWO_X, FWO_Y, 1, 1
                    End If
            Loop
        MovetoCT
End Sub
Basically what that does for those who dont understand scripting is makes it scroll down 5 times when looking for a WO till it finds your target difficulty, then individual scrolls there after. Not exactly a hard thing to do, but it saves a little time and most of the time the NPC hasnt ran off before you get all 3.
Posted: September 8th, 2007
Total Posts:266 Joined:2007
Yeah that would work too, I tested another solution last night that will only loop the command to search for a work order 35 times or until it has 3. That way if you lose the screen you wont be standing there more than a few minutes.

Also, instead of putting that line there 5 times, you could put it like this and it will do the same thing.

Mouse.LMouseClick DA_X, DA_Y, 5, 1

-edit- had the numbers backwards
Posted: September 8th, 2007
sky_genie
Hi. I haave been trying to make this thing work. Everytime I run it, it quits at:

Set objFile = objFSO.OpenTextFile(Logpath, ForReading)

The error in Exhume says:

Turning to Aru Greyfish
Error: Line 356, Char: ) :: Path not found
Error: Line 356, Char: ) :: Path not found
Failed to run script
End script

Note that Aru is the NPC that gives work orders. On the screen the bot searches and finds the NPC, opens the wo dialog, selects the top wo and dies...

Any help would be greatly appreciated. Also note that I am not a programmer (which should be obvious)
Thanks
Ready to join the community? Click here and see all of the benefits!
blue large dotWho is online
Users browsing this forum: No registered users and 5 guests
Locked