[Mudlet Challenge] Easy stocker

Hi, I have huge issues when it comes to stocking and setting prices in my shop.  So I thought I would make a script request as I suck at scripting and all my efforts so far have failed.

How it will work: 
Toggle on/off
Clicking the nameid on IH retrieves the #.
Being able to set the price and bin of the selected item
Outputs : PRICE <i#> <price> BIN <bin>


  • VeldrinVeldrin Denmark
    edited January 2013
    Something like...

    Stockprices {
    shirts = {
    a = {name = "a green shirt", price = 250, bin = 1},
    b = {name = "a blue shirt", price = 520000, bin = 1}
    trousers = {
    a = {name = "a pair of green trousers", price = 1000, bin = 2},
    b = {name = "a pair of blue trousers", price = 10000000, bin = 2}
    cravat = {
    a = {name = "the Corso cravat", price = 999999999, bin = 3}

    priceset(matches[2], matches[4], matches[3])

    function priceset(type, name, id)

        for k,v in ipairs(Stockprices[type]) do

    if v.name == name then 

    send("price "..id.." "..v.price.." bin "..v.bin)



    end --function


    Haven't actually checked if it works though
    for the clicking on IH to get numbers et all, I think I saw someone post something like it a while back.. @Iocun or @Sena perhaps?

  • I can't read code. :(
  • VeldrinVeldrin Denmark
    edited January 2013

    Hrm that'd make it harder to add to the thing I thought up and I'm not really good enough to work with loading/saving tables yet, so I work mostly hardcode. But this will auto set prices on everything that's defined in a table (check the script) and in a specific room (based on the room id which you can get off gmcp)

  • Doh! Is this still a thing? The link seems dead.
Sign In or Register to comment.