Page 1 of 1

Heavy Metal Pouch

Posted: Sun Apr 10, 2016 11:03 pm
by KOSMOS
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

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;
Add this line into item_usable.sql*Or do it in mysql*

Code: Select all

INSERT INTO `item_usable` VALUES (5910,'heavy_metal_pouch',1,1,0,0,0,0,0,0);

Re: Heavy Metal Pouch

Posted: Fri Apr 15, 2016 7:53 pm
by TeoTwawki
If you fix the indenting and pull request it on github this can get added to the project.

Re: Heavy Metal Pouch

Posted: Fri Apr 15, 2016 9:10 pm
by KOSMOS
TeoTwawki wrote:If you fix the indenting and pull request it on github this can get added to the project.
I will fix this and do that on my next day off.