Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

[Injection] Cotton/Flax to cloth
#1

Will try to use all spinning wheels it can reach and one loom. No need to set anything, just make sure loom\spinning wheel(s) are reachable.

Code:
sub cftocloth()
    DIM rs[7]
    rs[0]=  '0x1A9D'  
    rs[1] = '0x1A9C'      
    rs[2] = '0x1A9A'
    rs[3] = '0x0DF9'
    rs[4] = '0x0FA0'
    rs[5] = '0x105F'
    rs[6] = '0x1062'
    var loom,wheel,i,cf,z,cycles
    UO.Print('CF to Cloth running')
    UO.Set('finddistance','6')
    For z = 5 to 6
        UO.FindType(rs[z],-1,'ground')
        if UO.FindCount()>0 then
            loom=UO.GetSerial('finditem')
        endif
    next
    For i = 0 to 3
        repeat
            UO.IgnoreReset()
            wait(500)
            UO.FindType(rs[i],-1,'my')
            If UO.FindCount('finditem')>0 then
                repeat
                    UO.FindType('0x1015',-1,'ground')
                    wheel=UO.GetSerial('finditem')
                    UO.WaitTargetObject(wheel)
                    UO.UseType(rs[i])
                    wait(200)  
                    UO.Ignore(wheel)
                    wait(200)
                Until NOT UO.FindCount('0x1015')>0 OR NOT UO.Count(rs[i])>0
            endif
        Until NOT UO.Count(rs[i])>0  
    next
    repeat
        UO.FindType(rs[4],-1,'my')
        If UO.FindCount()>0 then
            UO.DeleteJournal()
            cycles=0
            uo.waittargetobject(loom)
            uo.useobject('finditem')          
            repeat
                cycles = cycles + 1
                wait(10)  
            until UO.InJournal('The bolt|You create') OR (cycles>500)
        endif
    until NOT UO.FindCount(rs[4])>0
    UO.Print('Script finished.')
endsub


Forum Jump:


Users browsing this thread: 1 Guest(s)