Yoko

All sides of Injection
It is currently 2026-01-17 22:10:36

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Help Me tailor script
PostPosted: 2005-01-04 21:47:02 
Offline

Joined: 2004-12-27 11:12:41
Posts: 2
wats wrong with this script???
it says parser error line 1...

help me please

Code:
*********************************** 
*     A script for Krafts     *
* (In this case for Tailoring) *
***********************************

; |---------------------------|
; | the Description of variables Items |
; |---------------------------|
9
VAR EQ, RQ1, RQ2, QB
VAR Eat = '0x097B'; Type Meal (Fish)
VAR Res1 = '0x175D'; Type the Resource 1 (Fabric)
VAR Res2 = '0x0FA0'; Type the Resource 2 (Threads)
VAR Kit = '0x0F9D'; Type the Tool krafta (Sewing Kit)
VAR Items = '0x1F03'; Type the Target material
EQ=50; Quantity of a resource 1
RQ1=150; Quantity of a resource 1
RQ2=20; Quantity of a resource 1
QB=32; Quantity of bags in ContainerBag

; |---------------------------------|
; | the Description of variable containers |
; |---------------------------------|

VAR ContainerRes = '0x0e7d'; Object the Container with resources
VAR ContainerBag = '0x0e75'; Object the Container with bags
VAR BagCount = '0x0E76'; Type bags in container ContainerBag


sub main ()
   UO.Set ('quiet', '1')
   UO.Exec (' exec Craft ')
   UO.IgnoreReset ()
end sub

sub OpenBag ()
   VAR i, BagID
   UO.UseObject (ContainerBag)
   UO.UseObject (ContainerRes)
   UO.IgnoreReset ()
   Repeat
    UO.DeleteJournal ()
    Wait (1000)
    UO.FindType (BagCount, '-1 ', ContainerBag)
    If UO.FindCount ('finditem')> 1 Then
      i = (UO.FindCount ('finditem') +1)
      UO.Click ('finditem')
      If UO.InJournal (" a bag ") Then
       BagID=UO.JournalSerial (UO.InJournal (" a bag ")-1)
       UO.SetJournalLine (UO.InJournal (" a bag ")-1, " ")
       UO.FindType (Items, '-1 ', BagID)
       UO.UseObject (BagID)
       Wait (2000)
       UO.Hide (BagID)
       UO.Ignore (BagID, 'on')
      EndIF
    EndIf
    i = (i - 1)
   Until i == 0
   UO.Hide (ContainerBag)
   UO.Hide (ContainerRes)
   UO.Resend ()
   Wait (3000)
   UO.IgnoreReset ()
end sub


sub Craft ()
VAR Last=0, LastTimer
   OpenBag ()
   While NOT UO.Dead ()

; |-----------------------------------|
; | Search of resources and Take them |
; |-----------------------------------|

    UO.FindType (Eat, '-1 ',' me ')
    If UO.GetQuantity ('finditem') <1 then
      UO.FindType (Eat, '-1 ', ContainerRes)
      If UO.GetQuantity ('finditem')> 1 then
       ToTake (3)
      Else
       UO.Exec (' Terminate Craft ')
      EndIf
    Else
      ToEat ()
    EndIf
    UO.FindType (Res1, '-1 ',' me ')
    If UO.GetQuantity ('finditem') <16 then
      UO.FindType (Res1, '-1 ', ContainerRes)
      If UO.GetQuantity ('finditem')> 1 then
       ToTake (1)
      Else
       UO.Exec (' Terminate Craft ')
      EndIf
    EndIf
    UO.FindType (Res2, '-1 ',' me ')
    If UO.GetQuantity ('finditem') <1 then
      UO.FindType (Res2, '-1 ', ContainerRes)
      If UO.GetQuantity ('finditem')> 1 then
       ToTake (2)
      Else
       UO.Exec (' Terminate Craft ')
      EndIf
    EndIf

; |-------------|
; | Craft Items |
; |-------------|

    UO.DeleteJournal ()
    UO.WaitTargetType (Res1)
    UO.UseType (Kit)
    UO.WaitMenu ('Cloth', 'Shirts','Shirts','robe '); Name E?aooIai?1 (Cloth), IiaIai?2 (Shirts)-> E?aooIai?2 (Shirts), IiaIai?2 (Robe)
    LastTimer=UO.Timer ()
    Repeat
      wait (100)
    Until UO.InJournal (" You put ") OR UO.InJournal ("Tailoring") OR LastTimer+150 <UO.Timer ()
    UnLoadItem ()
   Wend
end sub

sub ToTake (i)
VAR G, F
   If i == 1 Then
    G = RQ1
    F = Res1
   EndIf
   If i == 2 Then
    G = RQ2
    F = Res2
   EndIf
   If i == 3 Then
    G = EQ
    F = Eat
   EndIf
   UO.FindType (F, '-1 ', ContainerRes)
   if UO.GetQuantity ('finditem')> 1 then
      UO.Grab (" + str (G) + ",'finditem ')
      UO.DeleteJournal ()
    Repeat
      UO.FindType (F, '-1 ',' me ')
      Wait (1500)
    Until UO.InJournal (" That is too ") OR UO.GetQuantity ('finditem')> 1
   endif
end sub   
     
sub ToEat ()
   UO.UseType (Eat)
end sub

sub UnLoadItem ()
   VAR BagID
   VAR i=0
   VAR m=0
   Repeat
    UO.DeleteJournal ()
    UO.FindType (BagCount, '-1 ', ContainerBag)
    UO.Click ('finditem')
    m = 0
    Repeat
      Wait (1000)
    Until UO.InJournal (" a bag ")
    If UO.InJournal (" a bag ") Then
      BagID=UO.JournalSerial (UO.InJournal (" a bag ")-1)
      UO.SetJournalLine (UO.InJournal (" a bag ")-1, " ")
      UO.FindType ('-1 ', '-1 ', BagID)
      If UO.FindCount ('finditem') <220 then
       m = UO.FindCount ('finditem')
       UO.SetReceivingContainer (BagID)
       UO.FindType (Items, '-1 ',' me ')
       UO.Grab ('0', 'finditem')
       UO.ConColor ('0x0021')
       UO.Set ('quiet', '0')
       UO.Print (UO.Print (' In BagPack * ' + Str (i+1) + 'items' +Str (m) + "))   
       UO.Set ('quiet', '1')
       UO.ConColor ('0x0035')
       Wait (1000)
       UO.UnSetReceivingContainer ()
      Else
       i = i + 1
       UO.Ignore (BagID, 'on')
      EndIf
    EndIf     
    If i == QB Then
      UO.IgnoreReset ()
      i = 0
    EndIf
    UO.FindType (Items, '-1 ',' me ')
   Until UO.FindCount ('finditem') <1
end sub


Top
   
 Post subject:
PostPosted: 2005-01-04 21:58:59 
Offline
User avatar

Joined: 2004-12-29 15:16:45
Posts: 112
try to replace that
Code:
; |---------------------------|
; | the Description of variables Items |
; |---------------------------|
9

this that
Code:
; |---------------------------|
; | the Description of variables Items |
; |---------------------------|
;9

and when this error will appear, try to find error in line, which number was in errormessage


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 11 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