rock5's "fastLogin Revisited"

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.
Message
Author
User avatar
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: rock5's "fastLogin Revisited"

#661 Post by Desmond » Thu Feb 27, 2014 5:13 pm

Hi How to make the bot after bot 10daily switch to another character is there but how to make the bot as all characters on an account held switch to another account?

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
		local Sender = "Sender"					<!-- Name of Sender -->
		local text = ""		<!-- Message -->
		RoMScript("SendChatMessage(\'"..text.."\', 'ZONE', 0, \'"..Sender.."\');");
		yrest(5000);							<!-- wait time -->
		repeat
			player:target_NPC("")
			CompleteQuestByName("")
			if RoMScript("Daily_count()") == 10 then
                        RoMScript("LeaveParty();");
				ChangeChar()
				loadPaths(__WPL.FileName)
				RoMScript("SendChatMessage(\'"..text.."\', 'ZONE', 0, \'"..Sender.."\');");
				yrest(5000);							<!-- wait time -->
			end
			AcceptQuestByName("")
			yrest(500)							<!-- wait time -->			
		      until false
</onLoad>
</waypoints>

masstic1es
Posts: 19
Joined: Thu Feb 13, 2014 11:11 pm

Re: rock5's "fastLogin Revisited"

#662 Post by masstic1es » Thu Feb 27, 2014 9:59 pm

So I'm trying to consolidate my code and make it less bulky. Which means having different accounts do different sub tasks in the same run.

Code: Select all

function checkitems()
	tusk = inventory:itemTotalCount(200624)
	claw = inventory:itemTotalCount(200609)
		if getAcc() == {1,2,3} then
			if (5>tusk) then
				__WPL:setWaypointIndex(__WPL:findWaypointTag("boar"))
			else
				__WPL:setWaypointIndex(__WPL:findWaypointTag("dailys"))
			end
		elseif getAcc() == {4,5,6} then
			if (5>claw) then
				__WPL:setWaypointIndex(__WPL:findWaypointTag("bear"))
			else
				__WPL:setWaypointIndex(__WPL:findWaypointTag("dailys"))
			end
		end
end
The problem is maybe i'm not using the getAcc() function right? or maybe its not doing what I want it to? But basically, I need it to check item count, and send off to gather more if it doesn't have enough, otherwise it will start the daily turn in loop. Problem is, all it does is the daily turn in loop. I think its completely glossing over this section and saying nothing applies (which is why I say that I may be using getAcc() wrong)

update:
Apperantly changing

Code: Select all

if getAcc() == {1,2,3} then
with

Code: Select all

if getAcc() == 1 or 2 or 3 then
works

update 2: Nope, I thought it worked til i ran multiple accts through. everyone goes through the first (boar) path

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

Re: rock5's "fastLogin Revisited"

#663 Post by rock5 » Fri Feb 28, 2014 12:41 am

Desmond wrote:Hi How to make the bot after bot 10daily switch to another character is there but how to make the bot as all characters on an account held switch to another account?
Just use SetCharList and LoginNextChar as discussed in lots of places and in this topic.
masstic1es wrote:if getAcc() == {1,2,3} then
getAcc returns a number. {1,2,3} is a table. So you are comparing a number to a table. Can't be done.
masstic1es wrote:if getAcc() == 1 or 2 or 3 then
This is wrong. This is the same as saying

Code: Select all

if (getAcc() == 1) or (2) or (3) then
In Lua any value that is not false or nil is treated as true. So (2) and (3) are both seen as true. Which means the whole line will always be true. What you meant was

Code: Select all

if getAcc() == 1 or getAcc() == 2 or getAcc() == 3 then
You can also use table.contains, especially if it's a long list.

Code: Select all

if table.contains({1,2,3},getAcc()) 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

masstic1es
Posts: 19
Joined: Thu Feb 13, 2014 11:11 pm

Re: rock5's "fastLogin Revisited"

#664 Post by masstic1es » Fri Feb 28, 2014 12:52 am

Desmond wrote:Hi How to make the bot after bot 10daily switch to another character is there but how to make the bot as all characters on an account held switch to another account?

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
		local Sender = "Sender"					<!-- Name of Sender -->
		local text = ""		<!-- Message -->
		RoMScript("SendChatMessage(\'"..text.."\', 'ZONE', 0, \'"..Sender.."\');");
		yrest(5000);							<!-- wait time -->
		repeat
			player:target_NPC("")
			CompleteQuestByName("")
			if RoMScript("Daily_count()") == 10 then
                        RoMScript("LeaveParty();");
				ChangeChar()
				loadPaths(__WPL.FileName)
				RoMScript("SendChatMessage(\'"..text.."\', 'ZONE', 0, \'"..Sender.."\');");
				yrest(5000);							<!-- wait time -->
			end
			AcceptQuestByName("")
			yrest(500)							<!-- wait time -->			
		      until false
</onLoad>
</waypoints>

You need to set your char list (see the first post) and than call it with a proc after you daily loop is complete.

Code: Select all

<OnLoad>

<!-- Autologin script -->
function relog()
	SetCharList({{
	{account=1 , chars= {}},
	{account=2 , chars= {}},
	{account=3 , chars= {}},
},{
	{account=4 , chars= {}},
	{account=5 , chars= {}},
	{account=6 , chars= {}},
}})
	LoginNextChar()
	yrest(3000)
	player:update()
	loadProfile()
	loadPaths("waypoint");
end
</OnLoad>

Code: Select all

function checkdaily()
local dailyQuestCount, dailyQuestsPerDay = RoMScript("Daily_count()");
	if dailyQuestsPerDay == dailyQuestCount then
      relog()
	else
		printf("You've done "..dailyQuestCount.." of " .. dailyQuestsPerDay .. " Daily Quests.\n");
	end
end

masstic1es
Posts: 19
Joined: Thu Feb 13, 2014 11:11 pm

Re: rock5's "fastLogin Revisited"

#665 Post by masstic1es » Fri Feb 28, 2014 12:01 pm

rock5 wrote:
Desmond wrote:Hi How to make the bot after bot 10daily switch to another character is there but how to make the bot as all characters on an account held switch to another account?
Just use SetCharList and LoginNextChar as discussed in lots of places and in this topic.
masstic1es wrote:if getAcc() == {1,2,3} then
getAcc returns a number. {1,2,3} is a table. So you are comparing a number to a table. Can't be done.
masstic1es wrote:if getAcc() == 1 or 2 or 3 then
This is wrong. This is the same as saying

Code: Select all

if (getAcc() == 1) or (2) or (3) then
In Lua any value that is not false or nil is treated as true. So (2) and (3) are both seen as true. Which means the whole line will always be true. What you meant was

Code: Select all

if getAcc() == 1 or getAcc() == 2 or getAcc() == 3 then
You can also use table.contains, especially if it's a long list.

Code: Select all

if table.contains({1,2,3},getAcc()) then
Rock, you rock. :P

worked like a charm!

User avatar
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: rock5's "fastLogin Revisited"

#666 Post by Desmond » Fri Feb 28, 2014 7:20 pm

SetCharList LoginNextChar And where I must ето insert?

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

Re: rock5's "fastLogin Revisited"

#667 Post by rock5 » Fri Feb 28, 2014 10:37 pm

Desmond wrote:SetCharList LoginNextChar And where I must ето insert?
LoginNextChar logs into the next character. So obviously you insert it where you want it to log into the next character.
  • 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
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: rock5's "fastLogin Revisited"

#668 Post by Desmond » Sat Mar 01, 2014 7:44 am

ChangeChar() It costs already well But as to do that did change an account?

User avatar
Eggman1414
Posts: 111
Joined: Sun Jun 17, 2012 2:27 pm

Re: rock5's "fastLogin Revisited"

#669 Post by Eggman1414 » Sat Mar 01, 2014 8:43 am

ChangeChar() It costs already well But as to do that did change an account?
Have no idea what that said?

Are you asking will it change accounts?
If so, yes it will. It can change to any character on any account you have set up in the config files.

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

Re: rock5's "fastLogin Revisited"

#670 Post by rock5 » Sat Mar 01, 2014 8:44 am

Desmond wrote:ChangeChar() It costs already well But as to do that did change an account?
Um... I didn't understand that. Please try again.
  • 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
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: rock5's "fastLogin Revisited"

#671 Post by Desmond » Sat Mar 01, 2014 9:03 am

I am necessary as 8 personages will pass on an account an account was replaced

User avatar
Eggman1414
Posts: 111
Joined: Sun Jun 17, 2012 2:27 pm

Re: rock5's "fastLogin Revisited"

#672 Post by Eggman1414 » Sat Mar 01, 2014 9:30 am

Desmond wrote:I am necessary as 8 personages will pass on an account an account was replaced
Ummm what? Post it your own language. Maybe it will be easier to translate...

User avatar
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: rock5's "fastLogin Revisited"

#673 Post by Desmond » Sat Mar 01, 2014 10:26 am

I and through interpreter I translate e

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

Re: rock5's "fastLogin Revisited"

#674 Post by rock5 » Sat Mar 01, 2014 8:44 pm

I think you are saying you want to change accounts when you finish the characters on the current account. The functions I told you about are the ones you want to use.

Code: Select all

setCharList({
   {account=1 , chars= {1,2,3,4,5,6,7,8}},
   {account=2 , chars= {1,2,3,4,5,6,7,8}},
   {account=3 , chars= {1,2,3,4,5,6,7,8}},
})
loginNextChar()
This example will go through all the characters in account 1, 2 and 3.
  • 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
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: rock5's "fastLogin Revisited"

#675 Post by Desmond » Sat Mar 01, 2014 9:08 pm

Thank you! so I did
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
local Sender = "Sender" <!-- Name of Sender -->
local text = "об" <!-- Message -->
RoMScript("SendChatMessage(\'"..text.."\', 'ZONE', 0, \'"..Sender.."\');");
yrest(5000); <!-- wait time -->
repeat
player:target_NPC("Отважный Бидер")
CompleteQuestByName("Героическая оборона")
if RoMScript("Daily_count()") == 10 then
RoMScript("LeaveParty();");
SetCharList({
{account=1 , chars= {}},
{account=2 , chars= {}},
{account=3 , chars= {}},
{account=4 , chars= {}},
})

local channel = RoMScript("GetCurrentParallelID()");
if ( 3 > channel) then
channel = channel + 1;
else
channel = 1;
end;
RoMScript("UserSelectedChannel = "..channel)

LoginNextChar();
loadPaths(__WPL.FileName)
RoMScript("SendChatMessage(\'"..text.."\', 'ZONE', 0, \'"..Sender.."\');");
yrest(5000); <!-- wait time -->
end
AcceptQuestByName("Героическая оборона")
yrest(500) <!-- wait time -->
until false
</onLoad>
</waypoints>

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

Re: rock5's "fastLogin Revisited"

#676 Post by rock5 » Sun Mar 02, 2014 7:33 am

Please remember to put code in

Code: Select all

 tags.

I think this line wont work.
[quote]RoMScript("UserSelectedChannel = "..channel)[/quote]RoMScript can gets values ok, eg. variable values or values returned from functions but it has problems executing code.

The old way of fixing it is to do it like this
[code]RoMScript("} UserSelectedChannel = "..channel.." a={")
An easier option is to use the RoMCode function which does this for you

Code: Select all

RoMCode("UserSelectedChannel = "..channel)
An even easier solution is to use a function available in the loginnextchar userfunction.

Code: Select all

SetChannelForLogin(channel)
  • 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
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: rock5's "fastLogin Revisited"

#677 Post by Desmond » Sun Mar 02, 2014 10:01 am

Boat begin to go across not натех personages a тоесть boat is small to pass to 8а пепешел on 3 пожже on 5 that error?

883Dman
Posts: 90
Joined: Sat Dec 08, 2012 9:25 pm

Re: rock5's "fastLogin Revisited"

#678 Post by 883Dman » Mon Mar 10, 2014 3:27 pm

Another one kicking my butt. I have a WP file called leave AT. It has my character travel from AT to Sarlo. When they get to sarlo I want them to switch to next character/acct and load the path to get to Malatina in varanas central. Next character line is crashing out. "Failure to load waypoint xxx" where xxx is the line where I call nextchar.

Code: Select all

<!-- #  7 --><waypoint x="-18698" z="-2463" y="821">	
	 SetCharList({ -- example character list
     {account=4, chars= {2,3,6}},   	
     {account=3, chars= {1}},   
    {account=8, chars= {1}},      
 {account=7, chars= {2}}, 
		  
    })
	
    LoginNextChar()
	loadPaths("tominis")
end

	</waypoint>

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

Re: rock5's "fastLogin Revisited"

#679 Post by lisa » Mon Mar 10, 2014 6:28 pm

the end will make it crash as soon as it gets to that waypoint, remove the end and it might work.
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

883Dman
Posts: 90
Joined: Sat Dec 08, 2012 9:25 pm

Re: rock5's "fastLogin Revisited"

#680 Post by 883Dman » Mon Mar 10, 2014 6:37 pm

i've tried with and and without. Same result.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests