Andor chain with other minigames

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Post Reply
Message
Author
rocking666
Posts: 17
Joined: Sat Nov 10, 2012 5:29 pm

Andor chain with other minigames

#1 Post by rocking666 » Mon Jul 08, 2013 11:02 am

Hi,
I tried to chain the andor training range script to my other minigames WP. I'm not very good with onload WP yet, so I don't get the bot to load the next WP. I added a whenfinished option...but i dont know how to trigger it. Would the bot trigger the whenfinished automatically when the minigame is done? I can't test it today...(1minigame/day...)
Here is what I wrote:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<waypoints>
	<onLoad>
		-- V 3.2
		<![CDATA[
			--=== user options ===--
			-- it will stop once this score is reached, bonuses will be added afterwards though 
			-- so 4700 will probably be total score of 3100
			local requiredscore = 4700
			
			-- alter to your local language, caps sensative, in english is "Go!!!", so "Go" is enough
			local goMessage = "Go"
			When_Finished = "5andor_at"
		-- "end" to end script, "relog" to log next character, "charlist" to log next in 'charlist' and "waypointfilename" to load that waypointfile.

	CharList = {
	}
		-- Character list to use when using the "charlist" option above. Requires my "userfunction_LoginNextChar" userfunction.
		-- Find it here. http://www.solarstrike.net/phpBB3/viewtopic.php?p=10350
		--		eg.
		--		CharList = {
		--			{account=4,chars={}},
		--			{account=8,chars={1}},
		--			{account=7,chars={1,2,5}},
		--		}


			id_kate		= 121035
			id_magelly	= 120687
					
function checkRelog()
		flyoff()
		unregisterTimer("rezcheck")


		-- Log result
local magel = GetIdName(120687) -- Magelly
		local filename = getExecutionPath() .. "/logs/at.log";
		local file, err = io.open(filename, "a+");
		if file then
			file:write("Acc: "..RoMScript("GetAccountName()").."\tName: " ..string.format("%-10s",player.Name ).." \tDate: " .. os.date() ..
			"\tCoins:"..inventory:itemTotalCount(203038).." \tShells gained/total: "..getCurrency("shell") - numshells.."/".. getCurrency("shell") .. "\t" ..logentry .. "\n")
			file:close();
		end

		if When_Finished == "relog" then
			ChangeChar()
			waitForLoadingScreen();
			yrest(3000)
			loadProfile()
			loadPaths(__WPL.FileName);
		elseif When_Finished == "charlist" then
			SetCharList(CharList)
			LoginNextChar()
			loadProfile()
			loadPaths(__WPL.FileName);
		elseif When_Finished == "end" then
			error("Ending script",2)
		else
			player:update()

			-- Leave before loading next waypoint file.
			if ExitBeforeNextFile == true then
				if player:target_NPC(magel) then
					sendMacro("ChoiceOption(1);");
					yrest(100);
					RoMScript("StaticPopup_OnClick(StaticPopup1, 1);")
					waitForLoadingScreen();
					yrest(3000)
				end
			end

			loadProfile() -- Because we messed with the skills

			loadPaths(When_Finished)
		end
	end

	function rezCheck()
		player:update()
		if isInGame() and (1 > player.HP or not player.Alive) then
			-- Make sure they aren't still trying to run off
			keyboardRelease(settings.hotkeys.MOVE_FORWARD.key);
			keyboardRelease(settings.hotkeys.MOVE_BACKWARD.key);
			keyboardRelease(settings.hotkeys.ROTATE_LEFT.key);
			keyboardRelease(settings.hotkeys.ROTATE_RIGHT.key);
			keyboardRelease(settings.hotkeys.STRAFF_LEFT.key);
			keyboardRelease(settings.hotkeys.STRAFF_RIGHT.key);

			cprintf(cli.green, language[104]);  -- try to resurrect in 5 seconds
			rest(5000);

			cprintf(cli.green, language[107]);  -- use the ingame resurrect macro
			RoMScript("UseSelfRevive();");	-- first try self revive
			rest(500);
			RoMScript("BrithRevive();");
			waitForLoadingScreen(30)
			rest(settings.profile.options.WAIT_TIME_AFTER_RES);
			player:update();

			logentry = "Player died."
			checkRelog()
		end
	end
			-- Move to Kate Wesker and enter
			if getZoneId() == 2 then
				player:target_NPC(id_kate)
				
				--ChoiceOptionByName("Transport to Andor Training Range"); 
				--yrest(1000)
				ChoiceOptionByName(getTEXT("SKWERL_MOBIUS_24")) 
				yrest(1000)
				
				waitForLoadingScreen()
			end
			-- Move to Magelly Basac
			player:target_NPC(id_magelly)
			
			-- Check if we already completed
			--ChoiceOptionByName("Register for timed training"); yrest(1000)  
			ChoiceOptionByName(getTEXT("SKWERL_MOBIUS_14")) yrest(1000)
			
			--ChoiceOptionByName("Participate in training"); yrest(1000)  
			ChoiceOptionByName(getTEXT("SKWERL_MOBIUS_25")) yrest(1000)
			
			--ChoiceOptionByName("Confirm"); yrest(1000)
			ChoiceOptionByName(getTEXT("SYS_OKAY")) yrest(1000) --(might be wrong)
			
			local round = 0
			local score = 0
			
			function tort()
				local proc = getProc()
				
				local function checkclicked(address)
					local tmp = memoryReadRepeat("int", proc, address + addresses.pawnAttackable_offset) or 0;
					if bitAnd(tmp,0x8) then
						return true
					else
						return false
					end
				end

				local function one(ID)
					--print("targeting: "..ID)
					local objectList = CObjectList();
					objectList:update();
					local objSize = objectList:size()
					for i = 0,objSize do 
						obj = objectList:getObject(i)
						obj:update()
						if (obj.Id == ID or ID == 106885) and checkclicked(obj.Address) then
							player:target(obj)
							RoMScript("UseExtraAction(1)")
							yrest(10)
							player:target(obj)
							RoMScript("UseExtraAction(1)")
							if ID == 106883 then
								yrest(10)
								player:target(obj)
								RoMScript("UseExtraAction(1)")	
							end
							yrest(100)
						end
					end
				end
				if player:findNearestNameOrId(106881,106882,106883,106884) then
					--== monitor chat
					EventMonitorStart("Tortevent", "SYSTEM_MESSAGE");
					local time, moreToCome, name, msg, _go 
					repeat
						time, moreToCome, name, msg = EventMonitorCheck("Tortevent",1)
						yrest(10)
						if name and string.find(name,goMessage) then
							_go = true
						end
					until _go == true
					EventMonitorStop("Tortevent")
					round = round + 1
					print("Wave: "..round..", Score: "..score)
					repeat
						one(106882)
						one(106882)
						one(106881)
						one(106883)
						one(106884)
					until not player:findNearestNameOrId(106881,106882,106883,106884)
				end
			end
			
			repeat
				yrest(100)
			until  player:findNearestNameOrId(106881)
			print("OK event has started")
			repeat
				tort()
				player:update()
				yrest(100)
				buffed = player:getBuff(622402)
				if buffed then score = buffed.Level end
			until not player:hasBuff(622402) or ( buffed and buffed.Level > requiredscore )
			error("Event finished, end score was "..score)
		]]>
	</onLoad>
</waypoints>
Thank you very much

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Andor chain with other minigames

#2 Post by rock5 » Mon Jul 08, 2013 12:26 pm

If all you want it to do when it finishes andor is to load another file then at the end where it has

Code: Select all

error("Event finished, end score was "..score)
Change it to

Code: Select all

print("Event finished, end score was "..score)
loadPaths("5andor_at")
If you really want to use the relog options then replace the loadPaths with

Code: Select all

checkRelog()
That assumes the rest of the code is correct.

But note, with When_Finished set to "5andor_at", this file will only load that waypoint file, it will not change characters. If you want to change characters at the end of a chain of waypoint files I suggest you use my survivalnext.xml file. It can be found here. http://solarstrike.net/phpBB3/viewtopic ... 714#p29714. It's actually misnamed. It can be used at the end of any chain of waypoint file. In it you set your relog options, either "relog" or "charlist" and the name of the first file in your chain. Then you load this file last in your chain and it will change your character and load the first file. eg.
  • andor.xml
    • loads
    andor_to_malatina.xml
    • loads
    at.xml
    • loads
    cot_tele.xml
    • loads
    malatina_to_andor.xml
    • loads
    survivalnext.xml
    • which changes character and loads andor.xml
Hope that helps.
  • 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

rocking666
Posts: 17
Joined: Sat Nov 10, 2012 5:29 pm

Re: Andor chain with other minigames

#3 Post by rocking666 » Mon Jul 08, 2013 12:48 pm

Thank you very much !
I should work now, I'll test it tomorrow :)
The survivalnext file will be very usefull when my chain will be all foolproof. I'm almost done with a chain that does all minigames, change class, then do dailies with other class, then goes back to the starting point so it will be ready for the next day :) . When everything will be working perfectly, i'll make it relog on another char.

legoson
Posts: 18
Joined: Tue Jul 02, 2013 6:54 pm

Re: Andor chain with other minigames

#4 Post by legoson » Tue Jul 09, 2013 12:22 pm

Does your script run andor? or you still have to manually do it? cus i would be interested in andor script.

is it possible to just get your andor script if it does run it.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Andor chain with other minigames

#5 Post by lisa » Tue Jul 09, 2013 7:12 pm

I wave my magic wand and do a forum search *in a cloud of smoke it appears*

http://www.solarstrike.net/phpBB3/viewt ... 730#p48730

I even found another topic about chaining the andor WP

http://www.solarstrike.net/phpBB3/viewt ... r+training
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

legoson
Posts: 18
Joined: Tue Jul 02, 2013 6:54 pm

Re: Andor chain with other minigames

#6 Post by legoson » Wed Jul 10, 2013 12:31 pm

Lisa I used your waypoint file v3.2 that was in the post you linked. when I ran it, it talked to andor and it auto selected timed game. Then it stood there. the micromacro window just Said "Okay event has started."

I had to play the mini and it seemed off, took multiple times pressing alt+1 to get my fire cursor. What did I do wrong?

Tried it on another character same thing. My alt+1 is definitely lagging big time.


EDIT: Okay i installed the d303fix like it says to in the thread. and now it seems like its doing something. but im confused do i still have to click the mobs or does it auto target.. seems like it does some of both.

EDIT2: LOL sorry. Okay so I did like it also says and just sat in notepad and let it run in the background and it only got to round 8. something im doing is wrong lol.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Andor chain with other minigames

#7 Post by lisa » Wed Jul 10, 2013 6:26 pm

lisa wrote:near the top of the file has this

Code: Select all

			--=== user options ===--
			-- it will stop once this score is reached, bonuses will be added afterwards though 
			local requiredscore = 2700
So yeah it got to 2700 and decided to stop, I set mine to 5000 and just let it go ;)

PC performance and lag will play a big part in the score you get but at the end of the day the score doesn't seem to matter that much to the rewards you get.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

legoson
Posts: 18
Joined: Tue Jul 02, 2013 6:54 pm

Re: Andor chain with other minigames

#8 Post by legoson » Wed Jul 10, 2013 9:58 pm

well my pc is more then capable of running like 4 clients at once.. plus MM. My score was only like 900.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Andor chain with other minigames

#9 Post by lisa » Wed Jul 10, 2013 11:29 pm

legoson wrote:well my pc is more then capable of running like 4 clients at once.. plus MM. My score was only like 900.
Did you look at the top of the file for the line I quoted?

local requiredscore =

You can set the WP to stop after a certain score and yours might be set to 900 ish
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

legoson
Posts: 18
Joined: Tue Jul 02, 2013 6:54 pm

Re: Andor chain with other minigames

#10 Post by legoson » Thu Jul 11, 2013 9:10 pm

Okay so Same results leaving RoM/MM in the background and using Notepad. So I tried it on a character and just Had RoM and MM on top of it. and I noticed the bot isn't shooting the fast running guys.. I think they are causing my problem. After the first one did not get shot. I shot the rest that came up and went back to MM. and it went to round 14.

Any ideas?


PS. I did check the line, it was set for 2700 I put it to 5k. my score was 3550 or close and hit only 4k.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Andor chain with other minigames

#11 Post by rock5 » Thu Jul 11, 2013 11:40 pm

I seem to remember there was some issue with the keyboard checks it does when active vs when not active, but I'm pretty sure they were fixed. Are you using an old version of MM perhaps?
  • 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

legoson
Posts: 18
Joined: Tue Jul 02, 2013 6:54 pm

Re: Andor chain with other minigames

#12 Post by legoson » Fri Jul 12, 2013 11:19 am

Nope, I'm updated, Revision 760, I keep it updated with tortiseSVN. I just tested it again. when I don't watch (notepad windowed) it doesn't appear to attempt the late fast running mobs (that give the bonus attacks). When I just have RoM/MM So I can watch both and shoot the fast ones. I get to round 14 with 4.1k finished score.

PS just checked MM version. V1.03

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Andor chain with other minigames

#13 Post by lisa » Fri Jul 12, 2013 6:29 pm

legoson wrote: it doesn't appear to attempt the late fast running mobs (that give the bonus attacks).
That is because it doesn't need to, they don't cause any missed mobs and the bot isn't set up to try and use the skills anyway, it used to easily score 4000 without touching those fast running mobs.

Like I said though score doesn't seem to matter for rewards so the only reason to try and get a huge score is to basically get your chars name on the ladder which will pretty much tell everyone your a botter.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests