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
<!-- 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
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
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
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
<!-- 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
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.
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.