Guys anything changed in code ? Cause my bots wont loop, they execute once, and when resign and return to outpost they wont do it again. They wont loop.
What bot, what version .... I haven't notised any changes, but then again have been busy a few days with baptism of my nephew.
Anyway, tell us what is acting up, and maybe we can fix it 8-)
Have a problem with this. When running it, it at random disconnects gw code = 007 but usually just takes 10-60 seconds
(happens when I'm salvaging trophies (Feathered crests)
Don't know much about coding so any help from everyone here would be appreciated
Have a problem with this. When running it, it at random disconnects gw code = 007 but usually just takes 10-60 seconds
(happens when I'm salvaging trophies (Feathered crests)
Don't know much about coding so any help from everyone here would be appreciated
Gonna take a quick look, cant promise anything, but from the sound of it, it might be due to a too short "Sleep" between some functions, thats my teory anway with your description.
Edit: Maybe a sleep based on latency/ping (PingSleep(x), or something similar), haven't had a look yet (morning here now, but will take a quick look during the day).
Have a problem with this. When running it, it at random disconnects gw code = 007 but usually just takes 10-60 seconds
(happens when I'm salvaging trophies (Feathered crests)
Don't know much about coding so any help from everyone here would be appreciated
Noticed this, when being on Asian servers. Change the server and all is good.
Have a problem with this. When running it, it at random disconnects gw code = 007 but usually just takes 10-60 seconds
(happens when I'm salvaging trophies (Feathered crests)
Don't know much about coding so any help from everyone here would be appreciated
Quote:
Originally Posted by diesdasjenes
Noticed this, when being on Asian servers. Change the server and all is good.
Had a look at the code, seems you utilize the GetPing() in some Sleep() functions, but don't think you have GWA2.au3 updated to have a working GetPing() ...
Meaning there is a few ways to fix this, either you "fix" GetPing() or you change the Sleep() to not utilize GetPing() ...
Fix not utilizing GetPing()
Code:
Func SalvageBackpack()
Local $PingWait = 300
For $Bag = 1 to $UseBags
For $Slot = 1 to DllStructGetData(GetBag($Bag), 'Slots')
Local $sItem = GetItemBySlot($Bag, $Slot);
While CanSalvage($sItem) And $BotRunning
If FindSalvage() == 0 Then
BuySalvage()
Sleep(PingWait + 600)
EndIf
Local $sItemID = DllStructGetData($sItem, 'ID')
Local $kit = FindSalvage()
Local $rarity = GetRarity($sItem)
If CountFreeSlots($UseBags) > 0 Then
Salvage($sItemID, $kit)
Else
Out("Inventory full")
$BotRunning = false
EndIf
Sleep(PingWait + 600)
If $rarity <> $rarity_white And $rarity <> $rarity_blue Then
ControlSend(GetWindowHandle(), "", "", "{Enter}")
Sleep(PingWait + 600)
EndIf
$sItem = GetItemBySlot($Bag, $Slot)
WEnd
Next
Next
EndFunc
I haven't got a good fix to GetPing() (have issues generating the search pattern's to find it), but have my own fix for this (Getting this info my own way)
Function to get MemoryBase of Guild Wars: (custom GWA2.au3 function)
If you do this you can use GetPing(), but the address might get updated at any point, and if you cant update it yourself you are bound to waiting for others to do it every time its updated (moved in memory).
So depending on if you can use something like CheatEngine or simmilar to find the Ping Address on your own or not, I would recommend different solutions..
Anyway, from my understanding you are disconnected from the server due to trying to interact too "fast", so if you utilize the none GetPing() way, you might need to adjust "Local $PingWait = 300" to a higher or lower value depending on your "normal" ping, but this should stop the disconnects.
Thank you for the help. Gonna try the GetPing way. What happens if you set the ping to high? Just takes longer?. (Gonna have to wait and get something to salvage to try it)
--------------------------------------------------------------------------------
Was wondering if you could help me edit another bot (Ritualist Feather Farmer) that makes you type in the character name manually to instead use a drop down list.
Edit: For some reason i can't upload the 7zip file i create, only the entire zip file i downloaded from here. in the Rit feather farmer - go Ritualist Feather Farmer\feather updated\Jaya Bluffs Feather Farmer Rt_Any
Second bot is for the visual example. Checked some bots that have a drop down list but they seem to all do it in different way code wise.
If you don't want to edit it and it is just copy and paste i think i could do that myself. (can't any coding but can copy - paste)
If you can't/won't i understand and thank you again for the help you given me.
Thank you for the help. Gonna try the GetPing way. What happens if you set the ping to high? Just takes longer?. (Gonna have to wait and get something to salvage to try it)
--------------------------------------------------------------------------------
Was wondering if you could help me edit another bot (Ritualist Feather Farmer) that makes you type in the character name manually to instead use a drop down list.
Edit: For some reason i can't upload the 7zip file i create, only the entire zip file i downloaded from here. in the Rit feather farmer - go Ritualist Feather Farmer\feather updated\Jaya Bluffs Feather Farmer Rt_Any
Second bot is for the visual example. Checked some bots that have a drop down list but they seem to all do it in different way code wise.
If you don't want to edit it and it is just copy and paste i think i could do it myself.
If you can't/won't i understand and thank you again for the help you given me.
To answer the first question, yes if you set the value too high it simply takes longer for the "bot" to run through the function, you would want it as low as possible, but if you get it too low you'll run into the too many interactions/actions which the server will boot you for, Disconect you, so you can set it to whatever value suits you that doesn't get you Disconnected by server.
I can look into those, but truth be told I'm currently working on some custom code for someone here, a payed project, so most my time will go towards this at the moment ... that said, I can have a look, need to take breaks from the project from time to time, just to clear head and rethink the code.
Did you need me to modify the 1st bot (Salvage.zip) and upload it here (going the fix GetPing() version)? or did you want to try it yourself?
If the only part that needed to get changed was in the "Fix not utilizing GetPing() code window" and it only needed to change the GetPing to WaitPing = 300. The i changed that, if it was more then that part and in more locations then yes please.
Will have to check over time what my average ping to gw servers will be. So far it seems to be between 95 and 200 ping, so i set it so far at 200 ping.
(what happens if you get abnormal ping days, like yesterday it went from 95 ping average all day to 1200 ping spikes for under a minute.
If you ever want to do it, then you have my deepest thanks, but don't feel pressured.
If the only part that needed to get changed was in the "Fix not utilizing GetPing() code window" and it only needed to change the GetPing to WaitPing = 300. The i changed that, if it was more then that part and in more locations then yes please.
Will have to check over time what my average ping to gw servers will be. So far it seems to be between 95 and 200 ping, so i set it so far at 200 ping.
(what happens if you get abnormal ping days, like yesterday it went from 95 ping average all day to 1200 ping spikes for under a minute.
If you ever want to do it, then you have my deepest thanks, but don't feel pressured.
Yes, if you wanna go the way of not using GetPing(), then simply change the code to that of that code box.
Should your ping go beyond your WaitPing value, you'll run into Disconnects, since at this point you are again sending the server request's too fast, again depending on the other value which in this case is +"600", if this is enough time between request's to the server i dont know (but from what your problem was it would seem to small or that your GetPing() returned a negative value), so that you don't get Disconnected by server.
So as you see having a "FIXED" GetPing() get's you better "timers", but you have the hastle to update it once in a while when it's moved in game memory by updates to the game, but you don't need it generally you can simply go a slower route with hardcoded values, but on off days with high Ping this too will act up, but knowing what is acting up helps you figure out how to temp "fix" it (simply change values up to fix "timers")
Sidenote: At some point I'll crack how to do the AddPattern so we again have a stable GetPing() (self-updating), if anyone have any insight please hit me up with a private message, would be really great to figure out how to create / find new / updated ones.
when reading your explanation about the GetPing() and how it works for now with gw memory placement.
Wonder how gwtoolbox++ does it auto salvage, because i'm pretty sure they could add a auto buy salvage kit during the salvage process if they wanted to go a bot route.
So they must also use some sort of GetPing() code in their salvage code or something to that effect?
when reading your explanation about the GetPing() and how it works for now with gw memory placement.
Wonder how gwtoolbox++ does it auto salvage, because i'm pretty sure they could add a auto buy salvage kit during the salvage process if they wanted to go a bot route.
So they must also use some sort of GetPing() code in their salvage code or something to that effect?
Hehe yeah must admit I've been looking into gwtoolbox++ and the source code too, but as i write this i can't remember if I couldn't find the GetPing(), or if the way they get it was out of bounds for the current GWA2.au3 ... will have to look into this again ... but yes you are right, they have the information, actually they have better / different methods of getting it due to C++ vs au3.
Quote:
Originally Posted by Zilvermoon
YSidenote: At some point I'll crack how to do the AddPattern so we again have a stable GetPing() (self-updating), if anyone have any insight please hit me up with a private message, would be really great to figure out how to create / find new / updated ones.
Have spend a lot of time on this today, might have cracked it now, in the middle of testing, but from what I've gathered $mPing should work with this:
Just tried the salvage bot after the Ping edit. Gives a error when interacting with the merchant window. Error : unknown function name
Don't know what you did, I edited it with the changes from my last post here (GWA2.au3 edit, fixing $mPing, $mMapLoading & $mLoggedIn) ... Try this out and let me know if there is any issues.
Don't know what you did, I edited it with the changes from my last post here (GWA2.au3 edit, fixing $mPing, $mMapLoading & $mLoggedIn) ... Try this out and let me know if there is any issues.
It's working but still get disconnects (code=007).
Tried both American and Europe districts (live in Europe), tried the game minimized, out of focus, in focused.
Same "problem" as before, running nice and well, and at random gets the disconnect.
Am launching via GW launcher if that can cause any problems.