-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworkorder.cmd
More file actions
91 lines (83 loc) · 2.11 KB
/
workorder.cmd
File metadata and controls
91 lines (83 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
include library.cmd
include craftlibrary.cmd
#var materialsizes tiny|small|medium|large|huge|massive|enormous|immense|gargantuan|gigantic|colossal
if_1 then
{
#echo %1, %2, %3, %4
if (matchre("%1", "help") then
{
gosub HELPDISPLAY
exit
}
if (matchre("%1", "%disciplines") then var discipline %1
else
{
put #echo mono Discipline must be from %disciplines.
goto HELPDISPLAY
}
if_2 then
{
if_3 then
{ var revenue 0
if (matchre("%2", "%difficulties") then var difficulty %2
else
{
put #echo mono Difficulty must be from %difficulties.
goto HELPDISPLAY
}
var material %3
put #echo Yellow Crafting %difficulty %discipline work orders in %material.
put #echo %alertwindow Yellow Crafting %difficulty %discipline work order in %material.
}
else
{
put #echo Must specify a material.
goto HELPDISPLAY
}
}
else
{
if (("%discipline" = "blacksmithing") || ("%discipline" = "weaponsmithing") || ("%discipline" = "armorsmithing")) then
{
var difficulty $m$varsetforgingdifficulty
var material $m$varsetforgingmaterial
}
if ("%discipline" = "tailoring") then
{
var difficulty $m$varsetoutfittingdifficulty
var cloth $m$varsetoutfittingcloth
var leather $m$varsetoutfittingleather
}
}
}
else
{
goto HELPDISPLAY
}
var varset $varset
gosub CRAFTVARLOAD
var storage $m%varsetstorage
var alertwindow >$alertwindow
var workorder 1
gosub AREAVARINIT
gosub STOWALL
#CRAFTING_STORAGE
gosub CRAFTINGSTART
if (%workorderbail = 1) then return
gosub CRAFTREPAIR
MAIN:
gosub WORKORDER
if (%workorderbail = 1) then exit
if ($Forging.LearningRate < 25) then goto MAIN
else
{
gosub CRAFTINGEND
exit
}
HELPDISPLAY:
put #echo mono Syntax: .workorder <discipline> <difficulty> <material>
put #echo mono OR
put #echo mono Syntax: .workorder <discipline> to use stored variables.
put #echo mono Difficulties: %difficulties
put #echo mono Disciplines: %disciplines
exit