character not in _ zone

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
madgamer
Posts: 18
Joined: Sat Oct 01, 2011 1:34 pm

character not in _ zone

#1 Post by madgamer » Sat Nov 05, 2011 5:13 pm

hello been messing around with we scripts and was curious if there was a different way i could check to see if my character is a specific zone, for this script i am looking if character is in Logar

Code: Select all

<!-- Are you Prob not in zone -->
	if (player.Level > 50) or ((zoneid ~= 1001) and (zoneid ~= 1)) then
	printf(" .. We are in %s ..\n", zoneid);
	printf("This character probably Is Not in zone going to next!\n");
	nextplease()
	end
problem is that sometimes for whatever reason sometimes a character will be in Logar but both zoneid 1001 and 1 will be nil and cause error (low level char in logar will think its in limbo and log out)

is there a way to use words for zone check like "Logar" or "Kalin Shrine" etc

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

Re: character not in _ zone

#2 Post by rock5 » Sat Nov 05, 2011 8:34 pm

How and where are you getting the zoneid value?
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: character not in _ zone

#3 Post by lisa » Sat Nov 05, 2011 9:12 pm

madgamer wrote:sometimes a character will be in Logar but both zoneid 1001 and 1 will be nil
Assuming you use

Code: Select all

local zoneid = RoMScript("GetZoneID()")
If you are at the loading screen when checking zone with RoMScript it will error as you can't perform RoMScripts while at loadingscreen.
That is the only time I can think of where it wouldn't return the correct zone number but would instead error out.
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

madgamer
Posts: 18
Joined: Sat Oct 01, 2011 1:34 pm

Re: character not in _ zone

#4 Post by madgamer » Sun Nov 06, 2011 2:02 am

yes im using

Code: Select all

local zoneid = RoMScript("GetZoneID()")
right on, maybe being that its on the OnLoad section it might initizatize b4 the characters all the way in maybe

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

Re: character not in _ zone

#5 Post by rock5 » Sun Nov 06, 2011 2:24 am

I'm assuming you are reloading a character. You should be waiting until the the character is fully loaded before reloading the waypoint file. Typically you would use

Code: Select all

waitForLoadingScreen()
After logging off and before reloading the waypoint file.
  • 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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: character not in _ zone

#6 Post by lisa » Sun Nov 06, 2011 2:29 am

I generally have this

Code: Select all

		sendMacro("}LoginNextToon=true;a={")
        sendMacro("Logout();"); 
		waitForLoadingScreen();
        loadPaths("WPname");
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

madgamer
Posts: 18
Joined: Sat Oct 01, 2011 1:34 pm

Re: character not in _ zone

#7 Post by madgamer » Sun Nov 06, 2011 2:57 am

add

Code: Select all

 
local zoneid = RoMScript("GetZoneID()")
printf(" .. We are in %s ..\n", zoneid);
to the <OnLoad> of that lisa and "sometimes" the zoneid comes out a third option
not 1001 and not 1 for logar for example but error.

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

Re: character not in _ zone

#8 Post by lisa » Sun Nov 06, 2011 3:17 am

Hmm how often does it happen?
I just went to logar and went in and out of house repeatedly, in and out of millers repeatedly. It always print 1, I did it in game though with

Code: Select all

/script SendSystemChat(GetZoneID())
Maybe you can try with the function I added for zone id

Code: Select all

<!-- Are you Prob not in zone -->
   if (player.Level > 50) or ((getZoneId() ~= 1001) and (getZoneId() ~= 1)) then
   printf(" .. We are in %s ..\n", zoneid);
   printf("This character probably Is Not in zone going to next!\n");
   nextplease()
   end

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

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

Re: character not in _ zone

#9 Post by rock5 » Sun Nov 06, 2011 3:29 am

It would be nice to know what error you get.

But I was just thinking, it might be possible that if you change character then immediately do a RoMScript that the macro key might not be setup properly yet. Normally the macros are set up again when it detects a diffent chatacter is loaded. That usually happens when 'player' is updated.

So try doing a 'player:update()' just after changing character, then try checking the zone. Although, if what I say above is true, then getting the zone id from memory, like lisa said, will also work.
  • 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

madgamer
Posts: 18
Joined: Sat Oct 01, 2011 1:34 pm

Re: character not in _ zone

#10 Post by madgamer » Sun Nov 06, 2011 3:29 am

sounds good, ill try that version and see if it works.
my problem coulda been from a not fully updated bot from a past patch, its def been awhile since ive tryed this.

thx again

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 0 guests