Lyliya's Magic House New mini game

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
vernberg
Posts: 28
Joined: Tue Nov 27, 2012 6:33 am
Location: north of the the world

Lyliya's Magic House New mini game

#1 Post by vernberg » Thu Sep 12, 2013 3:17 am

there is a new minigame is runes of magic and was thinking if someone has looked in to it already.

it cost 30 tokkens and give 30 shells

Try to memorize Lyliya's decorations and get a variety of rewards,

dr-nuker
Posts: 145
Joined: Sun Oct 09, 2011 7:33 am

Re: Lyliya's Magic House New mini game

#2 Post by dr-nuker » Fri Sep 13, 2013 5:12 pm

Here is what i've made with 2 tries.
Too bad the game is offline again...

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<waypoints>
<onload>

function castit(what)
	print("Go to ".. what)
	local todo = player:findNearestNameOrId(what)
	if todo then
		teleport(todo.X,todo.Z,todo.Y+15)
		yrest(50)
		player:target_NPC(todo.Name)
		yrest(50)
		RoMScript("UseExtraAction(1)")
		player:clearTarget();
		yrest(50)
		teleport(lylx,lylz,lyly+15)
	else
		print("not found!")
	end
end

	fly()
	local lyliya = player:findNearestNameOrId("Lyliya")
	lylx = lyliya.X 
    lyly = lyliya.Y 
	lylz = lyliya.Z
	teleport(lylx,lylz,lyly+15)
	yrest(500)
	print("Start game")
	player:sleep()

	
    while true do
		print("Memorize room")
		player:sleep()
		
		local tablesize = 0
		local furniture = {}
		local objectList = CObjectList();
		objectList:update();
		local objSize = objectList:size()
		for i = 0,objSize do
			local obj = objectList:getObject(i);
			obj:update()
			if obj.Name and obj.Name ~= "" and obj.Name ~= "" and obj.Type ~= PT_PLAYER and obj.Name ~= "Lyliya" then
				print(obj.Name .. " " .. obj.X .. " " .. obj.Z .. " " .. obj.Y)
				table.insert(furniture, table.copy(obj))
				tablesize = tablesize + 1
			end
			player:update();
		end
		
		print("compare room")
		player:sleep()
		
		local tablesize2 = 0
		local furniture2 = {}
		objectList:update();
		objSize = objectList:size()
		for i = 0,objSize do
			local obj = objectList:getObject(i);
			obj:update()
			if obj.Name and obj.Name ~= "" and obj.Name ~= "" and obj.Type ~= PT_PLAYER and obj.Name ~= "Lyliya" then
				print(obj.Name .. " " .. obj.X .. " " .. obj.Z .. " " .. obj.Y)
				table.insert(furniture2, table.copy(obj))
				tablesize2 = tablesize2 + 1
			end
			player:update();
		end
		
		print("Action")
		
		for ka,va in ipairs(furniture2) do
			local cc = 0
			for kb,vb in ipairs(furniture) do
				cc=cc+1
				if va.Name == vb.Name then
					-- object was here and is here again
					print(va.Name)
					if va.X == vb.X and va.Z == vb.Z then
						-- it is on same position as before
					else
						castit(va.Name)
						break
					end
				else
					if cc == tablesize then
						castit(va.Name)
						break
					end
				end
			end
		end
		
	end
</onload>
</waypoints>
It is not automated yet. So it will only just help to identify changed objects.
What is on the todo list is: talk to her, accept, load table once then wait for the timer.
load next table and become active.
When timer is gone go and talk to her again...

I will try as soon as they open the zone...

Statesider
Posts: 14
Joined: Tue Aug 21, 2012 3:05 pm

Re: Lyliya's Magic House New mini game

#3 Post by Statesider » Mon Sep 16, 2013 9:34 am

Tested and works for first 2 rounds. Third round complete mess and game FAIL :oops:

dr-nuker
Posts: 145
Joined: Sun Oct 09, 2011 7:33 am

Re: Lyliya's Magic House New mini game

#4 Post by dr-nuker » Mon Sep 16, 2013 4:25 pm

I'm reworking on it.

It's just not so easy as the game was closed last days :/

Now i have problems when loggiung in. Sometimes my interface is not loaded so i can not play ...

Statesider
Posts: 14
Joined: Tue Aug 21, 2012 3:05 pm

Re: Lyliya's Magic House New mini game

#5 Post by Statesider » Tue Sep 17, 2013 6:25 am

Thanks anyway for your big effort! I´m not so deep into micromacro yet so I cant script something like that xD

*thumbs up*! ;)

Statesider
Posts: 14
Joined: Tue Aug 21, 2012 3:05 pm

Re: Lyliya's Magic House New mini game

#6 Post by Statesider » Mon Sep 23, 2013 6:37 am

Any success about fixing that waypoint for the minigame? ;)

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

Re: Lyliya's Magic House New mini game

#7 Post by BlubBlab » Fri Sep 27, 2013 1:18 pm

The problem I think is their are 3 different modes in the mini-game:
-Change
-New
-Identical

The fist 2 are covered up by the script, writing an new for the last would be easy the hard part is is find out in which mode we are.
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

dr-nuker
Posts: 145
Joined: Sun Oct 09, 2011 7:33 am

Re: Lyliya's Magic House New mini game

#8 Post by dr-nuker » Fri Sep 27, 2013 4:52 pm

Well.

I have never come above level 10. But I think that's the last possible level.

Nevertheless I have never seen any tradeable rewards for her tokens. Anyone experienced with that?

turbobay
Posts: 44
Joined: Wed Jul 31, 2013 7:20 pm

Re: Lyliya's Magic House New mini game

#9 Post by turbobay » Sun Sep 29, 2013 9:00 am

Not yet, but i think i requires a certain amount of runs to make her "friendly" to give you trades. As far as i understand the description on the items you have to increase some value, although i did not figure out how and where to see this actual value, and what level we need to reach to make her "friendly".

Did you reach lvl 10 with a script, or by manual play ? And how many shells did you get with lvl 10 ?

dr-nuker
Posts: 145
Joined: Sun Oct 09, 2011 7:33 am

Re: Lyliya's Magic House New mini game

#10 Post by dr-nuker » Mon Sep 30, 2013 4:23 pm

Of course not by hand!

And i think it is 45 shells! But I'll have an eye on that next time i do it!

turbobay
Posts: 44
Joined: Wed Jul 31, 2013 7:20 pm

Re: Lyliya's Magic House New mini game

#11 Post by turbobay » Tue Oct 01, 2013 5:44 am

Ok, nice. So do you have an updated script ?

So far i have nobody confirming when it is possible to trade any items with her. Only thing is, you get something increased when succesfull, but no possibility to see your rank and how much is needed to make her "friendly" to finally trade with her :-(

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

Re: Lyliya's Magic House New mini game

#12 Post by BlubBlab » Wed Oct 02, 2013 1:51 am

I was finally able to make a test run, the bot was really wrong a lot.

Their are a few problems I see:

Code: Select all


 for ka,va in ipairs(furniture2) do
         local cc = 0
         for kb,vb in ipairs(furniture) do
            cc=cc+1
            if va.Name == vb.Name then
               -- object was here and is here again
               print(va.Name)
               if va.X == vb.X and va.Z == vb.Z then
                  -- it is on same position as before
               else
                  castit(va.Name)
                  break
               end
            else
               if cc == tablesize then
                  castit(va.Name)
                  break
               end
            end
         end
      end
First comparing float numbers with == is... do someone have a big hammer I need hit some fingers. :D
Okay fun besides float numbers can have different binary representatives for the same number with == you take a look at the binary datas at the most computer languages. I don't know how it is in LUA but I aspect from the errors it is.

2te

Code: Select all

 if cc == tablesize then
            castit(va.Name)
             break
  end
That looks strange for my but sadly I can only take a look on it tomorrow, if that works correctly(I'm tired)
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
Bill D Cat
Posts: 555
Joined: Sat Aug 10, 2013 8:13 pm
Location: Deep in the Heart of Texas

Re: Lyliya's Magic House New mini game

#13 Post by Bill D Cat » Wed Oct 02, 2013 2:05 am

I haven't tried anything with this script, but I understand what you mean by comparing FLOAT values. I think the better option might be to check the distance and act if it's larger than a certain value.

Code: Select all

if 10 > distance(va.X, va.Z, vb.X, vb.Z) then
     -- it is on same position as before
else
     castit(va.Name)
     break
end

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

Re: Lyliya's Magic House New mini game

#14 Post by BlubBlab » Wed Oct 02, 2013 3:39 am

Code: Select all

if(math.abs(x1-x2) >1) then

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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Lyliya's Magic House New mini game

#15 Post by rock5 » Wed Oct 02, 2013 4:13 am

BlubBlab wrote:if(math.abs(x1-x2) >1) then
Technically it would have to be

Code: Select all

if (1 > math.abs(x1-x2)) and (1 > math.abs(z1-z2)) then
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

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

Re: Lyliya's Magic House New mini game

#16 Post by BlubBlab » Thu Oct 03, 2013 1:31 am

rock5 wrote:
BlubBlab wrote:if(math.abs(x1-x2) >1) then
Technically it would have to be

Code: Select all

if (1 > math.abs(x1-x2)) and (1 > math.abs(z1-z2)) then
I was in a hurry^^

I changed it so far I can tell this part works now with 100% accuracy, I added also some more yrest the script didn't wait until the character finished carsting on the object also I added a little fallback if the object is still too far.

Their are still some problem with the target I hope I can solve it tomorrow I used up all my character for today in tries and errors.
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: Lyliya's Magic House New mini game

#17 Post by BlubBlab » Fri Oct 04, 2013 3:02 am

Okay can somebody test this, I'm out of testing chars, but I'm sure it should now work :D
(if I haven't make a syntax mistake)
By the way the reward increase with the numbers of round and so the numbers of shells like andor training
Attachments
Lyliya.xml
(5.89 KiB) Downloaded 238 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
Bill D Cat
Posts: 555
Joined: Sat Aug 10, 2013 8:13 pm
Location: Deep in the Heart of Texas

Re: Lyliya's Magic House New mini game

#18 Post by Bill D Cat » Fri Oct 04, 2013 3:31 am

Ran through the event fine, got 45 shells. The only time it had any trouble was when trying to get to an item up on the balcony. So out of ten stages, I ended up with one failure in picking out all the correct items. Still, it got me all three titles the first time, so I can't complain about +15HP for using it once :-)

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

Re: Lyliya's Magic House New mini game

#19 Post by BlubBlab » Fri Oct 04, 2013 4:14 am

No "Out of range" error ?(out of range means in true no line of sight)
That was what fixed the at last short explanation I added a "faceit" function and a I shorted a vector to not end up in the objects(and see nothing->"out of range") that works fine?

If the bot choose something wrong then I guess it is the bot not my script.
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
Bill D Cat
Posts: 555
Joined: Sat Aug 10, 2013 8:13 pm
Location: Deep in the Heart of Texas

Re: Lyliya's Magic House New mini game

#20 Post by Bill D Cat » Fri Oct 04, 2013 4:48 am

The bot got hung up on the railing for some reason. I managed to nudge it over the top on a second character and it completed the whole event perfectly. The third character I ran through got to the 8th stage and for some reason identified an object twice at the same location on the compare stage. When it went to identify the objects, it used up all 10 of the allowed mistakes because it kept trying to target an object that wasn't there anymore. So far that's been the only issues I've encountered.

I did clean up the print statements that show the item locations during the identification stages to use math.lower() on the location values. It cleaned up the display without actually altering the numbers for comparison purposes. I think you have a winner here. An easy 45 shells each time which makes up for Goblin Mine being such a PITA these days to do solo on alts that aren't geared and statted.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 25 guests