Heavy Metal Pouch
Posted: Sun Apr 10, 2016 11:03 pm
This one took so modification of a few files. One in the sql I know it is not technically scripting but it was needed to make it all work so including it.
heavy_metal_pouch.lua
Add this line into item_usable.sql*Or do it in mysql*
heavy_metal_pouch.lua
Code: Select all
------------------------------------
-- ID: 5910
-- Heavy Metal Pouch
-- Breaks up a Heavy Metal Pouch
-----------------------------------------
-----------------------------------------
-- OnItemCheck
-----------------------------------------
function onItemCheck(target)
local result = 0;
if (target:getFreeSlotsCount() == 0) then
result = 308;
end
return result;
end;
-----------------------------------------
-- OnItemUse
-----------------------------------------
function onItemUse(target)
target:addItem(3509,math.random(3,19));
end;
Code: Select all
INSERT INTO `item_usable` VALUES (5910,'heavy_metal_pouch',1,1,0,0,0,0,0,0);