Malatina to AT... what is wrong with this code?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Malatina to AT... what is wrong with this code?

#1 Post by Cindy » Sat Oct 06, 2012 1:30 pm

Running into trouble with Cedric, and also with Kat Rojo... any ideas what's wrong?

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload><![CDATA[
	--=== User Options ===--

	When_Finished = "AT35"
		-- "end" to end script, "relog" to log next character 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}},
		--		}

	--====================--

	function checkRelog()
		-- Log result
		local filename = getExecutionPath() .. "/logs/cot.log";
		local file, err = io.open(filename, "a+");
		if file then
			file:write("Account: "..RoMScript("GetAccountName()").."\tName: " ..string.format("%-10s",player.Name ).." \tDate: " .. os.date() ..
			" \tShells gained/total: "..inventory:getItemCount(240181) - numshells.."/".. inventory:getItemCount(240181).. "\t" ..logentry .. "\n")
			file:close();
		end

		if When_Finished == "relog" then
			sendMacro("}LoginNextToon=true;a={")
			sendMacro("Logout();");
			waitForLoadingScreen();
			loadPaths("cot_tele");
		elseif When_Finished == "charlist" then
			SetCharList(CharList)
			LoginNextChar()
			loadPaths("cot_tele");
		elseif When_Finished == "end" then
			error("Ending script",2)
		else
			if not string.find(When_Finished,".", 1, true) then
				When_Finished = When_Finished .. ".xml"
			end
			local filename = getExecutionPath() .. "/waypoints/" .. When_Finished
			local file, err = io.open(filename, "r");
			if file then
				file:close();
				loadPaths(When_Finished)
			else
				error("'When_Finished' option is invalid",0)
			end
		end
	end
]]></onload>
	<!-- #  1 --><waypoint x="4929" z="-1913" y="109">	</waypoint>
	<!-- #  2 --><waypoint x="4987" z="-2008" y="113">	</waypoint>
	<!-- #  3 --><waypoint x="5269" z="-2115" y="121">	
	player:target_NPC(Cedric);
		yrest(1919)
		sendMacro("ChoiceOption(1);");	
	</waypoint>
	<!-- #  4 --><waypoint x="5245" z="-2179" y="103">	</waypoint>
	<!-- #  5 --><waypoint x="5278" z="-2200" y="103">	
	player:target_NPC("Kat Rojo");
		yrest(1419)
		sendMacro("ChoiceOption(1);");		
	player:target_NPC("Kat Rojo");		
		yrest(1519)
		sendMacro("ChoiceOption(2);");

	yrest(10123)
	</waypoint>
</waypoints>

BillDoorNZ
Posts: 446
Joined: Wed Aug 03, 2011 7:37 pm

Re: Malatina to AT... what is wrong with this code?

#2 Post by BillDoorNZ » Sat Oct 06, 2012 3:26 pm

Just had a quick look so far, so only seen one issue

Code: Select all

  player:target_NPC(Cedric);
should be

Code: Select all

  player:target_NPC("Cedric");

salesman921
Posts: 7
Joined: Sun Nov 06, 2011 8:12 pm

Re: Malatina to AT... what is wrong with this code?

#3 Post by salesman921 » Sun Oct 07, 2012 10:41 am

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload><![CDATA[
--=== User Options ===--

When_Finished = "AT"
-- "end" to end script, "relog" to log next character 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}},
-- }

--====================--

function checkRelog()
-- Log result
local filename = getExecutionPath() .. "/logs/cot.log";
local file, err = io.open(filename, "a+");
if file then
file:write("Account: "..RoMScript("GetAccountName()").."\tName: " ..string.format("%-10s",player.Name ).." \tDate: " .. os.date() ..
" \tShells gained/total: "..inventory:getItemCount(240181) - numshells.."/".. inventory:getItemCount(240181).. "\t" ..logentry .. "\n")
file:close();
end

if When_Finished == "relog" then
sendMacro("}LoginNextToon=true;a={")
sendMacro("Logout();");
waitForLoadingScreen();
loadPaths("cot_tele");
elseif When_Finished == "charlist" then
SetCharList(CharList)
LoginNextChar()
loadPaths("cot_tele");
elseif When_Finished == "end" then
error("Ending script",2)
else
if not string.find(When_Finished,".", 1, true) then
When_Finished = When_Finished .. ".xml"
end
local filename = getExecutionPath() .. "/waypoints/" .. When_Finished
local file, err = io.open(filename, "r");
if file then
file:close();
loadPaths(When_Finished)
else
error("'When_Finished' option is invalid",0)
end
end
end
]]></onload>
<!-- # 1 --><waypoint x="4084" z="3350" y="18"> player:target_NPC("Malatina");
yrest(1919)
sendMacro("ChoiceOption(1);");
yrest(1919)
sendMacro("ChoiceOption(1);");
</waypoint>
<!-- # 1 --><waypoint x="4929" z="-1913" y="109"> </waypoint>
<!-- # 2 --><waypoint x="4987" z="-2008" y="113"> </waypoint>
<!-- # 3 --><waypoint x="5269" z="-2115" y="121">
player:target_NPC("Cedric");
yrest(1919)
sendMacro("ChoiceOption(1);");
waitForLoadingScreen(10)
</waypoint>
<!-- # 4 --><waypoint x="5245" z="-2179" y="103"> </waypoint>
<!-- # 5 --><waypoint x="5278" z="-2200" y="103">
player:target_NPC("Kat Rojo");
AcceptQuestByName("Proceed to the Scar of Despair Camp");
yrest(500);
player:target_NPC("Kat Rojo");
yrest(1519)
sendMacro("ChoiceOption(2);");

yrest(10123)
</waypoint>
</waypoints>

salesman921
Posts: 7
Joined: Sun Nov 06, 2011 8:12 pm

Re: Malatina to AT... what is wrong with this code?

#4 Post by salesman921 » Sun Oct 07, 2012 10:43 am

i edited it slightly, it should work now, it will talk to her to leave COT, go exchange at cedric, then transport to AT.

It worked when i tested it.

Cindy
Posts: 237
Joined: Fri Sep 28, 2012 4:23 pm

Re: Malatina to AT... what is wrong with this code?

#5 Post by Cindy » Sun Oct 07, 2012 3:26 pm

Thanks, curious why the loading screen wait command after Cedric? He is the dia npc, I just pick up the daily 3 dias on the way. Did you mean to put the wait after the second talk to Kat Rojo?

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 48 guests