Heavy Metal Pouch

Post Reply
KOSMOS
Posts: 67
Joined: Thu Jan 29, 2015 10:36 pm

Heavy Metal Pouch

Post by KOSMOS » 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

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);

User avatar
TeoTwawki
Developer
Posts: 523
Joined: Mon Jul 15, 2013 9:50 pm

Re: Heavy Metal Pouch

Post by TeoTwawki » Fri Apr 15, 2016 7:53 pm

If you fix the indenting and pull request it on github this can get added to the project.
Hi, I run The Demiurge server.

Code: Select all

PLS USE [code]CODE TAGS[/code] WHEN POSTING CODE
Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

KOSMOS
Posts: 67
Joined: Thu Jan 29, 2015 10:36 pm

Re: Heavy Metal Pouch

Post by KOSMOS » Fri Apr 15, 2016 9:10 pm

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.

Post Reply