Back to "tailoring" tags

WIP: Auto Societies by Jaseowns

1// Jaseowns soc attempt - live
2// https://youtube.com/live/oice-0c8xE4?feature=share
3@setvar! debugJobs 0
4@setvar! globalTimeout 650
5
6if debugJobs = 0
7
8    ############
9    ### Bring us to Order of Armorers
10    #########
11    gumpclose  1554294796
12    while not gumpexists 1554294796
13        say '[jobs'    
14        wait 200
15    endwhile
16    gumpresponse 10 1554294796
17    waitforgump 1554294796 5000
18
19    ############
20    ### Open crafting queue
21    #########
22    gumpclose 453554062
23    while not gumpexists 453554062
24        say '[cq'  
25        wait 200
26    endwhile
27
28    # Create a new queue
29    gumpresponse 5 453554062
30    wait 200
31
32    if insysmsg "You are already at the maximum number of crafting queues allowed."
33        overhead "We need you to delete a queue" 34
34        sysmsg "We need you to delete a queue" 34
35        gumpclose  1554294796
36        wait 5000
37        replay
38    endif
39endif
40
41@setvar! foundJobs 0
42
43// exceptional / hue / item type
44// 100s of if statements here
45
46@setvar! resourceStockPileGump 1859005118
47@setvar! craftingQueueGump 453554062
48@setvar! tailoringSmithGump 949095101
49@setvar! jobsGump 1554294796
50
51if ingump "shadowhide leather legging" 1554294796
52
53
54        /// handle running out of materials
55            // check insysmsg for not materials if crafting queue stops
56        // handle jobs we've already completed
57        
58
59    while not ingump "shadowhide leather legging" 453554062 
60
61        gumpclose resourceStockPileGump
62        gumpclose tailoringSmithGump
63        
64        if findtype "resource container" ground -1 -1 2 as resources
65            while not gumpexists resourceStockPileGump
66                dclick resources
67                waitforgump resourceStockPileGump 5000
68            endwhile
69            gumpresponse 7 resourceStockPileGump
70            waitforgump resourceStockPileGump 5000
71            while not gumpexists tailoringSmithGump
72                gumpresponse 106 resourceStockPileGump
73                waitforgump tailoringSmithGump 5000
74            endwhile
75        endif
76        
77        gumpresponse 101 tailoringSmithGump
78        waitforgump tailoringSmithGump 5000
79        
80        gumpresponse 404 tailoringSmithGump
81        waitforgump tailoringSmithGump 2000
82        waitforgump craftingQueueGump 2000
83    
84        if not ingump "shadowhide leather legging" 453554062 
85            # delete what we just added
86            gumpresponse 100 craftingQueueGump
87            # go to next hue of material
88            gumpresponse 13 tailoringSmithGump
89        endif
90    
91    endwhile
92    
93    gumpresponse 600 craftingQueueGump
94    waitforgump craftingQueueGump 2000
95    
96    if findtype "resource container" ground -1 -1 2 as resources
97        while not targetexists 
98            gumpresponse 10 craftingQueueGump
99            wft 500
100        endwhile
101        target resources
102        wait globalTimeout
103    endif
104    
105    while not insysmsg "You have completed a society job"
106        
107        if ingump "Begin Crafting" 453554062
108            overhead "Starting Queue..." 88
109            gumpresponse 7 453554062
110            wait globalTimeout
111        endif
112        
113        while ingump "Stop Crafting" 453554062
114            sysmsg "Working Crafting Queue..." 88
115            wait globalTimeout
116        endwhile
117        
118    endwhile
119
120    gumpresponse 100 craftingQueueGump
121
122endif
123
124if ingump "exceptional leather arms" 1554294796
125    
126
127
128    overhead "We do infact see arms"
129    if foundJobs = 0
130        @setvar! foundJobs 1
131    elseif foundJobs = 1
132        @setvar! foundJobs 2
133    elseif foundJobs = 2
134        @setvar! foundJobs 3
135    endif
136    
137    stop
138endif
139
140
141
142if ingump "copperhide fishing net" 1554294796
143    overhead "We do infact see fishing net"
144    if foundJobs = 0
145        @setvar! foundJobs 1
146    elseif foundJobs = 1
147        @setvar! foundJobs 2
148    elseif foundJobs = 2
149        @setvar! foundJobs 3
150    endif
151endif
152
153
154
155if foundJobs = 3
156    overhead "we found all the jobs move to next page"
157    stop
158endif
159
160
161
162############
163### Read page 1 of the list
164#########
165// handle knowing what type material and item type
166
167// lets assume its shadowhide leather leeggins
168
169// open the crafting queue and make a new one
170// open tailoring kit
171// go find the item in the list
172    // update the matieral type to match (shadowhide) if needed
173// add item to queue
174
175// blackflame_ for recycling, i think you can always just set it to recycle all, because the items are consumed if they're on the job
176    // confirmed, we can always set the recycle all
177// to avoid needing to know qty, you could just do 1 and let it run until the job is done. (initsu)
178
179// edit the qty and make sure the type matches
180    // exceptional vs regular
181    // if excpeitonal we need to set the recycle to all non exception
182    
183