Scripting problems, need help
Re: Scripting problems, need help
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
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
Re: Scripting problems, need help
Well GoThroughPortal does everything for you so all you have to do is
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.
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
- 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
Re: Scripting problems, need help
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
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
Re: Scripting problems, need help
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.
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"
Code: Select all
tries = 0
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.”
- Ronald Reagan
Re: Scripting problems, need help
Excellent!
Mybe a stupid question:
Not this way ? (tries+ moved under "if" code)
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
Re: Scripting problems, need help
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.”
- Ronald Reagan
Re: Scripting problems, need help
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
Regards
Who is online
Users browsing this forum: No registered users and 4 guests