Thread: Shop Will Not Open

Results 1 to 3 of 3
  1. #1 Shop Will Not Open 
    Registered Member
    Join Date
    Feb 2019
    Posts
    21
    Thanks given
    6
    Thanks received
    1
    Rep Power
    0
    Added King Roald as an npc in Varrock bank and that works fine.
    Added a shop and deleted the packed file then restarted server. It repacked all shops.
    Then I went into NPC handler and wrote the else if statement for Test Store. King Roald = 648. Shop ID = 89.
    Code:
    else if (npc.getId() == 2356)
    					ShopsHandler.openShop(player, 76);
    				else if (npc.getId() == 648) // Test Store
    					ShopsHandler.openShop(player, 89);
    				else if (npc.getId() == 3161)
    					ShopsHandler.openShop(player, 90);
    But when I click 'Talk-to King Roald' it says 'Nothing interesting happens.'
    Am I missing something? Seems so strange.
    One thing is that King Roald roams around and it says when you set the 'general store' option to false (which I did for the Test Store), he should stop roaming.
    Using Matrix 592.
    Reply With Quote  
     

  2. #2  
    *breaks walking*


    Join Date
    Dec 2010
    Posts
    674
    Thanks given
    180
    Thanks received
    153
    Rep Power
    193
    Matrix 592? Didn't realize someone made a 592 version.

    Make sure you're putting it under the right handleOption#.
    You might be adding it under handleOption2, which would be the 'trade' option for some NPCs when you want it to be under handleOption1 seeing as King Roald only has a 'talk' option (option 1) as opposed to a talk and trade option (options 1 & 2)

    Some ways to debug this:
    See if there's a command for opening shops, I believe Matrix had one that was just 'openshop #'. Use this to test if your shop packed correctly by opening shop 89 manually.
    If you're able to open the shop, you know it's something to do with the NPC option itself.
    If you're not, then your shops didn't pack properly, or at all.

    Replace the openShop code in the handleOption# method to just a print out or something and try again, if it prints the message out, then your issue is with ShopHandler opening the shop.
    If it still says 'Nothing interesting happens...' (most likely) then it means you're putting it under the wrong option.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Feb 2019
    Posts
    21
    Thanks given
    6
    Thanks received
    1
    Rep Power
    0
    Oh worked it out, thanks!
    Reason was because only an npc with 'trade' option opens the shop.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Right clicking will not open menu
    By Faaith in forum Help
    Replies: 4
    Last Post: 08-11-2018, 04:05 PM
  2. Jar File Will Not Open!
    By Joseph69 in forum Help
    Replies: 9
    Last Post: 05-05-2013, 05:44 PM
  3. New shop added, not opening
    By PyroRevolution in forum Help
    Replies: 15
    Last Post: 03-28-2013, 09:05 PM
  4. Replies: 6
    Last Post: 03-07-2013, 12:18 AM
  5. Replies: 5
    Last Post: 05-17-2012, 08:11 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •