Help - Search - Members - Calendar
Full Version: TinkerBot
AC Tools Everything Macro > AC Tool Macros > Asheron's Call Macros
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
Ahk
You'll need AcTool 4.5.5 or higher to run this macro.

Version 2.62
QUOTE

Version 2.62
Fixed a problem where the bot would not properly return items because
the backpack panel was not open.

Version 2.61
TinkerCalc updated -- Silk modifier was off, and added Rose Quartz modifier (wasn't there for some reason?)


If you find a bug, please report it to this topic ONLY. There's a lot of settings to modify, but you only have to do that once..so read everything in the TinkerBot.mac in it's entirety. Most updates I make won't require that the configuration (TinkerBot.mac) file be replaced assuming you're coming from the last release...this particular update requires no changes from version 2.0

Important: Your actool directory must be in C:\Program Files\AC Tool\, and you must extract the files to C:\Program Files\AC Tool\Macros\TinkerBot.
Make sure all of your key bindings (F9, F12, and y) are the default keys otherwise you'll have problems!

Read the comments in the VersionHistory.txt file for updates and other info.

If you need help just ask here, PM or send me an email. You're free to use any portion of my code in other macros if you like...and mutilate it as you wish biggrin.gif

Good luck tinkering!
Ahk


The download for TinkerBot is located on the AC Tool Macro Vault
DaMOB
more guts than I had to do this Ahk. I had many a request for it but I didn't want the grief it could have brought with accusations and/or something goes wrong.

Good luck on this cause there is a market for it. wink.gif
Ahk
Yes, I was worried about that as well. The only way to give it a real world test was to throw it in the marketplace and hope for the best. I've got a good reputation on MT, so even if someone did accuse me of thieving something there wouldn't be any doubts about it. I've had it hold onto a couple of people's items in beta, but they were responsible about it in emailing me. The bot has some crude spam detection and will autoban people who constantly send commands, furthermore I have a ban list for the others that figure out new ways to abuse it. I won't hesitate to add names to my list (currently none on it) - as it is though people have everything to lose and nothing to gain with a free portal/tinkering bot.

Ahk
DaMOB
Yep, but is your name anywheres in the spam? I had mine announce I made it and learned to regret it. Chloe Anne on SC was having problems (one because it was 3 versions ago) and I had 4 tells (1 while I was in a quest) complaining to me on the same day. I had to tell them that I made the script not the bot and politely told them to go bug the owner because it sounded like he needed to reboot.

Moral is if it spams your name at all, or if you ever think of doing it DON'T. heheh, it was my downfall for thinking the average AC player who would use the bot had any brains and would understand the difference between owner and writer, but oh well.

Good luck on this script.
Jaz
Thanks for releasing this smile.gif

First feature request - support for non-magic trained TinkerBots camped at mansions with BuffBots, ie. an option to simply send a tell to a Buffbot for buffs. I've kludged it currently by simply replacing the entire Rebuff procedure in tinkSpellCasting.mac with a 1 line Say command but I'm sure you'd prefer people to stay out of there wink.gif

Other thing I noticed when I first start it is the spam line (taken from BotLog.txt)
QUOTE
SpamMsg2 I offer Weapon/Armor/Magic tinkering skills none

For some reason $Msg is returning 'none'. Any ideas since I couldn't find where this was being set to debug?
Jaz
NM, worked out that if I have PortalBot = 0 then it has $Msg = None.

As soon as I went and learnt the appropriate spells and bought a Foci to make my Tinker mule into a Portal Bot and changed PortalBot = 1 the SpamMsg2 was much nicer.
Ahk
Ah ok, I'll see what I can do about the 'none' tinkering skills problem -- I don't currently see why the tinker skills aren't setting up correctly but I'll spend some time on it--also, setting up a portal bot isn't necessarily a bad thing smile.gif. I thought about setting up for a buff bot, but if the bot is not on what should it do? Log off or go without buffs (any ideas)?
The non magic would merely require adding a few lines to the Procedure Rebuff in tinkSpellCasting to @tell a specific character.

DaMOB, hehe yeah I completely avoided putting my name in the spam message. The only way people can see who created it is on info or morehelp (I think thats what the commands are lol) and info. Luckily those commands never get used, along with donate lol. I have been receiving more tells on my mule when the bot isn't on though, that's the only pitfall I've seen of running the bot so far--made it so I wouldn't have to tinker on my time and I end up doing a 180 and doing it anyways.

Thanks for the comments
Ahk

EDIT: Oh, didn't see where you modified it for the buff bot lol. I don't mind people changing things like that, I'm just worried that they'll try and implement accounting and charge for the service.
Also, the SpamMessages are set one time only in the Procedure Init -- originally they set each time the bot had to spam.
I'm having trouble nailing down why it's staying none
Jaz
Actually, I'd been contemplating training Item Magic on my Tinker Mule for a few months just so I had 2 more portals I could 'save' so this finally gave me a good reason to do it smile.gif

With regards the using a BuffBot, I guess that depends on other people's thoughts as well. I'm biased since I run the BuffBot on another of my machines so bottom line is that I always know when it's going to be up and if it goes down, usually due to my router spontaneously rebooting or ISP/internet issues, then the TinkerBot will also go down. In my particular situation where I have no magic skills except Item Magic it would be a case of 'if the Bot doesn't buff me, logout' since I can't self buff.

Another feature that would be nice is automatic determination of the characters skills rather than requiring hard-coding of them in the macro which then requires subsequent updating on a regular basis. I really liked the way Isudus implemented this in his Tinker Calc plugin - it simply takes your current skill (inc all buffs/minors/majors/etc.) and has a check box for Brilliance. I'm assuming the theory behind the TinkerBot operation is to not have all your minors/majors/etc. equipped all the time and have the macro equip them as needed which means the dynamic reporting of the Bot's skills is going to constantly change and only be accurate when everything is equipped. Maybe the solution is to have True/False type modifiers that are declared in the macro which add a pre-defined value to the dynamically detected base skill? Eg.
CODE
SetConst HaveMinorArmor = 0 // Adds 5 to base skill
SetConst HaveMajorArmor = 1 // Adds 15 to base skill
SetConst HaveMinorItem = 0
SetConst HaveMajorItem = 0
etc.
SetConst Have MinorFocus = 1 //Adds 2.5 to base skill except Magic Item Tink where it adds 5
SetConst Have MajorFocus = 0
SetConst Have MinorStrength = 1 //Adds 2.5 to base Armor Tink skill
SetConst Have MajorStrength = 0
etc.

While this would require more initial constants to be defined it would only need to be done at initial setup and then not have to be touched again except when you get different stuff for the Bot to equip.

Hmmm.... thinking as I type (yeah, that's what that noise is..) you could even interogate the items delcared in the section when you list Universal equipped items (Call AddDSLore UniversalTink) and specific items to be equipped per tinker class (Call AddDSLore WeaponTink, etc.) keeping it totally dynamic?
Ahk
The reason the skills are hard coded is because GetSkill on a skill that could or could not even be trained still returns numbers (not valid). I guess I didn't really think about how the options are there to let the bot know you have them so the skills could be retrieved each start. Rather than get all complex on buffed stats, have it cycle through the wield lists (that apply), then add 25 (50 for MIT) to simulate brilliance. I'll add that to my little list I have going, when I get a day off of work I'll add this stuff in and label it 1.1 smile.gif

Another thought about calculating buffed stats...on the AddDSLore -- put the number added rather than have it wield/unwield them each time the macro is started...this has got my brain going lol. Would be simple enough to add smile.gif. I appreciate your input/suggestions on the bot.

Keep em comin',
Ahk

Edit:
Magic item tinkering might be a little harder to implement dynamic calculation, I'll just make some kind of variables that know what adds focus and such.

Here is the current list of things (in no order):
QUOTE
StretchUI autodetect
incUI overriding for skins
Fix Spam Message problem
Add buffbot support
Add dynamic calculation of buffed skills
Ie:  AddDSLore WeaponTink, Item, 5
Add buffbot functions, log when bot's not on.

I've already fixed a minor problem on portals (was not even a valid variable, I have no idea why the macro didn't error there) in the debug log to show what portal was summoned. I'm considering making the spam messages completely up to the user, rather than autogenned (since it's not working right anyways on the string manipulation).
DaMOB
Ahk, I wrote this after having to think how it could be done for my bot and maybe just maybe it will help you and anyone else with the getskill problem. It has worked for me everytime I have tested it but I will not count it as 100% for 20 years of working (heh).

CODE
GetSkill $temp //Life/Item/Creature
SetConst temp1 = {PluginResult}
GetAttrib 5 //Focus
Setconst temp2 = {PluginResult}
GetAttrib 6 //Self
Compute temp2 = int((( $temp2 + {PluginResult} ) / 4) + .5) //magic is (f+s)/4 and I +.5 because I do not trust ceil
GetSkillEX $temp //Life/Item/Creature
If $temp1 = $temp2 //Does (F+S)/4 = GetSkill
 SetConst temp1 = {PluginResult}
 GetAttribEX 5 //Focus
 Setconst temp2 = {PluginResult}
 GetAttribEX 6 //Self
 Compute temp2 = int((( $temp2 + {PluginResult} ) / 4) + .5) //magic is (f+s)/4 and I +.5 because I do not trust ceil
 Compute temp1 = $temp1 - $temp2 //GetSkillEX - what we see via their attribs
 If $temp1 < 10 //If the difference is less than 10 then they are not trained in this magic school (mastery lvl 1).
   SetConst temp = 0
   Exit
 End
Else
 SetConst temp1 = {PluginResult} // If the above comparison did not match it meant we are buffed use that skill level instead.
End


It was written for magic but I am sure it would work with some slight tweaking for anything based on the getskill.

Now for the tink skills it might not work dunno because if the skill is even buffed you have no base so the tink is not allowed.
Triple_X
nice program so far. (the idea).

I am having the problem, to where they add the items in the trade window (it goes through the buff routine) , it IDs them, makes the announcement to tell him 'go' or waiting for 25 seconds for Brill...and never does anything. Have tried telling it 'go' (with and without the 's)...you tell it the word 'go' and it acts like it doesn't understand it...it is like issuing the "help" command or something. Wait past the 25 seconds, and nothing ever goes.


Running Decal 2.5.2
AC Tool 4.47

Tried running in Stretched UI as well as no stretched UI. Tried changing resolution from 1024x768 to 800x600....still nothing.

Something I am missing?


Thanks
Triple_X
hmmm...I maximized the chat window, and it appears to be working ok so far....so nevermind, and thank you! biggrin.gif








Ahk
Yes, someone minned/maxed the window yesterday and was having that problem -- it doesn't ignore the go, it just doesn't have theitems to tinker because the chat window wasn't maxxed. I'm adding code to detect stretchui, been thinking about how to get around the chat window without forcing people to go one way or the other.

Ahk
Triple_X
any chance to add support for windowed mode?
Ahk
Windowed mode? Everything is set via incUI, so if incUI can get all the mouse positions ok for windowed mode then the macro should run just fine in it as well...

Also, DaMOB!!! -- I never thought of that before, very original idea and I'll definitely have to adopt it. I'll throw some code together -- the skills all have different formulas so I'll have to go from scratch for each. If it works good I'll remove a couple of constants from the macro biggrin.gif.

Oh, I just thought about it more, and I guess it would be hard to figure out if it was buffed or not....Perhaps Enchantment will help here? I remember it half-working though because of decal memlocs or something...probably isn't a good idea for me to try.
DaMOB
I will toy with this for a couple of tink skills and see what I get (also make it more universal if it works) and enchantment is evil, heh.

Edit #1: It worked in an actual skill check for item tink. On my main 401 on one who had it untrained but it shows 182 it came back with 0 which is perfect. Now to see what happens when I buff them.

Edit #2: Works perfectly but my guy did not have a focus stone but I can account for that if you add a variable of say FS or something. I will post the new code for you in a bit.

Edit: #3: Try this code and let me know how it fairs. Only Caveat is the user needs to spend at least 11 pts into the skill (best I can do on skills that are falsely set at a number but can't really be used....Turbine BUG or they just wanted to get it over quickly).

CODE
// This line is necessary to select the proper window
SetActiveWindow Asheron's Call

Constants
 temp = 0
 temp1 = 0
 temp2 = 0
 temp3 = 0
End

//Temp will return with 0 or your skill level.
Procedure getrealskill using Skillnum, Attrib1, Attrib2, Divisor
 GetSkill $Skillnum
 SetConst temp1 = {PluginResult}  //What our skill is at
 GetAttrib $Attrib1
 SetConst temp2 = {PluginResult}
 GetAttrib $Attrib2
 Compute temp2 = int((( $temp2 + {PluginResult} ) / $Divisor ) + .5)
 Compute temp3 = $temp1 - $temp2
 If $temp3 <= 10 //if this happens we have spent nothing in the skill or its untrained (+5 or +10 trained/spec)
   SetConst temp = 0
   Exit
 Else
   GetSkillEX $Skillnum
   SetConst temp = {PluginResult}
 End
End

//Item tinkering
Call getrealskill 18, 5, 4, 2
Sendtext 13, $temp
//Weapon tinkering
Call getrealskill 28, 5, 1, 2
Sendtext 13, $temp
//Armor tinkering
Call getrealskill 29, 5, 2, 2
Sendtext 13, $temp
//Magic Item tinkering
Call getrealskill 30, 5, 0, 1
Sendtext 13, $temp
//War Magic
Call getrealskill 34, 5, 4, 4
Sendtext 13, $temp
Ahk
Actually, buffed stats won't matter since we have cam's home grown skill checkers. I'm not sure if GetAttrib works like GetSkill did, but it got the unbuffed stats. So buffs/minors etc should'nt be an issue if that's true smile.gif

I'm pumped hehe.
DaMOB
Yep, all I did was look at the base stats to see if it was trained (works on magic too) and that way anything you do to them will not effect the outcome. Brill, FS, Favor Ring, Majors/Minors will not matter in the equation as long as they pumped at least 11 (0,5,10) in the skill your set.

Matter of fact I am going to switch over to this one on my bot because I shrank it and got rid of useless code I had written earlier out of desperation.
Ahk
Hehe, thanks a ton for the idea -- I'll add that stuff in tomorrow along with a lot of other gunk on the list biggrin.gif
Ahk
I've been thinking on this (and putting in the new stuff into the tinkerbot)...if GetSkill returns a higher number then this won't work..I'm going to do some fiddling with this as well going off of what you already have later tonight to see what happens with it.
Ahk
Tested on my 5 characters, seems to work good....LoL on one of my mules he actually had Item Tinkering (gharu), but hadn't put any exp into it since it was given to him post-patch lol.
Ahk
Dynamic calculation of the buffed skill is too difficult to implement. I found that AC rounds down the attributes when I was dealing with this.
Since buffs occur after the Init procedure, and spam occurs right before buffing. This would require far too many changes for me to implement. Looking at it, changing it would make the user have to say what focus/end/str/coord get buffed to (or the bonus)...It's just much more work, after all its not that difficult to modify the buffed skill value before starting the bot (I haven't been able to put a point into any tinkering skill for days).
I was able to remove the SetConst WeaponTinkerer, armortinkerer etc with DaMOB's idea though.
DaMOB
Ahk, explain what it is they want because I think it can be done if I am understanding right (half asleep right now).
Ahk
Automatic detection of buffed skills -- Problem is that the spam message comes before buffing, and the Init procedure does as well. Minors majors only make it harder to do (this part is fine), but with buffs coming into play here there's no easy way for me to modify the macro for this.
I sat here thinking about an easy way (including some sort of bonus number, which I threw out because attribs can throw it off a point....). It was just too much thinking than I cared to do when all you gotta do is set the buffed stats.
DaMOB
Yep, can't be done without setting other constants in that case and glad the routine worked for you (hey it got rid of a lot of constants for folks so they should be happy).
Ahk
Hehe yeah.

Version 1.1 posted!!
Check the section labeled ****New in 1.1!***** for update info biggrin.gif

Ahk
DaMOB
I noticed you used floor on the calcs but I think for magic it rounds up :/ if I am not mistaken (plus I hate floor/ceil but thats a personal bias). I also noticed you are not grabbing the actual skill via EX which is what I use because you could be buffed and EX will tell me (since its 0 or buffed skill) but I use mine for magic skills (never know when someone can squeeze off a lvl 1 because they are wielding a life wand).
Ahk
Attribs round down, that's one of the things I found out when trying to get the buffed stats.

This was just a test for the skills in my case, GetSkillEx was only used in the return value on your code sample, so changing it only meant that I'd get a base value (which I did want at first until I reallized it was too hard to implement).

Anywho, it all works good and it's time for zzz's
Ahk
Ahk
If anyone is having the Spam Message problems (ie. I offer tinkering skills) go just below the Call Init, and right above the while loop and do:
SetConst SpamMsg1 = Spam message here.
Triple_X
Anyone having the problem with the salvage "Wool" not recognized as an Armor Tink?










XXX
Ahk
Oh, that would be a bug...for now a quick-fix on this would be to open up the Salvage.cds file with CDSEdit and change ItemTink to ArmorTink on that one.

I'll release a bug fix in a minute...sorry for that -- apparently it was added twice to the salvage list I had created (there's plenty of room for mistakes in a list that size).
Ahk
^^^
Version 1.2 is posted, thanks Triple X for reporting the problem.

cool.gif
Triple_X
hehe..thanks...I just wasn't sure if I was crazy or not.....made me start second guessing myself blink.gif












XXX
Triple_X
Just a head's up...Linen is doing the same as Wool was wink.gif











XXX
Ahk
Linen (according to Maggies) is an item tink, not armor...so it should be working just fine.
Thanks for speaking up though, made me look biggrin.gif
Triple_X
Hmmm..guess I should have explained. Someone gave me a Platemail Hauberk, and then added a bag of pine (item tinkering skill)....it detected both with no problems. He then added a bag of Linen (also item tinkering skill) and it said it could not do different tinkering skills on an item (or something to that effect)???

Am I making sense now? Pine and Linen are not considered the same type of tinkering skill (which should be Item Tinkering, correct?)
biggrin.gif






XXX
DaMOB
Linen and Pine (Green bags) both require Item Tinkering because thats all my guy knows and has tinked with both.
Hagar_Swordman
I having a problem with the Bot retrieving the item. Keeps telling me "Failed to retrieve item form inventory".


Please Help
Ahk
Hagar what version are you running? I fixed a problem where it wasn't scrolling up in one fix, and also did a major change to the way items were checked in 2.2.

It's pretty cut and dry on returning items -- it will pull up inventory window and scroll up (just in case) before each item. I'll need more info on that. Make sure you have an up to date (4.4.7) version of AC Tool as well. Tell me where the mouse goes if you've got 4.4.7 and 2.2 when it tries to retrieve.



It was pine with the problem not linen biggrin.gif, I found it and'll post the fix shortly.

Ahk
Checking the whole list, found that moonstone was also incorrect.
Ahk
1.3 is posted, I went through the whole salvage list and fixed all the mismatches (were about 2 or 3!).

Thanks for reporting them Triple!
Triple_X
thank ya' Sir! Have been waiting for a program like this for a LONG time.......I would prolly give my left arm for a Decal version of this, so I can run minimized in the background while in windowed mode biggrin.gif











XXX
DaMOB
I'd give my left nut to science to understand how the hack we call Decal even works let alone understanding how to program in it in anything but that crappy ass VB. So, love what Ahk has given you, heh.
Ahk
Lol. I only run it when I have to sleep/work/eat/etc, so it works just fine tongue.gif. If there were a way to dynamically add stuff to the trade window without using the mouse then an AC Tool macro could go just as far smile.gif. Should something like that, or a way to change combat mode without using any keys or the mouse, sneak its way into actool I'd add it smile.gif

Haven't ran into any bugs as of yet in the code itself (I've had AC crash once or twice but that's not the macro's fault).
Any other probs be sure to throw em' at me.
Ahk


Also, I can min AC without windowed mode..what's the catch of running in windowed (other than changing resolution)?
Hagar_Swordman
Fail to return Item :

I'm using 4.4.7 and had 1.2 in. The mouse 1st went to the scroll bar main pack , then it finished the main pack moved to the left side of the pack and stayed actived while it searched other pack then said Failed to retrieve Item.

I put 1.3 in and i'm still having the same problem. (I did have 1.0 and didn't have any problems with it. The scrolling problem is since 1.2 / never had 1.1 in system)
Ahk
It doesn't search any pack. What it does do is scroll up like you said, brings the item to the front of you pack, and then goes to the first row, first column and clicks to see if thats it or not. It'll do that 5 times then say it wasn't found. Do you actually have the item its after, or is it doing this with everything?
Hagar_Swordman
The Item is still in the pack and it did it 4 time in a row (testing )
Ahk
Ok, try this:

Open the file called 'tinkBeefCake.mac', go to Search->Find..and search for 'Procedure RetrieveItem'
Select all of that procedure, and paste this over it;
CODE

Procedure RetrieveItem
 SayPaste @t ReturnItem[Character], Please wait while I retrieve your items (don't close the window).
 Call InvenDance
 SetConst Success = 0
 Select self | 600
 //Scroll up inventory
 MousePos $InvScrollUp | 100
 Loop 15
   LeftClick
   Delay 25
 End
 DSFirst ReturnItem
 Sendtext 3, SelectedGuid (should be self) is _selectedguid and Selected is _selected
 While 1 = 1
   While _selectedguid <> ReturnItem[ItemGuid]
      Sendtext 3, Stacking ReturnItem[ItemGuid] on self
     StackItem ReturnItem[ItemGuid], self
     WaitForCursor
     MousePos $R1C1 | 100
     LeftClick | 1000
Sendtext 3, Selected guid is _selectedguid; Selected is _selected -- Return Item: ReturnItem[ItemGuid]  ReturnItem[Item]
     If _selectedguid = ReturnItem[ItemGuid]
       SetConst Success = 1
       Break
     Else
       If {loopno} > 5
         SayPaste @t ReturnItem[Character], Failed to retrieve item from inventory, please consult the owner of the bot - email: $OwnerEmail
         Break
       End
     End
   End
   If $Success = 1
     If _tradeend = 1
       Exit
     End
     DragTo $TradeMySlot1
     WaitForCursor
     Delay 150
   End
   DSNext ReturnItem
   If EOF ReturnItem
     Break
   End
 End
End


Open up the tinkerbot and run like normal and see what text it spits out, post the results.
Hagar_Swordman
Hello AHk

Selected guid is _selectedguid; Selected is Jafar ibn Tinker -- Return Item: -689781761 Ruby Acid Shamshir
You tell Hagar the Bowman, "Failed to retrieve item from inventory, please consult the owner of the bot - email: PM Hagar the Swordman Clan Broad"


I'm at a loss sad.gif
Ahk
That is definitely wierd that _selected came back to be someone's character. Was it selecting the sword? I accidently put the semicolon there and it messed it up.

The only guess I have right now is that it has the wrong guid for the item..Select the shamshir in game and type /actguid and see if it matches with the returnitem's -689781761
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.