-
flashgump
- Posts: 15
- Joined: Fri Sep 23, 2011 10:49 am
#1
Post
by flashgump » Wed Feb 08, 2012 11:38 am
hello all
I wonder if it would be possible to make a syntax that only repeated 3 times?
ex:
Code: Select all
<!-- # 12 --><waypoint x="1696" z="2891" y="433" tag="Out1">
findzi()
local zoneid = RoMScript("GetZoneID()") -------------------------|
if zoneid == zid then |---------------------> repeat this action just 3 times
__WPL:setWaypointIndex(__WPL:findWaypointTag("Out1")) |
end -----------------------------|
ireset() -----------------------------------------------------------------|
cprintf(cli.lightred, " --=== !!! Portail FAIL - Leave party go OUT !!! ===--\n") |
waitForLoadingScreen(30) |------> if loadingscreen didin't appear he do this action
loadPaths("dodreturn"); -------------------------------------------------|
end
</waypoint>
I do not know how this syntax and if it is realizable?
because occasionally the exit portal of the instance is not.
thanks for help
-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#2
Post
by lisa » Wed Feb 08, 2012 12:32 pm
Code: Select all
local times = 0
reapeat
--some code here
times = times + 1
until times == 3
-
flashgump
- Posts: 15
- Joined: Fri Sep 23, 2011 10:49 am
#3
Post
by flashgump » Wed Feb 08, 2012 1:45 pm
Code: Select all
<!-- # 12 --><waypoint x="1696" z="2891" y="433" tag="Out1">
local times = 0
reapeat
findzi()
local zoneid = RoMScript("GetZoneID()")
if zoneid == zid then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Out1"))
end
times = times + 1
until times == 3
ireset()
cprintf(cli.lightred, " --=== !!! Portail FAIL - Leave party go OUT !!! ===--\n")
waitForLoadingScreen(30)
loadPaths("dodreturn");
end
</waypoint>
like that?
-
flashgump
- Posts: 15
- Joined: Fri Sep 23, 2011 10:49 am
#4
Post
by flashgump » Wed Feb 08, 2012 5:04 pm
Code: Select all
<!-- # 12 --><waypoint x="1696" z="2891" y="433" tag="Out1">
local times = 0
local zoneid = RoMScript("GetZoneID()")
repeat
findzi()
if zoneid == zid then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Out1"))
times = times + 1
elseif
times = 3
end
until times == 3
ireset()
cprintf(cli.lightred, " --=== !!! Portail FAIL - Leave party go OUT !!! ===--\n")
waitForLoadingScreen(30)
loadPaths("dodreturn");
end
</waypoint>
like this is better
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
i think
-
lisa
- Posts: 8332
- Joined: Tue Nov 09, 2010 11:46 pm
- Location: Australia
#5
Post
by lisa » Wed Feb 08, 2012 6:57 pm
have you tried using the function
getZoneId()
Code: Select all
<!-- # 12 --><waypoint x="1696" z="2891" y="433" tag="Out1">
local times = 0
repeat
findzi()
if getZoneId() == zid then
__WPL:setWaypointIndex(__WPL:findWaypointTag("Out1"))
times = times + 1
elseif
times = 3
end
until times == 3
ireset()
cprintf(cli.lightred, " --=== !!! Portail FAIL - Leave party go OUT !!! ===--\n")
waitForLoadingScreen(30)
loadPaths("dodreturn");
end
</waypoint>
--=== Added ===--
Actually this usage is no good.
you add a times but then tell it to use the same waypoint again, so it will reset times to 0, so basically there is no point in the count as it will never actually count. You may aswell just use a true or false variable.
Who is online
Users browsing this forum: Bing [Bot] and 0 guests