Quest reward/ Stats scoring

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Quest reward/ Stats scoring

#1 Post by BlubBlab » Sun Jun 28, 2015 2:22 pm

I wanted to share some thoughts.

When I testes my code on the server and run rombot with the quests I had a lot of crap in my bag, so I thought about a function to clean up my bag.
Most of the crap were gear which I don't use. We had that topic before so I went for 5 minutes for want can be done.

If it quest reward you and it is HP and MP potion you can first decide if we have MP if not you take the HP potions and when you have MP than what you have more in total and take the opposite.

For gear you must first see if one can be worn if not random or get with the 1.

Than thinks get more complicate we must score the items on dmg if it is a weapon(which is easy) and score the stats.

I don't know if it is there a function which can parse the stats multi language but this why I would think it must be done e.g.

Code: Select all

if class = Mage then
	if stat == magic attack then
		score = score + 5 * value
	elseif stat == intelligence then
		score = score + 4.5 * value
		score = score + addResultingMatScore(value)
	elseif stat == stamina then
		score = score + 3.7 * value
		score = score + addResultingLPScore(value)
		score = score + addResultingPDefScore(value)
	elseif stat == LP then
		score = score + 3.5 * value
	elseif stat == all_attributes then
		score =  11* value;
		score = score + addResultingMatScore(value)
		score = score + addResultingLPScore(value)
		score = score + addResultingManaScore(value)
		score = score + addResultingMDefScore(value)
		score = score + addResultingPDefScore(value)
	elseif stat == wisdom then
		score =  1.5* value;
		score = score + addResultingManaScore(value)
		score = score + addResultingMDefScore(value)
	elseif stat == mana then
		score =  2* value;
	else
		-- score of 1 for everything else
		score =  value;
	end
	
end
The results functions also depends on the class in german I found this tablle which explain what which brings:
http://www.rom-welten.de/articles,id436 ... n_sie.html

With this I would also choose which item to wear and which to drop in the lesser levels.
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Quest reward/ Stats scoring

#2 Post by BlubBlab » Mon Jun 29, 2015 4:24 pm

Okay I'm not finished but could some one answer a few questions ?
I'm not sure about the warden which weapon he wields on the start, same goes for champion.
I gave warden a sword and the champion a hammer. I'm not sure when those classes can wield both hands at the moment they run for what they can get.

And I need a idea how can I make this ? I'm not sure how to iterate a 4(5)D array .. I think I better show it

Code: Select all

[
			result[objtype][objsubtype][objsubsubtype or -1][objsubsubuniquetype or -1].Score = score;
				result[objtype][objsubtype][objsubsubtype or -1][objsubsubuniquetype or -1].Item = item;
				result[objtype][objsubtype][objsubsubtype or -1][objsubsubuniquetype or -1].BagSlot = i;
			end
		end
	end
	-- we equip
	for key,value in pairs(result) do
	
		local item;
		
		
		if  not BagSlot <= 21 then
			item:use();
		end
	end
I also would love some comments about the scoring values about the stats.(because of this I added the unfinished file)
Attachments
userfunction_rater.lua
deep alpha not working
(13.82 KiB) Downloaded 66 times
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Quest reward/ Stats scoring

#3 Post by BlubBlab » Mon Jun 29, 2015 5:25 pm

Okay I got it :D or at least I'm think it.

Code: Select all

local function equipBest()
	
	local result = scoreAll();
	-- we equip
	for keys,item in pairs(result) do
		if(keys[5] = "Item")then
			if not result[keys[1]][keys[2]][keys[3][keys[4]["BagSlot"] <= 21 then
				item:use();
			end
		end
	end
	
end
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Quest reward/ Stats scoring

#4 Post by BlubBlab » Mon Jun 29, 2015 8:13 pm

Okay it works but I don't get why the fine weapons lose to the crapy ones :?:

EDIT: one problem found I cant decide between main or left hand for the dagger there is no information about it.
EDIT2 : I found a crude workaround by swapping daggers I must wait until I have enough slots again ...., still no clue about the staff only it seem it is possible that it is not my function which is deleting the staff.
EDIT3.2: I was on the way to post the next version in the other subforum until I notices it still has bugs in regard the of weapons. I suspect a bug it seems I need a logger and than Rocks help to find it. boing I found it :oops:

EDIT4: With this project I really ended up in the jungle, okay weapons seems to work now but there are still countless bugs...
Attachments
userfunction_score.lua
(35.67 KiB) Downloaded 70 times
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Quest reward/ Stats scoring

#5 Post by BlubBlab » Tue Jun 30, 2015 3:43 pm

EDIT: Forgot what I said I found the Equipment class :oops:
Attachments
userfunction_score.lua
(40.33 KiB) Downloaded 60 times
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests