Cant buy Items from trader (Problem)

Discussion in 'Support' started by Stanos, Sep 9, 2018.

  1. Stanos

    Stanos Active Member

    Joined:
    Jun 12, 2018
    Messages:
    171
    Likes Received:
    38
    Best Answers:
    0
    USING TFS 1.2
    So people helped me in this forum how to make traders but when i tried to test them i noticed that i can sell my items but when i want to buy them i cant it always shows grey. Code
    BTW yes i had gold in my bag.
    Code (Lua):
    1.  
    2. local keywordHandler = KeywordHandler:new()
    3. local npcHandler = NpcHandler:new(keywordHandler)
    4. NpcSystem.parseParameters(npcHandler)
    5.  
    6. function onCreatureAppear(cid)              npcHandler:onCreatureAppear(cid)            end
    7. function onCreatureDisappear(cid)           npcHandler:onCreatureDisappear(cid)         end
    8. function onCreatureSay(cid, type, msg)      npcHandler:onCreatureSay(cid, type, msg)    end
    9. function onThink()                          npcHandler:onThink()                        end
    10.  
    11. local shopModule = ShopModule:new()
    12. npcHandler:addModule(shopModule)
    13.  
    14. shopModule:addBuyableItem({'cheese'}, 2461, 200, 'cheese')
    15. shopModule:addBuyableItem({'meat'}, 2482, 300, 'meat')
    16.  
    17. function creatureSayCallback(cid, type, msg)
    18.     if not npcHandler:isFocused(cid) then
    19.         return false
    20.     end
    21.     return true
    22. end
    23.  
    24. npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    25. npcHandler:addModule(FocusModule:new())
     
  2. Stanos

    Stanos Active Member

    Joined:
    Jun 12, 2018
    Messages:
    171
    Likes Received:
    38
    Best Answers:
    0
  3. Itutorial

    Itutorial Well-Known Member

    Joined:
    Dec 23, 2014
    Messages:
    1,360
    Likes Received:
    288
    Best Answers:
    23
    Change

    shopModule:addBuyableItem({'cheese'}, 2461, 200, 'cheese')

    to

    shopModule:addBuyableItem({'cheese'}, 2461, 200, 1, 'cheese')
     
  4. Stanos

    Stanos Active Member

    Joined:
    Jun 12, 2018
    Messages:
    171
    Likes Received:
    38
    Best Answers:
    0
    Still same.
     
  5. Itutorial

    Itutorial Well-Known Member

    Joined:
    Dec 23, 2014
    Messages:
    1,360
    Likes Received:
    288
    Best Answers:
    23
    edit nvm make this when I was tired.

    I believe there is a spot in the shopmodule that needs to be changed. I forget where its at. I will look today after work if no one helps you.
     
    Stanos likes this.
  6. Stanos

    Stanos Active Member

    Joined:
    Jun 12, 2018
    Messages:
    171
    Likes Received:
    38
    Best Answers:
    0
  7. StreamSide

    StreamSide Joseluis Gonzalez

    Joined:
    Aug 31, 2007
    Messages:
    2,992
    Likes Received:
    679
    Best Answers:
    17
    shop modules works fine. I guess you are using some corrupted datapack or non tfs datapack.
    also if you want to sell products then use the sellmodule
     
  8. Stanos

    Stanos Active Member

    Joined:
    Jun 12, 2018
    Messages:
    171
    Likes Received:
    38
    Best Answers:
    0
    It might be possible, because i'm using
    ninjalulz/forgottenserver
    As i remember couple month ago i changed npchandler into the new one because i had problem with range and "trade" not sure tho. With sell products i dont have problems it works fine.
     
  9. StreamSide

    StreamSide Joseluis Gonzalez

    Joined:
    Aug 31, 2007
    Messages:
    2,992
    Likes Received:
    679
    Best Answers:
    17
    havent tested that yet so cant say if its working or no, there is no npc buying stuff?
     
  10. Stanos

    Stanos Active Member

    Joined:
    Jun 12, 2018
    Messages:
    171
    Likes Received:
    38
    Best Answers:
    0
    It shows that there is stuff that i can buy, but you cant buy them it always locked you can have as much money as you want but still it wont let you buy it.
     
  11. StreamSide

    StreamSide Joseluis Gonzalez

    Joined:
    Aug 31, 2007
    Messages:
    2,992
    Likes Received:
    679
    Best Answers:
    17
    can you post some pics please?
     
  12. Stanos

    Stanos Active Member

    Joined:
    Jun 12, 2018
    Messages:
    171
    Likes Received:
    38
    Best Answers:
    0
    Ofc :)
    [​IMG]
    As you can see i cant buy them
     
  13. StreamSide

    StreamSide Joseluis Gonzalez

    Joined:
    Aug 31, 2007
    Messages:
    2,992
    Likes Received:
    679
    Best Answers:
    17
    Well I guess you got some bugged libs imo, gonna download the datapack and if I can login then I will ask you for your modified libs as you said.
     
    Stanos likes this.
  14. Stanos

    Stanos Active Member

    Joined:
    Jun 12, 2018
    Messages:
    171
    Likes Received:
    38
    Best Answers:
    0
    Bump.
     
  15. Stanos

    Stanos Active Member

    Joined:
    Jun 12, 2018
    Messages:
    171
    Likes Received:
    38
    Best Answers:
    0
  16. Stanos

    Stanos Active Member

    Joined:
    Jun 12, 2018
    Messages:
    171
    Likes Received:
    38
    Best Answers:
    0
  17. Stanos

    Stanos Active Member

    Joined:
    Jun 12, 2018
    Messages:
    171
    Likes Received:
    38
    Best Answers:
    0
  18. Stanos

    Stanos Active Member

    Joined:
    Jun 12, 2018
    Messages:
    171
    Likes Received:
    38
    Best Answers:
    0
    Would be great to get support related with this problem tho ;D bump
     
  19. Stanos

    Stanos Active Member

    Joined:
    Jun 12, 2018
    Messages:
    171
    Likes Received:
    38
    Best Answers:
    0
  20. Stanos

    Stanos Active Member

    Joined:
    Jun 12, 2018
    Messages:
    171
    Likes Received:
    38
    Best Answers:
    0

Share This Page

Loading...