-
lalaxy
- Posts: 46
- Joined: Sun Jul 03, 2011 8:21 pm
#21
Post
by lalaxy » Thu Oct 18, 2012 3:21 am
Hi!
The plan is ready then

I have a few questions there more

I use the gothroughportal to handle the ports...Then i need to change it or write a script inside what check "loadingscreen not appears" number or anything else??? Then drop party...
And then how can i call a returnpath wp only for this case???
And the returnpath's end need to call back the oroginal wp ?
Regards
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#22
Post
by rock5 » Thu Oct 18, 2012 6:42 am
Well GoThroughPortal does everything for you so all you have to do is
Code: Select all
if GoThroughPortal() == false then -- Tries to go through portal and if it fails...
-- Do something if it fails eg.
code to drop party
waitForLoadingScreen()
loadPaths("returnpath")
end
Of course this means it doesn't try to enter the portal again. I guess you could write it so it tries a couple of times before dropping the party but that's harder to write.
- 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.”
-
lalaxy
- Posts: 46
- Joined: Sun Jul 03, 2011 8:21 pm
#23
Post
by lalaxy » Thu Oct 18, 2012 10:23 am
Thy for code, it will be the solution
Additional idea: Can we make a counter or anything what couts the number of gothroughportal? i mean if the false of the gothrough number is 5 or 10 then break only party...In this case we can solve the normal "potral dont work" problem and the "portal isnt there" problem ?
Regards
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#24
Post
by rock5 » Thu Oct 18, 2012 11:00 am
Like I said, that is a little more tricky, but ok if your interested.
This is how you do it. First, lets say the waypoint where the GotThroughPortal is is waypoint #10. At waypoint #8 you would initialize a variable, lets call it "tries"
Then at waypoint #10 you could do.
Code: Select all
tries = tries + 1
if GoThroughPortal() == false then -- Tries to go through portal and if it fails...
-- Do something if it fails
if tries > 5 then
code to drop party
waitForLoadingScreen()
loadPaths("returnpath")
else
__WPL:setWaypointIndex(__WPL.LastWaypoint - 1)
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.”
-
lalaxy
- Posts: 46
- Joined: Sun Jul 03, 2011 8:21 pm
#25
Post
by lalaxy » Thu Oct 18, 2012 11:13 am
Excellent!
Mybe a stupid question:
Code: Select all
if GoThroughPortal() == false then -- Tries to go through portal and if it fails...
tries = tries + 1
if tries > 5 then
code to drop party
waitForLoadingScreen()
loadPaths("returnpath")
else
__WPL:setWaypointIndex(__WPL.LastWaypoint - 1)
end
end
Not this way ? (tries+ moved under "if" code)
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#26
Post
by rock5 » Thu Oct 18, 2012 1:37 pm
Doesn't really make that much difference. If the portal works then it's not going to need the variable any way. But I guess your way is the right way because you don't need to increment the variable unless it fails.
- 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.”
-
lalaxy
- Posts: 46
- Joined: Sun Jul 03, 2011 8:21 pm
#27
Post
by lalaxy » Thu Oct 18, 2012 5:08 pm
Many thx for all for this all help...I hope i dont bother u with more problems...(hope all will works fine for a long time)

Regards
Who is online
Users browsing this forum: Google [Bot], Semrush [Bot] and 0 guests