Page 1 of 1

errors Portaling

Posted: Sat Oct 17, 2009 9:28 pm
by j_schlott
i made a post about this in the past, pausing the bot while portaling into/out of house

i was told player:rest() wasnt a real pause of the bot, but someone changed player:rest, and then that code worked for a while

but recently i get an error again while using the teleporter/ house port:
...classes/pawn.lua:198: bad argument #1 to "bitAnd' <<null>>
its not a time thing, i have it resting for over a minute, and the bot breaks sometimes if the portal takes as little as 5-10seconds

gonna try yrest, i figured i would post to see if thats the correct way to go

Re: errors Portaling

Posted: Fri Nov 06, 2009 2:19 am
by raff
for resting you can use this command:

Code: Select all

yrest(10000);
and after teleport, i would do a

Code: Select all

player:update();
i use this for enter a house:

Code: Select all

player:target_NPC("npcname");
		sendMacro("ChoiceOption(1);");
		yrest(25000);
		player:update();
If you want to enter a house for changing class, you can now change the class without enter the house, just talk to the housemaid and choose the class switch option

Re: errors Portaling

Posted: Fri Nov 06, 2009 11:58 am
by j_schlott
ive been using yrest and have not got an error so i figured that was the way to go

ill try the update thing if i start to get errors with this. thanks=P

and YES! you can change classes outside house!
that will make handing dailies in on my lower lvl secondary classes very easy!
streamline or the function i posted in the stickied waypoint/DQ thread makes changin classes easy

Re: errors Portaling

Posted: Fri Nov 06, 2009 12:25 pm
by d003232
j_schlott wrote:ive been using yrest and have not got an error so i figured that was the way to go

ill try the update thing if i start to get errors with this. thanks=P

and YES! you can change classes outside house!
that will make handing dailies in on my lower lvl secondary classes very easy!
streamline or the function i posted in the stickied waypoint/DQ thread makes changin classes easy
yrest is the right way. Because that really stops the update process of the bot. If you try to update memory addresses during the load screen you will get errors. And the 'player:...' functions still updates the memory. So the bot would crash.