Page 1 of 1

Swapping account

Posted: Tue Aug 30, 2011 2:13 am
by D1mAnn
Hi, I need a function swap account, if the next character = 8
Here are some of my code, that offer?

Code: Select all

<waypoint x="31896" z="4530" tag="Home">
		sendMacro("CloseWindows()"); yrest(100);
		sendMacro("}LoginNextToon=true;a={")
		sendMacro("Logout();");
		waitForLoadingScreen();
		player:update();
		repeat zoneid = RoMScript("GetZoneID()") until zoneid
		if zoneid == 12 then __WPL:setWaypointIndex(__WPL:findWaypointTag("Elf"))
		else __WPL:setWaypointIndex(__WPL:findWaypointTag("Varanas")); 
		end
		player:update();
</waypoint>

Re: Swapping account

Posted: Tue Aug 30, 2011 6:10 am
by D1mAnn
and why don't work code:

Code: Select all

if conditionMet then
	CharacterNumber = CharacterNumber + 1
	if( CharacterNumber > 8 ) then
	CurrentAccNum = CurrentAccNum + 1
	if( fastLoginAccNames[CurrentAccNum] == nil ) then
	sendMacro("AccountLogin_Exit();");
	else
	CharacterNumber = 1
		sendMacro("}fastLoginUser=\"" .. fastLoginAccNames[CurrentAccNum] .. "\";a={");
		yrest(100);
		sendMacro("}fastLoginPass=\"" .. fastLoginAccNames[CurrentAccNum] .. "\";a={");
		yrest(100);
		sendMacro("}fastLoginChrSel=" .. CharacterNumber .. ";a={");
		yrest(100);
		sendMacro("}fastLoginTriedOnce=false;a={");
		yrest(100);
		sendMacro("}fastLoginLoggedIn=false;a={");
		yrest(100);
		sendMacro("CharacterSelect_Exit();");
		end
	else
		sendMacro("}LoginNextToon=true;a={");
		yrest(500);
		sendMacro("Logout();");
		waitForLoadingScreen();
		end
	end
	player:update();

Re: Swapping account

Posted: Tue Aug 30, 2011 8:09 am
by rock5
Please people, no more "it doesn't work" posts. I'm getting tired of having to ask "What did you do? What happened?". Am I supposed to read your mind?

Re: Swapping account

Posted: Tue Aug 30, 2011 8:23 am
by D1mAnn
rock5 wrote:Please people, no more "it doesn't work" posts. I'm getting tired of having to ask "What did you do? What happened?". Am I supposed to read your mind?
this code from http://www.solarstrike.net/phpBB3/viewt ... t=swap+acc
I want to run 2 counter command (LoginNextToon) and (fastLoginUser) if command run > 8 do fastLoginUser counter +1 and change account

Re: Swapping account

Posted: Tue Aug 30, 2011 9:02 am
by rock5
I don't think that function was ever made to work properly.

The way the functions work was complex and very confusing when I work on the auto login. If I'm going to delve into it again, I'll only do it to rewrite the whole of the autologin, not just to try to figure out how to patch a problem that probably wont work anyway.

To tell you the truth, at this stage I am tempted to do the rewrite. I'll look into it tomorrow.

Re: Swapping account

Posted: Tue Aug 30, 2011 10:58 am
by D1mAnn
maybe make addon counter?

Re: Swapping account

Posted: Wed Aug 31, 2011 4:37 am
by D1mAnn
it's work

onLoad

Code: Select all

Account = 1;
AccountPass = 1;
Charcount = 1;
fastLoginAccNames={"acc1","acc2","acc3","acc4","acc5","acc6"};
fastLoginAccPass={"pass1","pass2","pass3","pass4","pass5","pass6"};
Waypoint

Code: Select all

if(Charcount > 0) then
Charcount = Charcount + 1
printf("Character %d of account %s has completed task!\n", Charcount, fastLoginAccNames[Account]);
end
if(9 > Charcount) then
sendMacro("}LoginNextToon=true;a={");
yrest(500);
sendMacro("Logout();");
waitForLoadingScreen();
player:update();
end
if(Charcount > 8) then
Account = Account + 1
AccountPass = AccountPass + 1
Charcount = 1
sendMacro("}fastLoginUser=\"" .. fastLoginAccNames[Account] .. "\";a={");
yrest(100);
sendMacro("}fastLoginPass=\"" .. fastLoginAccPass[AccountPass] .. "\";a={");
yrest(100);
sendMacro("}fastLoginChrSel=" .. Charcount .. ";a={");
yrest(100);
sendMacro("}fastLoginTriedOnce=false;a={");
yrest(100);
sendMacro("}fastLoginLoggedIn=false;a={");
yrest(100);
sendMacro("}fastLoginAutoEnter=true;a={");
yrest(100);
sendMacro("}fastLoginAutoLogin=true;a={");
yrest(100);
sendMacro("}fastLoginRelog=true;a={");
yrest(100);
sendMacro("}fastLoginNoZoom=true;a={");
yrest(100);
sendMacro("CharacterSelect_Exit();");
waitForLoadingScreen();
player:update();
end

Re: Swapping account

Posted: Wed Aug 31, 2011 5:11 am
by D1mAnn
now we need to see if Account> 6 bot goes into sleep mode, and run after a reset Daily
about this it should look like

Code: Select all

if(7 > Account) then
sendMacro("Logout();")
repeat
time = os.time
if(time = 6.00 am) then CharacterSelect_EnterWorld()
Account = 1
AccountPass = 1
else rest(60)
until time
end
end