Page 2 of 2

Re: Juice Festival - Server For A Day

Posted: Tue Oct 06, 2015 10:41 am
by noobbotter
Ok, going with Rock's suggestion on being able to rule out a whole section, I then looked at some option for how to proceed after that. i came up with this:
Kobold Search Order
Kobold Search Order
The tests I created using excel and placing random kobolds seemed to find all three within 15 checks, but there may be circumstances where it could require more. but this seems like a good order, keeping in mind that after the first step, one of the 4 checks of each following section would not be needed because it was already ruled out.

Here are some other samples I ran:
Sample 1
Sample 1
edit: It didn't seem to want to allow me to add another attachment. I had 2 more samples of random kobold placement and the steps to locate them. Maybe I'm surpassed my attachment limit? Not sure. Anyway, I'm going to continue on working on the programming to actually do all the work. This will take a while.

Re: Juice Festival - Server For A Day

Posted: Tue Oct 06, 2015 12:42 pm
by noobbotter
Well, so far so good. I've got the basic code done , LUA specific, not ROM). Now I just need to take this and insert all the specific functions and actions for the bot to take advantage of it. I'll probably also add a function so that after round 5 if there are still barrels to check it will check them in order of highest score first.

In this test file, I set 3, 14, & 21 as the barrels with the kobolds inside. I'm also going to test some others as well. Here's a copy of what I've got so far. *** This is a .Lua file, not an xml waypoint file.

Code: Select all

--=== Setting up variables: ===--
local koboldsFound = 0
local numMoves = 0

local barrelTbl = {
	[1]={ X=3010.98291 , Z=35.38862991, Score=5, Links={[1]={Num=2},[2]={Num=6},[3]={Num=7},}},
	[2]={ X=3036.711914 , Z=49.38666916, Score=5, Links={[1]={Num=1},[2]={Num=3},[3]={Num=6},[4]={Num=8},[5]={Num=7},}},
	[3]={ X=3061.070068 , Z=67.11927032, Score=5, Links={[1]={Num=2},[2]={Num=4},[3]={Num=7},[4]={Num=9},[5]={Num=8},}},
	[4]={ X=3086.976074 , Z=80.69120026, Score=5, Links={[1]={Num=3},[2]={Num=5},[3]={Num=8},[4]={Num=10},[5]={Num=9},}},
	[5]={ X=3113.544922 , Z=99.62309265, Score=5, Links={[1]={Num=4},[2]={Num=10},[3]={Num=9},}},
	[6]={ X=3027.961914 , Z=8.74179554, Score=5, Links={[1]={Num=11},[2]={Num=1},[3]={Num=2},[4]={Num=12},[5]={Num=7},}},
	[7]={ X=3053.081055 , Z=25.25625992, Score=5, Links={[1]={Num=1},[2]={Num=13},[3]={Num=3},[4]={Num=11},[5]={Num=6},[6]={Num=8},[7]={Num=2},[8]={Num=12},}},
	[8]={ X=3077.891113 , Z=41.24858856, Score=5, Links={[1]={Num=12},[2]={Num=4},[3]={Num=2},[4]={Num=14},[5]={Num=7},[6]={Num=9},[7]={Num=13},[8]={Num=3},}},
	[9]={ X=3103.554932 , Z=56.39542007, Score=5, Links={[1]={Num=5},[2]={Num=13},[3]={Num=15},[4]={Num=3},[5]={Num=8},[6]={Num=10},[7]={Num=4},[8]={Num=14},}},
	[10]={ X=3129.545898 , Z=73.40276337, Score=5, Links={[1]={Num=5},[2]={Num=15},[3]={Num=14},[4]={Num=4},[5]={Num=9},}},
	[11]={ X=3042.2229 , Z=-15.36034966, Score=5, Links={[1]={Num=16},[2]={Num=6},[3]={Num=7},[4]={Num=17},[5]={Num=12},}},
	[12]={ X=3068.716064 , Z=-0.087428153, Score=5, Links={[1]={Num=16},[2]={Num=8},[3]={Num=18},[4]={Num=6},[5]={Num=13},[6]={Num=11},[7]={Num=7},[8]={Num=17},}},
	[13]={ X=3094.581055 , Z=15.31999016, Score=5, Links={[1]={Num=7},[2]={Num=19},[3]={Num=9},[4]={Num=17},[5]={Num=14},[6]={Num=12},[7]={Num=18},[8]={Num=8},}},
	[14]={ X=3119.471924 , Z=31.05658913, Score=5, Links={[1]={Num=10},[2]={Num=18},[3]={Num=8},[4]={Num=20},[5]={Num=15},[6]={Num=13},[7]={Num=9},[8]={Num=19},}},
	[15]={ X=3145.129883 , Z=47.69260025, Score=5, Links={[1]={Num=10},[2]={Num=20},[3]={Num=19},[5]={Num=9},[6]={Num=14},}},
	[16]={ X=3059.019043 , Z=-40.57423019, Score=5, Links={[1]={Num=21},[2]={Num=11},[3]={Num=12},[4]={Num=22},[5]={Num=17},}},
	[17]={ X=3084.559082 , Z=-26.07653046, Score=5, Links={[1]={Num=13},[2]={Num=21},[3]={Num=11},[4]={Num=23},[5]={Num=16},[6]={Num=18},[7]={Num=12},[8]={Num=22},}},
	[18]={ X=3108.978027 , Z=-11.35186005, Score=5, Links={[1]={Num=14},[2]={Num=22},[3]={Num=24},[5]={Num=12},[6]={Num=17},[7]={Num=19},[8]={Num=23},[9]={Num=13},}},
	[19]={ X=3134.354004 , Z=4.835566044, Score=5, Links={[1]={Num=13},[2]={Num=25},[3]={Num=23},[4]={Num=15},[5]={Num=18},[6]={Num=20},[7]={Num=14},[8]={Num=24},}},
	[20]={ X=3160.509033 , Z=20.60238075, Score=5, Links={[1]={Num=15},[2]={Num=25},[3]={Num=24},[4]={Num=14},[5]={Num=19},}},
	[21]={ X=3073.481934 , Z=-66.05554962, Score=5, Links={[1]={Num=22},[2]={Num=16},[3]={Num=17},}},
	[22]={ X=3098.574951 , Z=-51.81417084, Score=5, Links={[1]={Num=23},[2]={Num=21},[3]={Num=18},[4]={Num=16},[5]={Num=17},}},
	[23]={ X=3125.886963 , Z=-36.31401062, Score=5, Links={[1]={Num=24},[2]={Num=22},[3]={Num=19},[4]={Num=17},[5]={Num=18},}},
	[24]={ X=3150.272949 , Z=-18.85281944, Score=5, Links={[1]={Num=25},[2]={Num=23},[3]={Num=20},[4]={Num=18},[5]={Num=19},}},
	[25]={ X=3175.987061 , Z=-3.51265502, Score=5, Links={[1]={Num=20},[2]={Num=24},[3]={Num=19},}},
}

local checkRound = {
	[1]={4, 6, 13, 20, 22},
	[2]={1, 5, 21, 25},
	[3]={3, 11, 15, 23},
	[4]={7, 9, 17, 19},
	[5]={8, 12, 14, 18},
}

--=== testing data follows:
	local koboldLocation = {3, 14, 21}
	local koboldNearby = {2,4,7,8,9,10,13,15,16,17,18,19,20,22}
	local noneFound = {1,5,6,11,12,23,24,25}
	
	

--=== functions ===--
local function getStatus(barrelnum)
	for i,loc in pairs(koboldLocation) do
		if koboldsFound == 3 then
			break
		end
		if loc == barrelnum then
			
			cprintf(cli.green,"\tKobold found in barrel "..barrelnum..". clicking barrel and marking it done.\n")
			-- useExtraActionItem(2)
			barrelTbl[barrelnum].Score = 0
			koboldsFound = koboldsFound + 1
			break
		end
	end
	for i,loc in pairs(koboldNearby) do
		if loc == barrelnum then
			cprintf(cli.yellow,"\t\tKobolds are near barrel "..barrelnum..". Setting it's score to ZERO\n")
			barrelTbl[barrelnum].Score = 0
			cprintf(cli.yellow,"\t\t\tAnd updating score for surrounding barrels.\n")
				for u,udbrl in ipairs(barrelTbl[barrelnum].Links) do
					if barrelTbl[udbrl.Num].Score >0 then
						print("\t\tAdding +1 to score for barrel "..udbrl.Num)
						barrelTbl[udbrl.Num].Score = barrelTbl[udbrl.Num].Score + 1
						print("\t\tCurrent barrel score is "..barrelTbl[udbrl.Num].Score)
					else
						print("\t\t"..udbrl.Num.." is already ZERO!!! Not updating it.")
					end
				end
			break
		end
	end
	for i,loc in pairs(noneFound) do
		if loc == barrelnum then
			cprintf(cli.red,"\tNo Kobolds are nearby "..barrelnum..". Setting this barrel Score to ZERO.\n")
			barrelTbl[barrelnum].Score = 0
			cprintf(cli.red,"\t\tand updating score for surrounding barrels to ZERO.\n")
				for u,udbrl in ipairs(barrelTbl[barrelnum].Links) do
					print("\t\tSetting score for barrel "..udbrl.Num.." to ZERO")
					if barrelTbl[udbrl.Num].Score > 0 then
						barrelTbl[udbrl.Num].Score = 0
						print("\t\tCurrent barrel score is "..barrelTbl[udbrl.Num].Score)
					else
						print("\t\t"..udbrl.Num.." is already ZERO!!! Not updating it.")
					end
				end
			break
		end
	end
end
	
	
	
function checkBarrels()
	for i,round in ipairs(checkRound) do
		--for each barrel during this round:
		print("Beginning Round "..i)
		for b, barrels in pairs(round) do
			print("Current Barrel to be checked: "..barrels)
			--if barrel not marked as empty then
			if barrelTbl[barrels].Score == 0 then
				cprintf(cli.red,"\tThis barrel has already been eliminated\n")
			elseif barrelTbl[barrels].Score > 0 then
				print("\tWe will now check this barrel")
				numMoves = numMoves + 1
				getStatus(barrels)
			end
			if koboldsFound == 3 then
				break
			end
		end
		if koboldsFound == 3 then
			break
		end
	end
	
	cprintf(cli.pink,"All kobolds found in "..numMoves.." moves!")
end


startMacro(checkBarrels,true);
Here's the current output of my code:

Code: Select all

MicroMacro v1.02 beta 4
SolarStrike Software
http://www.solarstrike.net
Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script> rom/test
Opening test.lua...
Starting script execution - Press CTRL+C to exit.
Press CTRL+L to cancel execution and load a new script.
-------------------------------------------------------------------------------
Press the (F6) key to stop/pause the script.
You can resume with the (F5) key.
Beginning Round 1
Current Barrel to be checked: 4
        We will now check this barrel
                Kobolds are near barrel 4. Setting it's score to ZERO
                        And updating score for surrounding barrels.
                Adding +1 to score for barrel 3
                Current barrel score is 6
                Adding +1 to score for barrel 5
                Current barrel score is 6
                Adding +1 to score for barrel 8
                Current barrel score is 6
                Adding +1 to score for barrel 10
                Current barrel score is 6
                Adding +1 to score for barrel 9
                Current barrel score is 6
Current Barrel to be checked: 6
        We will now check this barrel
        No Kobolds are nearby 6. Setting this barrel Score to ZERO.
                and updating score for surrounding barrels to ZERO.
                Setting score for barrel 11 to ZERO
                Current barrel score is 0
                Setting score for barrel 1 to ZERO
                Current barrel score is 0
                Setting score for barrel 2 to ZERO
                Current barrel score is 0
                Setting score for barrel 12 to ZERO
                Current barrel score is 0
                Setting score for barrel 7 to ZERO
                Current barrel score is 0
Current Barrel to be checked: 13
        We will now check this barrel
                Kobolds are near barrel 13. Setting it's score to ZERO
                        And updating score for surrounding barrels.
                7 is already ZERO!!! Not updating it.
                Adding +1 to score for barrel 19
                Current barrel score is 6
                Adding +1 to score for barrel 9
                Current barrel score is 7
                Adding +1 to score for barrel 17
                Current barrel score is 6
                Adding +1 to score for barrel 14
                Current barrel score is 6
                12 is already ZERO!!! Not updating it.
                Adding +1 to score for barrel 18
                Current barrel score is 6
                Adding +1 to score for barrel 8
                Current barrel score is 7
Current Barrel to be checked: 20
        We will now check this barrel
                Kobolds are near barrel 20. Setting it's score to ZERO
                        And updating score for surrounding barrels.
                Adding +1 to score for barrel 15
                Current barrel score is 6
                Adding +1 to score for barrel 25
                Current barrel score is 6
                Adding +1 to score for barrel 24
                Current barrel score is 6
                Adding +1 to score for barrel 14
                Current barrel score is 7
                Adding +1 to score for barrel 19
                Current barrel score is 7
Current Barrel to be checked: 22
        We will now check this barrel
                Kobolds are near barrel 22. Setting it's score to ZERO
                        And updating score for surrounding barrels.
                Adding +1 to score for barrel 23
                Current barrel score is 6
                Adding +1 to score for barrel 21
                Current barrel score is 6
                Adding +1 to score for barrel 18
                Current barrel score is 7
                Adding +1 to score for barrel 16
                Current barrel score is 6
                Adding +1 to score for barrel 17
                Current barrel score is 7
Beginning Round 2
Current Barrel to be checked: 1
        This barrel has already been eliminated
Current Barrel to be checked: 5
        We will now check this barrel
        No Kobolds are nearby 5. Setting this barrel Score to ZERO.
                and updating score for surrounding barrels to ZERO.
                Setting score for barrel 4 to ZERO
                4 is already ZERO!!! Not updating it.
                Setting score for barrel 10 to ZERO
                Current barrel score is 0
                Setting score for barrel 9 to ZERO
                Current barrel score is 0
Current Barrel to be checked: 21
        We will now check this barrel
        Kobold found in barrel 21. clicking barrel and marking it done.
Current Barrel to be checked: 25
        We will now check this barrel
        No Kobolds are nearby 25. Setting this barrel Score to ZERO.
                and updating score for surrounding barrels to ZERO.
                Setting score for barrel 20 to ZERO
                20 is already ZERO!!! Not updating it.
                Setting score for barrel 24 to ZERO
                Current barrel score is 0
                Setting score for barrel 19 to ZERO
                Current barrel score is 0
Beginning Round 3
Current Barrel to be checked: 3
        We will now check this barrel
        Kobold found in barrel 3. clicking barrel and marking it done.
Current Barrel to be checked: 11
        This barrel has already been eliminated
Current Barrel to be checked: 15
        We will now check this barrel
                Kobolds are near barrel 15. Setting it's score to ZERO
                        And updating score for surrounding barrels.
                10 is already ZERO!!! Not updating it.
                20 is already ZERO!!! Not updating it.
                19 is already ZERO!!! Not updating it.
Current Barrel to be checked: 23
        We will now check this barrel
        No Kobolds are nearby 23. Setting this barrel Score to ZERO.
                and updating score for surrounding barrels to ZERO.
                Setting score for barrel 24 to ZERO
                24 is already ZERO!!! Not updating it.
                Setting score for barrel 22 to ZERO
                22 is already ZERO!!! Not updating it.
                Setting score for barrel 19 to ZERO
                19 is already ZERO!!! Not updating it.
                Setting score for barrel 17 to ZERO
                Current barrel score is 0
                Setting score for barrel 18 to ZERO
                Current barrel score is 0
Beginning Round 4
Current Barrel to be checked: 7
        This barrel has already been eliminated
Current Barrel to be checked: 9
        This barrel has already been eliminated
Current Barrel to be checked: 17
        This barrel has already been eliminated
Current Barrel to be checked: 19
        This barrel has already been eliminated
Beginning Round 5
Current Barrel to be checked: 8
        We will now check this barrel
                Kobolds are near barrel 8. Setting it's score to ZERO
                        And updating score for surrounding barrels.
                12 is already ZERO!!! Not updating it.
                4 is already ZERO!!! Not updating it.
                2 is already ZERO!!! Not updating it.
                Adding +1 to score for barrel 14
                Current barrel score is 8
                7 is already ZERO!!! Not updating it.
                9 is already ZERO!!! Not updating it.
                13 is already ZERO!!! Not updating it.
                3 is already ZERO!!! Not updating it.
Current Barrel to be checked: 12
        This barrel has already been eliminated
Current Barrel to be checked: 14
        We will now check this barrel
        Kobold found in barrel 14. clicking barrel and marking it done.
All kobolds found in 13 moves!Stopping execution.


Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>
Edit:
I fixed a issue where i wasn't updating surrounding barrels properly. I fixed that and made my output a little better to read.

Re: Juice Festival - Server For A Day

Posted: Tue Oct 06, 2015 7:21 pm
by lisa
just checked and yeah as someone posted elsewhere the chat to monitor is SYSTEM_MESSAGE, mind you it only took me a few seconds to get it using rocks addon ;)
koboldmsg.png
koboldmsg.png (59.03 KiB) Viewed 7506 times
I did look at memory for flags but nothing jumped out at me, to be honest it probably has a table generated when you start game and using skill on a barrel calls a function and the table tells the game what message to pop up. Looking for such a table would take a while and at the end of the day it wouldn't be needed really, just do the event as a challenge ;)

Re: Juice Festival - Server For A Day

Posted: Wed Oct 07, 2015 9:09 am
by noobbotter
Ok folks, I seem to have it working. I ran 4 tests and all 4 passed with the following results:

Run 1: 18 barrels to win, Barrels with Kobolds: 21, 17, 10
Run 2: 13 barrels to win, Barrels with Kobolds: 4, 1, 8
Run 3: 16 Barrels to win, Barrels with Kobolds: 22, 1, 14
Run 4: 13 Barrels to win, Barrels with Kobolds: 22, 19, 18

Feel free to give it a try and give me some feedback.
BarrelofKobolds.xml
Barrel of Kobolds version 1.0
(8.91 KiB) Downloaded 297 times
Update: well while running 2 clients at once (not both doing this script, just one) I did run into it trying to use the action buttons before cool down was up so I'm going to adjust it a bit.

Re: Juice Festival - Server For A Day

Posted: Wed Oct 07, 2015 10:47 am
by rock5
I think it more likely that that information is stored on the server.

Re: Juice Festival - Server For A Day

Posted: Wed Oct 07, 2015 12:09 pm
by noobbotter
No worries. We got a script to help us complete it now without digging into memory.

Although, that one for the Juice Olympics might be a different story (the one with the image of the arrow pointing either up, down, left, or right). Unless we can see an orientation or angle of the image it shows on screen in order to decide which Extra Action Item to click. I do know the object (Arrow) is not a physical object within the game world because regardless of where you turn, look, or move, it continues to show on your screen until the event is over. Any ideas of how to check that?

Re: Juice Festival - Server For A Day

Posted: Wed Oct 07, 2015 6:07 pm
by lisa
noobbotter wrote:No worries. We got a script to help us complete it now without digging into memory.

Although, that one for the Juice Olympics might be a different story (the one with the image of the arrow pointing either up, down, left, or right). Unless we can see an orientation or angle of the image it shows on screen in order to decide which Extra Action Item to click. I do know the object (Arrow) is not a physical object within the game world because regardless of where you turn, look, or move, it continues to show on your screen until the event is over. Any ideas of how to check that?
Where is the npc to start it?

Re: Juice Festival - Server For A Day

Posted: Wed Oct 07, 2015 8:11 pm
by noobbotter
It's on Varanas bridge but it will use travelTo if you're not near it.

Re: Juice Festival - Server For A Day

Posted: Wed Oct 07, 2015 9:41 pm
by lisa
I meant for the juice Olympics.

Re: Juice Festival - Server For A Day

Posted: Wed Oct 07, 2015 10:45 pm
by noobbotter
Oh, in either varanas central other side from transporter, or Logar between AH and pet hunter.

Re: Juice Festival - Server For A Day

Posted: Thu Oct 08, 2015 3:53 am
by lisa
Well I can tell you there is no object, so the arrow doesn't exist in the world. So won't be able to find any pawn info for it.
The current score can be found at Client.exe+5FE844
There are a few other things in memory around it but it didn't seem like any was an indicator of arrow but 2 did look like pointers which could lead to something, 1 minute timer makes things hard to track down on my old laptop.


model\element\common\prop\arrow_mark\act_arrow_mark_up.ros
model\element\common\prop\arrow_mark\arrow_mark_up.ros

model\element\common\prop\arrow_mark\act_arrow_mark_right.ros
model\element\common\prop\arrow_mark\arrow_mark_right.ros

model\element\common\prop\arrow_mark\act_arrow_mark_left.ros
model\element\common\prop\arrow_mark\arrow_mark_left.ros

model\element\common\prop\arrow_mark\act_arrow_mark_down.ros
model\element\common\prop\arrow_mark\arrow_mark_down.ros

If you are curious these are the arrows used

Re: Juice Festival - Server For A Day

Posted: Thu Oct 15, 2015 9:52 am
by ichmagbotsyay
can somebody here help me? i cant get the server for a day or the crazy bartender waypoint to work for me
the bot works fine on other stuff, so its not a general problem with the bot, but just with this waypoint

it starts up fine, accepts the quest and starts the event, but then does nothing
the stuff the villagers say is not printed in my chat at all, they just have the speach bubbles above their head
this line in the waypoint is supposed to monitor the "say" chat: EventMonitorStart("CBSay", "CHAT_MSG_SAY");
but since its not actually printed in my chat, it cant be monitored, right?

is there any way to fix this?^^ or am i just missing something?

Re: Juice Festival - Server For A Day

Posted: Thu Oct 15, 2015 8:33 pm
by lisa
it doesn't matter what your chat settings are, the text is still sent to say regardless of whether you can see it or not.

More than likely you just need the addon d303fix, just do a forum search it has been mentioned many times when people can't get event monitoring to work.

Re: Juice Festival - Server For A Day

Posted: Fri Oct 16, 2015 4:53 am
by ichmagbotsyay
lisa wrote:it doesn't matter what your chat settings are, the text is still sent to say regardless of whether you can see it or not.

More than likely you just need the addon d303fix, just do a forum search it has been mentioned many times when people can't get event monitoring to work.
hmm i already have that :(
and "andor training" and eoj waypoints work fine and they use the eventmonitor as well...
but whatever, the juicefestival games take like 5 minutes to do manually, so its not that big of a problem :D