Page 25 of 46

Re: rock5's "fastLogin Revisited"

Posted: Sat May 11, 2013 7:25 am
by rock5
Restore userfunction_loginnextchar.lua to original. You shouldn't ever change usesfunction files, usually.

The cot_tele now looks correct.

Re: rock5's "fastLogin Revisited"

Posted: Sat May 11, 2013 2:39 pm
by Ego95
Wanted to use my phirius token farmers on the elven island but now get this error which the actual verson of the userfunction:

Code: Select all

9:34pm - ...scripts/rom/userfunctions/userfunction_LoginNextChar.lua:96: bad arg
ument #1 to 'pairs' (table expected, got nil)
My mistake. I just noticed I downloaded the new version with 108 buttons and set up my accounts new -.-

Re: rock5's "fastLogin Revisited"

Posted: Sat May 11, 2013 6:08 pm
by newton666
Ok thanks rock that did the trick .
Never going to touch any userfunction again .

Re: rock5's "fastLogin Revisited"

Posted: Tue May 14, 2013 6:01 am
by newton666
hi i'm trying to do one of the dailys in logar with different accounts but not working here is my script

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
   
<onLoad>

function relog()
  SetCharList({
			{account=1, chars= {1}},
			{account=2, chars= {1}},
			{account=3, chars= {1}},
			{account=4, chars= {1}},
			{account=5, chars= {3}},
			{account=6, chars= {3}},
			{account=7, chars= {1}},
			{account=9, chars= {2}},
			{account=10, chars= {1}},



		
   })
      LoginNextChar()
      loadProfile()
      loadPaths("__WPL.FileName");
end
</onLoad>
	<!-- #  1 --><waypoint x="-626" z="-5927" y="25">	</waypoint>
	<!-- #  2 --><waypoint x="-613" z="-5837" y="23">		player:target_NPC("Logar Bulletin Board");
	</waypoint>
	<!-- #  3 --><waypoint x="-621" z="-5903" y="25">	</waypoint>
	<!-- #  4 --><waypoint x="-631" z="-5992" y="26">		player:target_NPC("Dell");
	<!-- #  4 --><waypoint x="-631" z="-5992" y="26">         local dqCount, dqPerDay = RoMScript("Daily_count()");
         if 10 > dqCount then relog()
end
	</waypoint>
</waypoints>
i'm useing the dailynote addon so i will automatical take the quest and hand in the mats. But the script has errors like xlm parse and mismatch tag error
anyone can tell me what wrong

Re: rock5's "fastLogin Revisited"

Posted: Tue May 14, 2013 6:12 am
by rock5
__WPL.FileName is a variable that holds the name of the currently loaded waypoint file. So you should use it as a variable, not a string. It should be.

Code: Select all

loadPaths(__WPL.FileName)

Re: rock5's "fastLogin Revisited"

Posted: Tue May 14, 2013 8:31 am
by newton666
ok i'ved changed it but still dosnt work :-

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
   
<onLoad>

function relog()
  SetCharList({
         {account=1, chars= {1}},
         {account=2, chars= {1}},
         {account=3, chars= {1}},
         {account=4, chars= {1}},
         {account=5, chars= {3}},
         {account=6, chars= {3}},
         {account=7, chars= {1}},
         {account=9, chars= {2}},
         {account=10, chars= {1}},



      
   })
      LoginNextChar()
      loadProfile()
      loadPaths(__WPL.FileName);
end
</onLoad>
   <!-- #  1 --><waypoint x="-626" z="-5927" y="25">   </waypoint>
   <!-- #  2 --><waypoint x="-613" z="-5837" y="23">      player:target_NPC("Logar Bulletin Board");
   </waypoint>
   <!-- #  3 --><waypoint x="-621" z="-5903" y="25">   </waypoint>
   <!-- #  4 --><waypoint x="-631" z="-5992" y="26">      player:target_NPC("Dell");
   <!-- #  4 --><waypoint x="-631" z="-5992" y="26">         local dqCount, dqPerDay = RoMScript("Daily_count()");
         if 10 > dqCount then relog()
end
   </waypoint>
</waypoints>

Re: rock5's "fastLogin Revisited"

Posted: Tue May 14, 2013 8:41 am
by rock5

Code: Select all

   <!-- #  4 --><waypoint x="-631" z="-5992" y="26">      player:target_NPC("Dell");
That waypoint is missing the closing tag. Add "</waypoint>" after it.

Re: rock5's "fastLogin Revisited"

Posted: Tue May 14, 2013 11:17 am
by newton666
ok that worked thank rock.
But i have 1 more scripte that is not working.
this one for Andor Trainig Range. the problem is that when it finishes the last wave of adds and gets the score. it will just stop and wont change to next account :-

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>


   --=== User Options ===--


   When_Finished = "charlist"
      -- "end" to end script, "relog" to log next character, "charlist" to log next in 'charlist' and "waypointfilename" to load that waypointfile.

   CharList = {
			{account=1, chars= {1}},
			{account=2, chars= {1}},
			{account=3, chars= {1}},
			{account=4, chars= {1}},
			{account=5, chars= {3}},
			{account=6, chars= {3}},
			{account=7, chars= {1}},
			{account=9, chars= {2}},
			{account=10, chars= {1}},



		}

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


   local kate = GetIdName(121035)  --Kate Wesker
   local magelly = GetIdName(120687)  --Magelly Basac
   

   
   
   --== MINIGAME ==--
   repeat
      player:update()
      if getZoneId() ~= 355 then
         
         local empties = inventory:itemTotalCount(0)
         if 5 > empties then
            -- Wait for user to make some space in inventory.
            cprintf(cli.yellow,"Not much space left in inventory. Are you sure you want to continue with only %d spaces left?\n",empties)
            player:sleep()
         end
         if 30 > inventory:itemTotalCount(203038) then
            print("Not enough Phirius Token Coins.")
            logentry = "Not enough Phirius Token Coins."
         --   checkRelog()
            return
         end

         if player:target_NPC(kate) then
            sendMacro("ChoiceOption(1);");
            yrest(1000);
            waitForLoadingScreen(10)
            if getZoneId() ~= 360 then
            print("Failed to teleport into Ancient Treasure. Maybe you already done it today.")
            logentry = "Failed to teleport into Ancient Treasure. Maybe you already done it today."
            end
         --   checkRelog()
         end


         if player:target_NPC(magelly) then
            yrest(2000);
            sendMacro("ChoiceOption(2);");   --Make it 1 if you want Timed arena
            yrest(2000);
            sendMacro("ChoiceOption(1);");
            yrest(2000);
            sendMacro("ChoiceOption(1);");
            yrest(12000);
            --   checkRelog()
            --   return

         end
      end


      
      repeat
            yrest(10)
         until  player:findNearestNameOrId(106881)
         print("OK event has started")
         repeat
            tort()
            player:update()
            buffed = player:getBuff(622402)
            yrest(10)
         until buffed.Level >= 2800 or not player:hasBuff(622402)
         print("Event finished, end score was "..buffed.Level)
       error("Ending script")
      

    
   until false
   
   
</onLoad>
</waypoints>
what have i missed or did wrong?

Re: rock5's "fastLogin Revisited"

Posted: Tue May 14, 2013 11:24 am
by rock5
Notice that your previous waypoint code has a "relog" function in the onload, then at the end of the file it executes it. Your Andor waypoint file has no relog code or LoginNextChar() command.

Re: rock5's "fastLogin Revisited"

Posted: Tue May 14, 2013 12:36 pm
by newton666
So how would you edit my scripte to make it work?
i'm still new at this sort of thing.

Re: rock5's "fastLogin Revisited"

Posted: Tue May 14, 2013 1:32 pm
by rock5
Just make the relog function, same as the other file, and then call it where ever the script ends. It looks like the code used to have a "checkrelog" function because there are commented "-- checkrelog" throughout but those locations don't look right. If you put the relog command at the end of the file then you will have to get rid of the "error" command.

But, really, you should be asking the person who created the file or asking about it in it's original topic.

Re: rock5's "fastLogin Revisited"

Posted: Mon May 20, 2013 5:45 am
by newton666
Hi rock ive got a problem with this scripte:-

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
   
<onLoad>
  SetCharList({
			{account=1, chars= {1}},
			{account=2, chars= {1}},
			{account=3, chars= {1}},
			{account=4, chars= {1}},
			{account=5, chars= {3}},
			{account=6, chars= {1}},
			{account=7, chars= {1}},
			{account=8, chars= {2}},
			{account=9, chars= {2}},
			{account=10, chars={2,3,6}},


      
   })




</onLoad>
	<!-- #  1 --><waypoint x="4873" z="-1976" y="115">takemeto("VaranasCentral");	 
      LoginNextChar()
      loadProfile()
      loadPaths(__WPL.FileName); </waypoint>
</waypoints>
the problem is that when it goes to account 8 it logs out saying its the last character but from my listing there's still afew more to go ?
anyone know what the problem is?

Re: rock5's "fastLogin Revisited"

Posted: Mon May 20, 2013 6:16 am
by rock5
Everything looks correct. I can't see why it would stop at account 8. Has it only happened once or more than once? Does it happen all the time? Did it log in the correct character, ie. character 2, for account 8? How many times can you change character before the client crashes? Were you close to your limit?

Otherwise we will probably have to add some debug messages to figure out what is happening.

Re: rock5's "fastLogin Revisited"

Posted: Mon May 20, 2013 11:53 am
by newton666
Happens all the time , loads account 8 and correct character does the the script and logs out and then it says last charcter and then it says auto log out?
my limite not sure becsauce it has crashed before.

Re: rock5's "fastLogin Revisited"

Posted: Mon May 20, 2013 2:25 pm
by rock5
How about if you start with account 8? Does it still stop? What happens if you leave out account 8?

Here is a modified file that prints some info when changing character. Lets see if it helps.

Re: rock5's "fastLogin Revisited"

Posted: Mon May 27, 2013 11:00 am
by Niko
I'v made many tryouts, trying to make work the "IsLastChar" function... but hell i don't know how to do it right...

This is what i had before

Code: Select all

local dqCount, dqPerDay = RoMScript("Daily_count()");
    if dqPerDay == dqCount then 
	    if doRelog then
           relog()
		else
		   error("Bot stopped.", 0); 
		end
What i want is, if list is not completed, relog, if it is, to change into another char and start a new waypoint...

I tried to change the "error("Bot stopped.", 0);" line, putting an "if IsLastChar" command, wich failed... i tryed changing the line without the IsLastChar, simply saying to ChangeChar, loadprofile and loadpaths, wich failed too...

Then i saw the IsLastChar should be into the function relog()... so this is what i'v made

Code: Select all

function relog()
        SetCharList({
	{account=6 , chars= {3,4,5,6,7,8}},
	{account=3 , chars= {2}},
	{account=4 , chars= {1}},
	{account=5 , chars= {1}},
	{account=2 , chars= {2}},
         })
	
	if IsLastChar() then
	ChangeChar(2,3)
		loadProfile()
		loadPaths("Minijuegos/DaMJ")
else

	LoginNextChar()
        loadProfile()
        loadPaths("Diarias/Diarias1");
      end
end
But when last char finished, micromacro prints "Bot stopped"...
without login out or anything...

what am i doing wrong?

Thank's

Re: rock5's "fastLogin Revisited"

Posted: Mon May 27, 2013 12:06 pm
by rock5
"Bot stopped" only prints when "doRelog" = nil or false. Under what conditions do you change that value?

Re: rock5's "fastLogin Revisited"

Posted: Mon May 27, 2013 2:49 pm
by Niko
I have this in the <onload>...

Code: Select all

doRelog = true;  -- set to false, if you don't like to run multiple chars
but if doRelog is true, why it answers nil or false?

Anyway, i'll try tomorrow to erase the "if doRelog" part and just relog()...
In that case, the "IsLastChar" should work, isn't it?

Re: rock5's "fastLogin Revisited"

Posted: Tue May 28, 2013 12:15 am
by rock5
Niko wrote:but if doRelog is true, why it answers nil or false?
I'm not sure. You could try changing the variable name to something else, just in case it's being used somewhere else.
Niko wrote:In that case, the "IsLastChar" should work, isn't it?
I can't see anything else wrong with it.

Re: rock5's "fastLogin Revisited"

Posted: Tue May 28, 2013 3:28 pm
by Niko
I just erased the "if doRelog" part and works perfectly ;)