Yoko

All sides of Injection
It is currently 2024-04-19 04:29:45

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2007-09-21 08:14:32 
Offline

Joined: 2007-09-19 07:43:41
Posts: 1
вот ходилка обьясните мне пожалуйста как сделать так, чтобы при запуска ее из другого скрипта значение переменной l задавалось в скриптом из которого она запущена


Code:
sub hodilka() 
var cx,cy,tmp,i=0, temp ,x ,y
dim sx[3] , sy[3]
sx[1] = 2572
sx[2] = 2577
sx[3] = 2573
sy[1] = 481
sy[2] = 479
sy[3] = 477

x = sx[1] ;//Êîîðäèíàòà x-íàçíà÷åíèÿ.
y = sy[1] ;//Êîîðäèíàòà y-íàçíà÷åíèÿ.
x = -(uo.getx() - x)
y = -(uo.gety() - y)
cx = x
cy = y
if cx <= 0 then
   cx = -cx
endif
if cy <= 0 then
   cy = -cy
endif
tmp = str(cx+cy)
if val(tmp) then
   DIM step[val(tmp)]
   repeat
      i=i+1
      if x>0 && y>0 && x==y  then
         x=x-1
         y=y-1
         cx=x
         cy=y
         step[i]=2
      endif
      if x>0 && cx>cy then
         x=x-1
         cx=x
         step[i]=3
      endif
      if x>0 && y<0 && cx==cy then
         x=x-1
         y=y+1
         cx=x
         cy=-y
         step[i]=6
      endif
      if y<0 && cy>cx then
         y=y+1
         cy=-y
         step[i]=9
      endif
      if x<0 && y<0 && x==y then
         x=x+1
         y=y+1
         cx=-x
         cy=-y
         step[i]=8
      endif
      if x<0 && cx>cy then
         x=x+1
         cx=-x
         step[i]=7
      endif
      if x<0 && y>0 && cx==cy then
         x=x+1
         y=y-1
         cx=-x
         cy=y
         step[i]=4
      endif
      if y>0 && cy>cx then
         y=y-1
         cy=y
         step[i]=1
      endif
      if x==-0 then
         x=0
      endif
      if y==-0 then
         y=0
      endif
   until cx==0 && cy==0
   temp=i
   tmp=''
   for i=1 to temp
      tmp=tmp+str(step[i])
   next
   uo.addstep(tmp)
endif
uo.resend()
endsub
[/code]


Top
   
 Post subject:
PostPosted: 2007-09-21 15:45:25 
Offline

Joined: 2005-04-19 18:00:29
Posts: 2259
Location: Московская область
Code:
sub mining()
  #mining
  if uo.Weight>600 then
    Hodilka(1000,2000) # var m=1000, n=2000; Hodilka(m,n)
  end if
end sub

sub Hodilka(x,y)
  var mx=x
  var my=y
  # Walking_To(mx,my)
end sub


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 67 guests


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:  
cron
Powered by phpBB® Forum Software © phpBB Limited