help "repeat syntax"

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
flashgump
Posts: 15
Joined: Fri Sep 23, 2011 10:49 am

help "repeat syntax"

#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

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: help "repeat syntax"

#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

Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

flashgump
Posts: 15
Joined: Fri Sep 23, 2011 10:49 am

Re: help "repeat syntax"

#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

Re: help "repeat syntax"

#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 :D i think

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: help "repeat syntax"

#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.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 0 guests