Page 1 of 1

Errors

Posted: Mon May 19, 2014 4:42 pm
by Lamkefyned
Hello, I have several bugs with this last update 775

Code: Select all

------------------------------------------------------------------
--  Lamkefyned Tools Userfunction
--                Version 1.0.000
------------------------------------------------------------------

--[[ Los strings y comentarios multilínea
     se adornan con doble corchete]]
	 
-- Settings

		function LTU_version()
			cprintf(cli.red,"Version: 1.0.000\n")
		end

		function LTU_versioninfo()
			cprintf(cli.red,"Version Beta\n")
		end

		function LTU_clear()
				local _, _, x, y = getConsoleAttributes();
				for j = 1, y do
				printf(string.rep(' ', x));
			end
				clearScreen();
		end

-- General

		function LTU()
			cprintf(cli.lightblue,"Developer: Lamkefyned\n")
			cprintf(cli.lightblue,"Userfunction: Lamkefyned Tools Userfunction\n")
			LTU_version()
			LTU_versioninfo()
		end

		function LTU_Loading()
			LTU_clear()
			cprintf(cli.lightblue,"\n \n \n \n \n \n \n \n \n \n \n \n")
			cprintf(cli.lightblue,"Loading Script By Lamkefyned...")
			cprintf(cli.lightblue,"\n \n \n \n \n \n \n \n \n \n \n \n")
			yrest(2000) 
			LTU_clear()
		end

		function LTU_Ireset()
			SlashCommand("ILG destroy")
			yrest(500)
			SlashCommand("ILG inv")
			yrest(1000)
		end
		
-- Hoss

		function LTU_Hoss_Menu()
                    print("Here are the options:")
                    print("   1. Main character")
                    print("   2. Character to level up")
                    printf("Enter a number > ")
                    local selected = io.stdin:read()
                    if selected == "1" then
					LTU_Hoss_BUFF()
                    __WPL:setWaypointIndex(__WPL:findWaypointTag("MC"))
                    elseif selected == "2" then
					LTU_Hoss_Characters()
                    __WPL:setWaypointIndex(__WPL:findWaypointTag("CTL"))
			end
		end

		function LTU_Hoss_Characters()
				SetCharList({
					{account=21 , chars= {}},
					{account=22 , chars= {}},
					{account=23 , chars= {}},
					{account=24 , chars= {}},
					{account=25 , chars= {}},
				})
		end

		function LTU_Hoss_BUFF()
					player:update()
					if not player:hasBuff("506841") 
						then inventory:useItem(202879);
					end
		end
		
		function LTU_Hoss_Ireset()
			SlashCommand("ILG destroy")
			yrest(500)
			LTU_Hoss_BUFF()
			yrest(500)
			LTU_Hoss_Group()
			yrest(1000)
		end

      function LTU_Hoss_Group()
         if(RoMScript("GetNumPartyMembers()") == 0)then
            repeat
                for k,v in pairs(invite) do
                     if not RoMScript("InPartyByName ( "..v.." );")then
                      RoMScript("InviteByName('"..v.."');");
                       yrest(5000)
                    end
               end
               until RoMScript("GetNumPartyMembers()") ~= 0
         end
      end

		function LTU_Hoss_Level()
			if( player.Level == 28 ) then
				printf("/n Changing character!");
				LoginNextChar()
			end;
		end
		
		function LTU_Hoss_Level_30()
			if( player.Level > 30 ) then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("MC"))
			end
		end
		
		function LTU_Hoss_Level_301()
			if( player.Level <= 30 ) then
			__WPL:setWaypointIndex(__WPL:findWaypointTag("CTL"))
			end
		end

		function LTU_HossEP(arg1)
			eventParty()
			repeat
			yrest(100)
			until checkEventParty() == arg1
			eventParty("stop") 
		end

		function LTU_HossSPC(arg1)
			sendPartyChat(arg1)
		end

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<waypoints>
	<onload>
	LTU_Loading()
	
		invite =
	{
	---------------------------------------------------------------------------------------------------------------------------
	};
		
	LTU_Hoss_Menu()
	</onload>
	
-- MC

	<!-- #  1 --><waypoint x="3732" z="11454" y="-44" type="TRAVEL" tag="MC">
	            LTU_Hoss_Ireset()
				LTU_HossEP("start")
				LTU_HossSPC("start")
	</waypoint>
	<!-- #  2 --><waypoint x="3801" z="11427" y="-44" type="TRAVEL">
				waitForLoadingScreen()
	</waypoint>
	<!-- #  3 --><waypoint x="-1424" z="-2653" y="1437" type="TRAVEL">	</waypoint>
	<!-- #  4 --><waypoint x="-1045" z="-2657" y="1481" type="TRAVEL">	</waypoint>
	<!-- #  5 --><waypoint x="-1013" z="-2530" y="1480" type="TRAVEL">	</waypoint>
	<!-- #  6 --><waypoint x="-1009" z="-2115" y="1480" type="NORMAL">
				LTU_HossSPC("next")
				LTU_HossEP("next")
	</waypoint>
	<!-- #  7 --><waypoint x="-775" z="-2115" y="1480" type="TRAVEL">	</waypoint>
	<!-- #  8 --><waypoint x="-600" z="-2115" y="1480" type="TRAVEL">	</waypoint>
	<!-- #  9 --><waypoint x="-465" z="-2046" y="1480" type="NORMAL">	</waypoint>
	<!-- # 10 --><waypoint x="-320" z="-2045" y="1480" type="TRAVEL">
				LTU_HossSPC("next")
				LTU_HossEP("next")
	</waypoint>
	<!-- # 11 --><waypoint x="-287" z="-2189" y="1480" type="NORMAL">	</waypoint>
	<!-- # 12 --><waypoint x="-155" z="-2120" y="1480" type="NORMAL">	</waypoint>
	<!-- # 13 --><waypoint x="-49" z="-2116" y="1480" type="NORMAL">	</waypoint>
	<!-- # 14 --><waypoint x="-288" z="-2043" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 15 --><waypoint x="-591" z="-2043" y="1480" type="TRAVEL">	
				LTU_HossSPC("next")
	</waypoint>
	<!-- # 16 --><waypoint x="-732" z="-2118" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 17 --><waypoint x="-936" z="-2116" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 18 --><waypoint x="-1006" z="-2261" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 19 --><waypoint x="-1009" z="-2589" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 20 --><waypoint x="-1456" z="-2590" y="1437" type="TRAVEL">	
				LTU_HossEP("finish")
	</waypoint>
	<!-- # 21 --><waypoint x="-1460" z="-2512" y="1437" type="TRAVEL">	</waypoint>
	<!-- # 22 --><waypoint x="-1459" z="-2529" y="1437" type="TRAVEL">
				waitForLoadingScreen()
				__WPL:setWaypointIndex(__WPL:findWaypointTag("MC"))
	</waypoint>
	
-- CTL

	<!-- # 23 --><waypoint x="3732" z="11454" y="-44" type="TRAVEL" tag="CTL">
	            SlashCommand("AAI on")
                LTU_Hoss_Level()
				LTU_HossSPC("start")
				LTU_HossEP("start")
	</waypoint>
	<!-- # 24 --><waypoint x="3801" z="11427" y="-44" type="TRAVEL">
				waitForLoadingScreen()
	</waypoint>
	<!-- # 25 --><waypoint x="-1424" z="-2653" y="1437" type="TRAVEL">
				LTU_HossEP("next")
	</waypoint>
	<!-- # 26 --><waypoint x="-1045" z="-2657" y="1481" type="TRAVEL">	</waypoint>
	<!-- # 27 --><waypoint x="-1013" z="-2530" y="1480" type="TRAVEL"> 	</waypoint>
	<!-- # 28 --><waypoint x="-1009" z="-2115" y="1480" type="TRAVEL">
				LTU_HossSPC("next")
				LTU_HossEP("next")
	</waypoint>
	<!-- # 29 --><waypoint x="-775" z="-2115" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 30 --><waypoint x="-600" z="-2115" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 31 --><waypoint x="-465" z="-2046" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 32 --><waypoint x="-320" z="-2045" y="1480" type="TRAVEL">
             	LTU_HossSPC("next")
				LTU_HossEP("next")
	</waypoint>
	<!-- # 33 --><waypoint x="-591" z="-2043" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 34 --><waypoint x="-732" z="-2118" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 35 --><waypoint x="-936" z="-2116" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 36 --><waypoint x="-1006" z="-2261" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 37 --><waypoint x="-1009" z="-2589" y="1480" type="TRAVEL">	</waypoint>
	<!-- # 38 --><waypoint x="-1456" z="-2590" y="1437" type="TRAVEL">
             	LTU_HossSPC("finish")
	</waypoint>
	<!-- # 39 --><waypoint x="-1460" z="-2512" y="1437" type="TRAVEL">
				waitForLoadingScreen()
				yrest(5000)
                __WPL:setWaypointIndex(__WPL:findWaypointTag("CTL"))
	</waypoint>
	
-- DEAD

	<!-- # 40 --><waypoint x="2088" z="10933" y="5">	</waypoint>
	<!-- # 41 --><waypoint x="2344" z="11537" y="-32" type="TRAVEL">	</waypoint>
	<!-- # 42 --><waypoint x="2624" z="11467" y="-35" type="TRAVEL">	</waypoint>
	<!-- # 43 --><waypoint x="2690" z="11524" y="-35" type="TRAVEL">	</waypoint>
	<!-- # 44 --><waypoint x="2819" z="11830" y="-44" type="TRAVEL">	</waypoint>
	<!-- # 45 --><waypoint x="3624" z="11498" y="-44" type="TRAVEL">
				LTU_Hoss_Level_30()
				LTU_Hoss_Level_301()
	</waypoint>
</waypoints>
Sin título.jpg
That is what happens?

Re: Errors

Posted: Mon May 19, 2014 6:05 pm
by lisa

Re: Errors

Posted: Tue May 20, 2014 4:52 pm
by Lamkefyned
Sin título.jpg
I still have a problem... tables... (Character level 85)

The send by group already fix it.

Re: Errors

Posted: Tue May 20, 2014 5:52 pm
by lisa
The posted error says "InPartyByName" bad argument #1, string expected, got nil.
So in your code it is sending nil as first argument and you need to work out why.

Re: Errors

Posted: Tue May 20, 2014 5:54 pm
by Lamkefyned
But before not missed this error... and now yes


Edit

Fixed problem

Re: Errors

Posted: Tue May 20, 2014 6:01 pm
by lisa
just because it used to just ignore errors doesn't mean it was a good idea, work out why you are using nil in the function and your code will be better for it.

Re: Errors

Posted: Tue May 20, 2014 6:05 pm
by Lamkefyned
Fixed problem