Page 2 of 3

Re: Craft Festival Waypoints

Posted: Fri Jul 19, 2013 5:35 am
by rock5
Ah I missed the word 'set' altogether. :oops:

Yeah, so... there are no separate functions for set skills just the code in the settings.updateSkillsAvailability function. So Lisas function is the way to go.

Re: Craft Festival Waypoints

Posted: Fri Jul 19, 2013 5:46 am
by lisa
kenzu38 wrote:Btw guyz, to those of you who have Crafting item-set skills, just post here the Buff ids
This is in my database ;)

Code: Select all

{Name = "Improve Crafting Speed",ID = 507016},
{Name = "Improve Crafting XP",ID = 507017},

Re: Craft Festival Waypoints

Posted: Fri Jul 19, 2013 9:08 pm
by lisa
I finally got around to testing it, BS at lvl 60 ish. I really like the text on the window, very nicely done, not sure the print is needed each time since the info is at the top of window anyway but it is still pretty nice work.

At 64.** it worked out exactly how many items it needed to buy to lvl and only bought that many, very nice.

Re: Craft Festival Waypoints

Posted: Sun Jul 21, 2013 4:19 am
by kenzu38
lisa wrote:I finally got around to testing it, BS at lvl 60 ish. I really like the text on the window, very nicely done.

At 64.** it worked out exactly how many items it needed to buy to lvl and only bought that many, very nice.
Thanks, glad you liked it. And glad it's working as intended.
lisa wrote:not sure the print is needed each time since the info is at the top of window anyway but it is still pretty nice work.
Yeah, I've just grown accustomed to reading prints on the MM window that it just doesn't feel right when I don't see any. So I just had to print something there. Hehe.
lisa wrote:

Code: Select all

function getCD(ID)
	local offset = memoryReadRepeat("int", getProc(), GetItemAddress(ID) + addresses.skillRemainingCooldown_offset) or 0
	if offset and offset ~= 0 then
		return (memoryReadRepeat("int", getProc(), addresses.staticCooldownsBase + (offset+1)*4) or 0)/10
	end
	return 0
end
Then just use

getCD(495777)
getCD(495776)

Which of course works, even for set skills

Code: Select all

Command> print(getCD(490300))
114
Command> print(getCD(495478))
56.4
And thanks for the code. Although, I wrote it like this:

Code: Select all

function getCD(ID)
	local offset = memoryReadRepeat("int", getProc(), GetItemAddress(ID) + addresses.skillRemainingCooldown_offset)
		return (memoryReadRepeat("int", getProc(), addresses.staticCooldownsBase + (offset+1)*4))/10
end
...thinking it would return nil if the char didn't have the skill. I tested it with skills my test char doesn't have and it always returned 0. Do you have an idea how to know if the character has these item-set skills?

Anyway, thanks again for the code. I'll start working on the beta version now.

Re: Craft Festival Waypoints

Posted: Sun Jul 21, 2013 4:43 am
by lisa
RoM Dev's seemed to think it was a good idea to allocate memory to skills even if you don't have them, so any valid ID will have a baseaddress.

To get currently available set skill ID's

Code: Select all

	for num = 1, 5 do -- 5 possible enabled item set skills
		local id = memoryReadInt(getProc(), addresses.itemSetSkillsBase + (num - 1)*4)
	end
id would be 0 if no skill in that spot.

Up to you how you use the id info ;)

Re: Craft Festival Waypoints

Posted: Sun Jul 21, 2013 2:49 pm
by kenzu38
Nice, thanks for the code. Now I can make the script auto-use these skills when it detects them.

I'll be releasing a beta version soon after some testing.

EDIT: Just released version 2.2 beta version

V 2.2b Chaneglog

Code: Select all

1.) All files now integrated to a single file.

2.) User is asked to input which skill to level upon starting the script. This is turned on by default, you can turn this off and set which skill you like to level in the user options.

3.) You can now set in the user options what level you'd like the bot to stop at and set what you want the bot to do after reaching that level. 

4.) Script now checks first if you are near the Event NPCs and will give an error if you're not. It will also go to where the tools are at automatically if it detects you are pretty far from it.

5.) Added support for item-set skills (still in Beta as I do not have these skills and could not fully test it, so testers are needed). Once again, credits go to lisa for the functions needed to add support for these skills. 

6.) Added support for production speed potion - 1 day. The bot will auto-use it at the start of the script if user option is set to do that. If anyone has the 7 and 30 day potions, just post the Buff ids here so I can add support for them.

7.) Added a user option yrestadjustment for you to tweak the timing of the prints and the getting of info. Generally, this helps the bot to calculate some needed values better.
Just post any errors you encounter.

Re: Craft Festival Waypoints

Posted: Sat Jul 27, 2013 3:03 pm
by gloover
Hey kenzu,

10q very much for your script - works well, but with some little bugs.

Tested on german client.

1. The autoupgrade of quallification (reaching lvl 20, 40, 60) doesn't work.
2. I have both set skills (speed and exp) but only one of them (speed is put on the first slot at the up) will be used.

can u check this again?

thx

Re: Craft Festival Waypoints

Posted: Sat Jul 27, 2013 5:38 pm
by lisa
gloover wrote:1. The autoupgrade of quallification (reaching lvl 20, 40, 60) doesn't work.
In their wisdom the RoM Dev's used a "** **** **** "..skill.."** ***** *** ****" type thing for the text in the options, which means I couldn't find a value to use to find the text in any language.

So basically you will need to edit in your language for the craft to upgrade.

Have a look for something like this, it has probably changed in V 2.2, haven't downloaded it yet

Code: Select all

function raiseMaxSkillLevel()
	print("Raising Max Level of Blacksmithing Skill.")
	repeat
		yrest(500)
	until player:target_NPC(112944)
	yrest(1000)
	ChoiceOptionByName(getTEXT("SKILLCRAFT_SKILLPROVE"))
	yrest(1000)
	ChoiceOptionByName("Blacksmithing")
	yrest(1000)
end
Notice it uses getTEXT for 1 line but not the last.

Re: Craft Festival Waypoints

Posted: Sun Jul 28, 2013 12:25 am
by kenzu38
gloover wrote:Hey kenzu,

10q very much for your script - works well, but with some little bugs.

Tested on german client.

1. The autoupgrade of quallification (reaching lvl 20, 40, 60) doesn't work.
2. I have both set skills (speed and exp) but only one of them (speed is put on the first slot at the up) will be used.

can u check this again?

thx
Hey there,

This script won't be able to work properly for Non-EN languages. I forgot to mention that in the first post.

Although, we can troubleshoot your problem to make it work for your language. Just like lisa said in her post though, you will have to edit some parts yourself to make it work.

Since you mentioned item set skills, then you must be using v2.2b. For v2.2b, you will have to add some more info into the crafttable. I have attached a file in this post, you should download it and edit these parts:

Code: Select all

[1] = {name = "Alchemy", text = "",
[2] = {name = "Armorcrafting", text = "",
There are five (one for each skill) of these in the crafttable (which you will find just below the user options part of the script). Notice the text is a blank string. You will have to put the option names there in your language.

So, example for Alchemy:

Code: Select all

[1] = {name = "Alchemy", text = "Alchemie",
The above is just an example so it might not be the correct text. You'll have to provide the right one yourself.

Then, you'll have to change a line in the raiseSkillLevel function from ChoiceOptionByName(crafttable[skillnum].name) to ChoiceOptionByName(crafttable[skillnum].text). It's already been changed in the file I attached in this post though. Just mentioned this one as a personal reminder.


Secondly, about the item set skills, in the file I attached, I added prints there so when you start the script, it prints if it found the item set skills. So if you see these lines in your MM window when you start the script:

Code: Select all

Skill ID 495776 Found. usespeedskill Is Set To True.
Skill ID 495777 Found. usexpskill Is Set To True.
Then it means it found the skills. Then maybe, the next thing to look at is the skills' text, do they have umlauts? If so, maybe you can edit the useCraftingSkills function yourself:

Code: Select all

function useCraftingSkills()
	local speedskill = GetIdName(495776)	-- Crafting Speed skill
	local expskill = GetIdName(495777)	-- Crafting Exp skill
	if usespeedskill then
		rest(1000)
		local speedremaining = getCooldown(495776)
		if speedremaining == 0 then
			repeat
				sendMacro("CastSpellByName(\""..speedskill.."\")")
				rest(500)
				player:updateBuffs()
				rest(500)
			until player:hasBuff(507016)
		end
	end
	if usexpskill then
		rest(1000)
		local expremaining = getCooldown(495777)
		if expremaining == 0 then
			repeat
				sendMacro("CastSpellByName(\""..expskill.."\")")
				rest(500)
				player:updateBuffs()
				rest(500)
			until player:hasBuff(507017)
		end		
	end
end
Either replace GetIdName(skillid) with the german skill name or just change sendMacro("CastSpellByName("German skill name here")") directly. Try these things out.

Re: Craft Festival Waypoints

Posted: Sun Jul 28, 2013 1:05 am
by rock5
lisa wrote: In their wisdom the RoM Dev's used a "** **** **** "..skill.."** ***** *** ****" type thing for the text in the options
I don't understand this. Why can't you find the text in the option? What exactly is the string? The way I understand it, you should always be able to find the getText string and use it.

Re: Craft Festival Waypoints

Posted: Sun Jul 28, 2013 1:32 am
by lisa
rock5 wrote:I don't understand this. Why can't you find the text in the option? What exactly is the string? The way I understand it, you should always be able to find the getText string and use it.
The example was just an easy way to get the point across, more accurately it will be something like this.

Code: Select all

skill = "Blacksmithing"


printf("This is the text you can see for skill: %s", skill)
What you get as a getTEXT will be "This is the text you can see for skill: " without the actual name of the crafting skill and so if I used the getTEXT it would be exactly the same for every type of craft, so it would level up anything it could, basically.

Re: Craft Festival Waypoints

Posted: Sun Jul 28, 2013 3:57 am
by rock5
So you are saying it uses variables? Ah I think I found it "SKILLCRAFT_SKILLPROVE_00". It does use variables. Maybe you could use TEXT strings for the variable values instead, eg. for "Blacksmithing" use "AC_ITEMTYPENAME_4_0" or "SYS_SKILLNAME_BLACKSMITH" or "Sys540015_name". They're the 3 I found.

Re: Craft Festival Waypoints

Posted: Sun Jul 28, 2013 10:38 am
by dr-nuker
Great script!
It made my character go 75 on alchemy!

Just too stupid that there is no cooking for my main.
And i can not raise a second above 40 -.- just bad that i have 2 gatherings above that.

Re: Craft Festival Waypoints

Posted: Sat Aug 10, 2013 6:59 pm
by kenzu38
gloover wrote:Hey kenzu,

2. I have both set skills (speed and exp) but only one of them (speed is put on the first slot at the up) will be used.

can u check this again?

thx
Hey gloover, this might be a little too late but I just found out why it wouldn't use your second item set skill.

It's by coincidence that I found the problem when I was tweaking one of my scripts which involved item set skills.

It wasn't detecting the other item set skills my char had except for the first one so I checked on the userfunction I wrote and sure enough, there was an error in the charHasItemSetSkill function code:

Code: Select all

function charHasItemSetSkill(skillid)	
	for num = 1, 5 do
      local id = memoryReadInt(getProc(), addresses.itemSetSkillsBase + (num - 1)*4)
		if id == skillid then
			return true
		end
      return false
   end
end
It should be like this:

Code: Select all

function charHasItemSetSkill(skillid)	
	for num = 1, 5 do
      local id = memoryReadInt(getProc(), addresses.itemSetSkillsBase + (num - 1)*4)
		if id == skillid then
			return true
		end
   end
   return false	
end
I misplaced "return false" line, as you can see.

Anyway, I have posted the fixed version 2.3b on the first post. So just download that version if you still need the script.

Re: Craft Festival Waypoints

Posted: Mon Jul 28, 2014 8:53 am
by noobbotter
I never bothered with crafting festival until this current one that is running, when I realized how easy it is to level up some skills. That's when I decided to see if there was a script for it, and here it is. I'm going to have to give this a try.

One question I have before I try this is with the usecraftpotion option. If I set it to true to use craft potion, will it detect whether I already ahve the buff running so it doesn't consume more than 1 per day?

Last question... Where do you get crafting item set skills? I never even knew they existed. Thanks.

Re: Craft Festival Waypoints

Posted: Mon Jul 28, 2014 11:23 pm
by lisa
noobbotter wrote:Last question... Where do you get crafting item set skills? I never even knew they existed. Thanks.
They are crafted, most of the time there are some on AH or you may need to post in world chat you want some made up. Will vary depending on server of course.

Re: Craft Festival Waypoints

Posted: Tue Jul 29, 2014 5:32 am
by noobbotter
Is this script still working with the current craft festival? I attempted to use it for Tailoring (current level above 60 but below 65) and it bought a recipe or 2 (that i already had) and then sat there opening and closing the buy materials window without buying materials to craft with. I did set the max level to 75 on it to ensure it would try going above 60 and still didn't work.

Re: Craft Festival Waypoints

Posted: Wed Jul 30, 2014 9:10 am
by noobbotter
Nevermind my previous post. I tried it again last night and it worked. Not sure why it didn't work before.

One thing I did notice, however, is that for Tailoring it was fine but for Carpentry, it kept going to the wrong NPC to purchase the items. I added an if statement saying if the skill is carpentry, then use the other NPC and it seemed to work for me. I don't have the code here with me so I don't know specifically what I put in there, but it works.

Re: Craft Festival Waypoints

Posted: Mon Sep 08, 2014 1:01 am
by beanybabe
rom updated the npcs this year and moved mats around i read. This does not seem to work for blacksmith or woodworking the char will keep running to the alchemy trainer. Anyone able to spot what needs changed?

Re: Craft Festival Waypoints

Posted: Sat Oct 04, 2014 4:56 am
by buchaneer
rom updated the npcs this year and moved mats around i read. This does not seem to work for blacksmith or woodworking the char will keep running to the alchemy trainer. Anyone able to spot what needs changed?
I have the same problem. Up to now, I have been running this manually because of this problem. The bot always tries to get materials from npc "Fiona" even though Fiona does not provide the appropriate materials. :(