Back to "jewels" tags

Tinkering jewels training beads seller by special_sy

1@clearignore 
2# Script by [DoS] Chumber
3# This script is a semi automatic helper if you train tinkering
4# with jewels. 
5# 
6# It stops the queue if full and resumes after unload
7# It will work with any jeweler, just be in range (10 tiles)
8# It can buy tools if you setup a buy agent for them
9# Just change buyToolkits to 1
10#
11# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12# !! REQUIREMENTS:                                                    
13# !! Add the beads to your sell agent and enable it                   
14# !! Always craft beads, nothing else!
15# !! Add 5 toolkits to your buy agent and enable it                   
16# !! Setup your crafting queue with beads (craft until skill reached) 
17# !! This Script uses Organizer 10 so add gold to it
18# !! and set the organizer target to a container in your bank or secure box                        
19# !! Setup Restock Agent 10 to grab ingots and jewels                 
20# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
21
22@setvar buyToolkits 1
23@setvar restockAgentNo 10
24@setvar organizerAgentNo 10
25@setvar skillCap 121
26
27# !!! DONT EDIT !!
28@setvar jewelerNPC 0
29if not timerexists 'sellBeads'
30    createtimer 'sellBeads'
31    clearsysmsg 
32endif
33
34if skill 'tinkering' >= skillCap
35    overhead "All done, congrats!" 88
36    stop
37endif
38
39# Find a jeweler
40while findtype 400|401 'ground' -1 8 as npc
41    getlabel npc npcLabel
42    if 'jeweler' in npcLabel
43        @setvar jewelerNPC npc
44        break
45    endif
46    @ignore npc
47endwhile
48
49# Didnt find a jeweler?
50if jewelerNPC = 0
51    overhead "No jeweler in range!"
52    hotkey 'Crafting Queue'
53    overhead "I cant work like that!" 32
54    wait 250
55    gumpresponse 7
56    stop
57endif
58
59# Buy more toolkits from jeweler if down to 1
60if counttype 'tool kit' <= 1 and buyToolkits = 1
61    overhead "Last toolkit, buying more!"
62    menu jewelerNPC 1
63    wait 500
64endif
65
66# Restock
67if counttype 'iron ingot%s' 'backpack' <= 3 and restockAgent > 0
68    overhead "Restocking..."
69    restock restockAgentNo
70    wft 500
71    target 'self'
72    while queued
73        wait 500
74    endwhile
75endif
76
77## Sell on 10 beads every 30s or if almost full
78if counttype 4233 > 10 and timer 'sellBeads' > 30000 or diffweight  < 10
79    getlabel jewelerNPC npcLabel
80    overhead '$$$ {{npcLabel}}'
81    menu jewelerNPC 2
82    wait 500
83    organizer organizerAgentNo
84    settimer 'sellBeads' 0
85endif
86
87## Full
88if diffweight < 1
89    overhead "This stuff is heavy!"
90    hotkey 'Crafting Queue'
91    wait 250
92    gumpresponse 7
93    # Drop Gold somewhere
94    while diffweight < 10
95        overhead "Unload gold!"
96        wait 5000
97    endwhile
98    # Get back
99    while not find jewelerNPC 'ground' -1 -1 10 
100        overhead "Get back to work!"
101        wait 5000
102    endwhile
103    # Resume
104    hotkey 'Crafting Queue'
105    overhead "We are back in business!"
106    wait 250
107    gumpresponse 7
108endif
109
110# Keep the crafting queue open
111if not gumpexists 453554062
112    hotkey 'Crafting Queue'
113    wait 500
114endif
115
116# Start queue
117if ingump 'Begin Crafting'
118    overhead "Here we go!"
119    gumpresponse 7
120endif
121wait 5000
122replay