Linen Coin Purse

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

Linen Coin Purse

Post by KOSMOS » Sun Apr 10, 2016 10:51 pm

Here is the correct lua coding for this file.

linen_coin_purse.lua

Code: Select all

------------------------------------
--    ID: 5736
--    Lin. Purse (Alx.)
--    Breaks up a Linen Purse
-----------------------------------------

-----------------------------------------
-- OnItemCheck
-----------------------------------------

function onItemCheck(target)
local result = 0;
    if (target:getFreeSlotsCount() == 0) then
        result = 308;
    end
return result;
end;

-----------------------------------------
-- OnItemUse
-----------------------------------------

function onItemUse(target)
    target:addItem(2488,math.random(50,99));
end;

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

Re: Linen Coin Purse

Post by TeoTwawki » Fri Apr 15, 2016 8:12 pm

step1: indent the local variable and the return,
step2: remove the excessive spacing from the header,
step3: pull request file change on github,
step4: pat self on back for contributing :)
step5: realize we forgot to include "????" and "profit" in there.
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: Linen Coin Purse

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

TeoTwawki wrote:step1: indent the local variable and the return,
step2: remove the excessive spacing from the header,
step3: pull request file change on github,
step4: pat self on back for contributing :)
step5: realize we forgot to include "????" and "profit" in there.
Ok think I did it correctly for those two files. Let me know if I messed up on a step or anything in my coding is not to the proper format for this project. I changed everything to 4,8 spaces and pretty sure indented everything correctly though.

Post Reply