Fast login

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Fast login

#1 Post by ZZZZZ »

When using fast login i get this error:

Code: Select all

Moving to waypoint #13, (4778, -2014)
Changing to character 1 account 3.
Player address changed: 0x2CCF0F00
Maximum range of range attack skills is less than COMBAT_DISTANCE 70. Reducing C
OMBAT_DISTANCE setting to 50.
Maximum range of range attack skills is less than COMBAT_DISTANCE 70. Reducing C
OMBAT_DISTANCE setting to 50.
Maximum range of range attack skills is less than COMBAT_DISTANCE 70. Reducing C
OMBAT_DISTANCE setting to 50.
Maximum range of range attack skills is less than COMBAT_DISTANCE 70. Reducing C
OMBAT_DISTANCE setting to 50.
Loading profile userdefault.xml
Testing 'ingamefunctions' macro. If it gets stuck here, please update the 'ingam
efunctions' by copying the 'ingamefunctions' folder from 'rom/devtools' to the g
ames 'interface/addons' folder.
MACRO Test: ok
Ranged skill found: PRIEST_RISING_TIDE
The game client did not crash.
3:18pm - [string "              LoginNextChar()..."]:3: attempt to index global
'D' (a nil value)
Im lost as to what is causing it, i have the fastlogin userfunction and in onload i have

Code: Select all

<onLoad>
SetCharList({{
			{account=13, chars= {1}},
			{account=14, chars= {1}},
		},
		{
			{account=1, chars= {1,4,5}},
			{account=2, chars= {1,2,6}},
			{account=3, chars= {1,2,3}},
}})
</onLoad>

Code: Select all

	<!-- #  3 --><waypoint x="4805" z="-1988" y="115">		
	LoginNextChar()
		loadProfile()
   	  loadPaths(D.H-Survival)
	</waypoint>
Any info would be great, thanks.
User avatar
Eggman1414
Posts: 111
Joined: Sun Jun 17, 2012 2:27 pm

Re: Fast login

#2 Post by Eggman1414 »

loadPaths(D.H-Survival)
That seems to be your error.

The reason
attempt to index global
'D'
Your path is reading as D.H-Survival, like cmd.exe H-Survival is .exe

I believe thats the reason. Im sure someone will correct me if it is wrong.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Fast login

#3 Post by rock5 »

Actually I think it is seeing it as 2 variables, D.H and Survival, and it is seeing it as a mathematical calculation, D.H minus Survival. The error you get is because D doesn't exist as a table so it can't have a sub value of H. Try putting quotes around the name. If it still doesn't work it might be because it's not a valid file name, so try renaming it.
  • 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
ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: Fast login

#4 Post by ZZZZZ »

I never would have guessed that >.< Using "D.H-Survival" worked, thanks guys.
ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: Fast login

#5 Post by ZZZZZ »

Also, rather than starting a new thread figured i would ask here, is it possible to check for a mount, and if you dont have one use mount rental tickets until you get a 7 day mount?

something like:

Code: Select all

If player has mount then
player:mount();
else
repeat
   inventory:update();
   if inventory:itemTotalCount("Horse Rental Ticket") > 0 then
     inventory:useItem("Horse Rental Ticket");
	end
   until inventory:itemTotalCount("Horse Rental Ticket") == 0 or inventory:itemTotalCount(202095,202455,202246) > 0  -- the three 7 day horses from rental tickets.
end
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Fast login

#6 Post by rock5 »

There is inventory:getMount() but that doesn't cover partner bags. So this should tell you if you have a mount

Code: Select all

	if RoMScript("PartnerFrame_GetPartnerCount(2)") > 0 or inventory:getMount() then
		player:mount()
The rest of it looks ok although you could simplify it. You don't need inventory:update() because both itemTotalCount and useItem update it. You don't even need to count the tickets. There is no harm in trying to use an item you don't have. So you could finish it like this

Code: Select all

else
	repeat
		inventory:useItem("Horse Rental Ticket");
	until inventory:itemTotalCount("Horse Rental Ticket") == 0 or inventory:itemTotalCount(202095,202455,202246) > 0  -- the three 7 day horses from rental tickets.
end
Or to avoid using a ticket when you don't have one, anyway, you could do,

Code: Select all

else
	while inventory:itemTotalCount("Horse Rental Ticket") >0 and inventory:itemTotalCount(202095,202455,202246) == 0  do -- the three 7 day horses from rental tickets.
		inventory:useItem("Horse Rental Ticket");
	end
end
  • 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
ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: Fast login

#7 Post by ZZZZZ »

Thanks again Rock, made it into a function, had some issues with finding the mount just after loading in a new character with fastlogin but added player:update() and inventory:update(). Wasn't sure which 1 updates partner bag so did both to be safe.

Code: Select all

function MOUNT()
	   player:update()
	   inventory:update();
	if RoMScript("PartnerFrame_GetPartnerCount(2)") > 0 or inventory:getMount() then
     		player:mount()
		yrest(500)
else
   repeat
      inventory:useItem("Horse Rental Ticket");
   until inventory:itemTotalCount("Horse Rental Ticket") == 0 or inventory:itemTotalCount(202095) > 0 or inventory:itemTotalCount(202455) > 0 or inventory:itemTotalCount(202246) > 0  -- the three 7 day horses from rental tickets.
	player:mount()
	yrest(500)
end
end
Tried the

Code: Select all

else
   while inventory:itemTotalCount("Horse Rental Ticket") >0 and inventory:itemTotalCount(202095,202455,202246) == 0  do -- the three 7 day horses from rental tickets.
      inventory:useItem("Horse Rental Ticket");
   end
end
version first but it errored out for some reason.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Fast login

#8 Post by rock5 »

ZZZZZ wrote:had some issues with finding the mount just after loading in a new character
That may just be because you need to wait a bit before everything is ready. Some servers are like that. I always add a rest(3000) after any change characters or any waitForLoadingScreens().
ZZZZZ wrote:version first but it errored out for some reason.
I assumed you wrote it like that because it worked. I remember doing something like that so assumed it was this function. I didn't check. Looks like you can't. You have to do 1 at a time.
  • 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
Post Reply