-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathSSC.lua
More file actions
63 lines (56 loc) · 1.15 KB
/
SSC.lua
File metadata and controls
63 lines (56 loc) · 1.15 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
--By W4rGo
craftId=21;
mpCost=84;
mat1="Crystal: C-Grade";
mat1num=2;
mat2="Soul Ore";
mat2num=30;
weigthLimit=95;
function getItemByName(name)
invList = GetInventory();
for item in invList.list do
if item.Name == name then
--ShowToClient("ITEM", item.Name .. " (ID: " .. item.displayId .. ")");
return item
end
end
return nil
end
function hasItem(name)
invList = GetInventory();
for item in invList.list do
if item.Name == name then
--ShowToClient("ITEM", item.Name .. " (ID: " .. item.displayId .. ")");
return true
end
end
return false
end
while(true) do
if(GetMe():GetWeightPrecent()>weigthLimit) then
ShowToClient("Weight","Weigth limit approaching, Script stopped");
break;
end;
if(hasItem(mat1)) then
if(getItemByName(mat1).ItemNum < mat1num) then
ShowToClient("Missing",mat1);
break;
end;
else
ShowToClient("Missing",mat1);
break;
end;
if(hasItem(mat2)) then
if(getItemByName(mat2).ItemNum < mat2num) then
ShowToClient("Missing",mat2);
break;
end;
else
ShowToClient("Missing",mat2);
break;
end;
while( GetMe():GetMp()>mpCost ) do
Sleep(1000);
CraftItem(craftId);
end;
end;