Yoko

All sides of Injection
It is currently 2017-11-23 20:48:29

All times are UTC+02:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Repeat Loops script?
PostPosted: 2008-07-27 20:57:15 
Offline

Joined: 2008-07-25 07:57:51
Posts: 6
How do I make the script repeat itself, so I don't have to press short cut key to have it run everytime.

I tried putting repeat in the script, but when I run the script, it stops. I want it to keep running for a macro.


Top
   
 Post subject:
PostPosted: 2008-07-28 07:31:53 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3211
Code:
sub main()
repeat
    uo.print( "Hello world!" )
    wait( 1000 )
until false
endsub


if i correctly understand...

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2008-07-28 08:46:08 
Offline

Joined: 2008-07-25 07:57:51
Posts: 6
Here is a code I'm trying to repeat. It only run once.

Code:
sub Lootgold()
repeat
var i, n, box, tempname 
Dim A[24]
A[1] = 0x0EED ;Gold Coins
A[2] = 0x0F85 ;Ginsengs
i = 2
box = 0x43EFAEAB
FOR n=1 TO 2
  uo.findtype(A[n],"-1","lastcontainer") 
  if (uo.findcount()>0) and (uo.getdistance("lastcontainer")<4)then 
    UO.grab(0,"finditem")
    tempname = UO.GetName( 'finditem' )
    Uo.moveitem("finditem","0","box")
    uo.print("Looted "+str(tempname))
  else
    UO.print("Nothing there for loot")
  end if 
Wait(1000)
NEXT 
end sub


Top
   
 Post subject:
PostPosted: 2008-07-28 09:06:02 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Code:
FOR n=1 TO 2 

NEXT

This is not repeat construction


Top
   
 Post subject:
PostPosted: 2008-07-28 19:41:51 
Offline

Joined: 2008-07-25 07:57:51
Posts: 6
so do I delete the line
For n
and take out the line
Next


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited