02-09-2016, 07:12 AM
Where do I get the craft plugin?
edit. plizzz use codebb
LUA Programming
SS = "Soulshot"; -- Shot name, edit them, to detect 1k shots
craftId=1125; -- rec id
mpCost=258; -- mp consuption per craft
mat1="Crystal (R-grade)";--cry rr
mat1num=2;
mat2="Soulstone";
mat2num=80;
CraftStatus = true;
weigthLimit=95;-- weight limit to stop in percent
function getItemByName(name)
local invList = GetInventory();
for item in invList.list do
if (item.Name == name) then
return item;
end;
end;
return nil;
end;
function hasItem(name)
local invList = GetInventory();
for item in invList.list do
if (item.Name == name) then
return true;
end;
end;
return false;
end;
function GetItemAmountByName(name)
local invList = GetInventory();
for item in invList.list do
if (item.Name == name) then
ShotsDisId = item.displayId;
return item.ItemNum;
end;
end;
return 0;
end;
repeat
if (GetItemAmountByName(SS) < 1000) then-- if 1 k shots less
if(GetMe():GetWeightPercent() < weigthLimit) then-- if no weiht limit
if (hasItem(mat1) == true) then -- if got mat 1
if(getItemByName(mat1).ItemNum >= mat1num) then-- if got mat 1 enought to craft
if(hasItem(mat2) == true) then -- if got mat 2
if(getItemByName(mat2).ItemNum >= mat2num) then-- if got mat 2 enought to craft
if (GetMe():GetMp() > mpCost) then -- if got mp to craft
CraftItem(craftId); -- crafting with id
Sleep(1000);
end;
else
CraftStatus = false;
ShowToClient("Craft Plugin","Not enough " .. mat2);
end;
else
CraftStatus = false;
ShowToClient("Craft Plugin","Missing " .. mat2);
end;
else
CraftStatus = false;
ShowToClient("Craft Plugin","Not enough " .. mat1);
end;
else
CraftStatus = false;
ShowToClient("Craft Plugin","Missing " .. mat1);
end;
else
CraftStatus = false;
ShowToClient("Craft Plugin","Weigth limit approaching, Craft Plugin Deactivated.");
end;
end;
Sleep(1000);
until CraftStatus == false;
edit. plizzz use codebb