Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • B50: Sever error what happen
      May 22, 2018, 08:23:40 PM
    • The Soul: 10 years later
      May 21, 2018, 05:23:10 PM
    • The Soul: wow people are still here?
      May 21, 2018, 05:19:27 PM
    • Wilkooo: and apologies to the OG forum guys on behalf of that fudgewit dr house that pretty much killed this entire domain
      May 21, 2018, 04:14:28 PM
    • Wilkooo: shoutout to all those that played back in the beginning, all new people that hang around now seem to be pretty braindead
      May 21, 2018, 04:13:54 PM
    • Wilkooo: born sep 2016 - died whenever pink eggs resigned
      May 21, 2018, 04:11:29 PM
    • Wilkooo: Rip moparscape rsps
      May 21, 2018, 04:11:10 PM
    • puta loca: or what section can i ask this
      May 21, 2018, 05:45:08 AM
    • puta loca: does someoen has platinum ps v2 files?
      May 21, 2018, 05:44:59 AM
    • w azza 3: server down??
      May 21, 2018, 05:07:47 AM
    • charmie: rippppppppppppppppppppppppppppppppppppppppppppppp
      May 20, 2018, 09:03:41 PM
    • Tesco Value: eco reset? :o
      May 20, 2018, 08:54:27 PM
    • Tesco Value: aw is server down? :P
      May 20, 2018, 08:54:03 PM
    • mandmgalaxy: is the game down?
      May 20, 2018, 08:05:07 PM
    • bliss death: i believe 95% of the community disliked this change heavily as it came out of nowhere. and the fact you clear ironmen banks as well. terrible change. disappointed.
      May 20, 2018, 06:08:36 PM
    • bliss death: just wondering when the server is gonna be fixed and reverted
      May 20, 2018, 06:07:36 PM
    • Saltyspade10: I'll be back ;)
      May 15, 2018, 04:43:53 PM
    • Nunubuffs:[link]
      May 15, 2018, 12:06:25 PM
    • Nunubuffs: .info god
      May 15, 2018, 12:05:40 PM
    • Nunubuffs: Www.scaperune
      May 15, 2018, 12:05:25 PM

    Author Topic: Multi Shops (solved)  (Read 768 times)

    0 Members and 1 Guest are viewing this topic.

    Offlineruneball

    • Member
    • **
    • Posts: 69
    • Thanks: +0/-0
      • View Profile
    Multi Shops (solved)
    « on: July 22, 2015, 02:31:02 PM »
    well hello mopar.

    i want to have multishops in my server so i looked at OverloadX to get an idea how to put the shops into my server.

    well this are the things i got

    Code: [Select]
    case 534:
    c.getDH().sendDialogues(24, npcType);
    break;
    in actionhandler and
    Code: [Select]
    case 24:
    sendOption4("Weapons and accessories", "Low Level Shop", "Food & Potions", "Archer Store");
    c.dialogueAction = 15;
    break;

    in dialoguehandler

    but after this i don't know what i need to do because somewhere i need to add the part that it will open the shops.

    some tips for me where i need to look because i can't find it :s
    « Last Edit: July 22, 2015, 03:49:10 PM by runeball »
    RS2Ad banner

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: Multi Shops
    « Reply #1 on: July 22, 2015, 03:10:22 PM »
    When the dialogue sends, the player has a choice to click a text button on the dialogue interface.

    The client will then send the Button click packet (185) to the server.

    Now this is where you come in.
    You need to tell the server what to do with the information it just received.
    You should already have a method and or class to handle buttons (Usually called ClickingButtons).

    Search for the button id in the class/method. If it exists, which I bet it will (As you have pre-existing dialogues), you will need to edit it to check for your current dialogue (use the dialogueAction integer or similar..), and open the shop.
    If it does not exist, add in the case statement (or if statement, whatever) then the code to open the shop.
    RS2Ad banner

    OfflinePVM Elite

    • First Time Poster
    • *
    • Posts: 3
    • Thanks: +0/-0
      • View Profile
    Re: Multi Shops
    « Reply #2 on: July 22, 2015, 03:19:00 PM »
    Use the way sk8r did it or you can also add more right clicking options in the entitydef.java for the npc and then just make a shop open for each option. And you would do that by going to actionhandler.java and just make a case under each public void.

    EX:

       public void firstClickNpc(int npcType) {
    case 537:
    c.getShops().openShop(1);
    break;


    public void secondClickNpc(int npcType) {
    case 537:
    c.getShops().openShop(2);
    break;


    public void thirdClickNpc(int npcType) {
    case 537:
    c.getShops().openShop(3);
    break;

    and if you do not have the public void 4th click then here is a tutorial on how to add that. It comes in handy here and there.

    https://www.rune-server.ee/runescape-development/google/snippets/358838-pi-fourth-click-npc.html
    Got a project and need a developer? PM me or skype me @ pvm.elite to talk more.
    RS2Ad banner

    Offlineruneball

    • Member
    • **
    • Posts: 69
    • Thanks: +0/-0
      • View Profile
    Re: Multi Shops
    « Reply #3 on: July 22, 2015, 03:26:10 PM »
    Use the way sk8r did it or you can also add more right clicking options in the entitydef.java for the npc and then just make a shop open for each option. And you would do that by going to actionhandler.java and just make a case under each public void.

    EX:

       public void firstClickNpc(int npcType) {
    case 537:
    c.getShops().openShop(1);
    break;


    public void secondClickNpc(int npcType) {
    case 537:
    c.getShops().openShop(2);
    break;


    public void thirdClickNpc(int npcType) {
    case 537:
    c.getShops().openShop(3);
    break;

    and if you do not have the public void 4th click then here is a tutorial on how to add that. It comes in handy here and there.

    https://www.rune-server.ee/runescape-development/google/snippets/358838-pi-fourth-click-npc.html

    ooh this is a nice one sk8er thx for the answer i understand it a little i will work on something with that to learn it for later :)

    now i will use the idea of PVM Elite bc i like the idea.

    thanks both of you helped me allot  ;D

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: Multi Shops
    « Reply #4 on: July 22, 2015, 03:42:12 PM »
    The problem with PvM's idea is, I believe the SERVER only handles 3 click options (Not counting attack - that ones a little bit different..)
    I remember seeing a tutorial on enabling the fourth option, but after that you would need custom packets.

    Offlineruneball

    • Member
    • **
    • Posts: 69
    • Thanks: +0/-0
      • View Profile
    Re: Multi Shops
    « Reply #5 on: July 22, 2015, 03:43:21 PM »
    i need on each shop only 2 so i don't need a 3rd one i just delete the 3rd option for it

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: Multi Shops
    « Reply #6 on: July 22, 2015, 03:47:02 PM »
    i need on each shop only 2 so i don't need a 3rd one i just delete the 3rd option for it
    It was simply just a warning.

    Offlineruneball

    • Member
    • **
    • Posts: 69
    • Thanks: +0/-0
      • View Profile
    Re: Multi Shops
    « Reply #7 on: July 22, 2015, 03:48:40 PM »
    thx for the help guys :) worked








    OfflinePVM Elite

    • First Time Poster
    • *
    • Posts: 3
    • Thanks: +0/-0
      • View Profile
    Re: Multi Shops
    « Reply #8 on: July 22, 2015, 03:50:31 PM »
    The problem with PvM's idea is, I believe the SERVER only handles 3 click options (Not counting attack - that ones a little bit different..)
    I remember seeing a tutorial on enabling the fourth option, but after that you would need custom packets.

    What do you mean the server can only handle 3 click options? Like for my slayer master he has 4 options.

    1)Talk
    2)shop
    3)Teleport to task
    4)Teleport to frost dragons.

    And they all work if that is what you are talking about. But you are right after the 4th it does require custom packets.

    And yes there is a tutorial on it like you mentioned. I posted the link to it on the bottom of my first reply.


    But if he was wanting to do lets say 40 shops using 1 npc then your way is the way to go using the dialogue handler. I would hate to see someone trying to create custom packets for like 40 right click actions on a npc lol.
    « Last Edit: July 22, 2015, 03:54:23 PM by PVM Elite »
    Got a project and need a developer? PM me or skype me @ pvm.elite to talk more.

    Offlineruneball

    • Member
    • **
    • Posts: 69
    • Thanks: +0/-0
      • View Profile
    Re: Multi Shops
    « Reply #9 on: July 22, 2015, 03:59:07 PM »
    But if he was wanting to do lets say 40 shops using 1 npc then your way is the way to go using the dialogue handler. I would hate to see someone trying to create custom packets for like 40 right click actions on a npc lol.

    well then ur fudgeed up if you need to do that mines only goes to    public void thirdClickNpc(int npcType) {

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: Multi Shops (solved)
    « Reply #10 on: July 22, 2015, 04:04:55 PM »
    The problem with PvM's idea is, I believe the SERVER only handles 3 click options (Not counting attack - that ones a little bit different..)
    I remember seeing a tutorial on enabling the fourth option, but after that you would need custom packets.

    What do you mean the server can only handle 3 click options? Like for my slayer master he has 4 options.

    1)Talk
    2)shop
    3)Teleport to task
    4)Teleport to frost dragons.

    And they all work if that is what you are talking about. But you are right after the 4th it does require custom packets.

    And yes there is a tutorial on it like you mentioned. I posted the link to it on the bottom of my first reply.


    But if he was wanting to do lets say 40 shops using 1 npc then your way is the way to go using the dialogue handler. I would hate to see someone trying to create custom packets for like 40 right click actions on a npc lol.
    Yes but what I meant was by default.
    The server only has packet data for the 3 packets.
    So, by that logic, it can only handle, 3 options.

    You added the packet for the fourth, therefore making it able to handle.. 4 options.
    Get my point now?

    OfflinePVM Elite

    • First Time Poster
    • *
    • Posts: 3
    • Thanks: +0/-0
      • View Profile
    Re: Multi Shops (solved)
    « Reply #11 on: July 22, 2015, 04:38:07 PM »
    The problem with PvM's idea is, I believe the SERVER only handles 3 click options (Not counting attack - that ones a little bit different..)
    I remember seeing a tutorial on enabling the fourth option, but after that you would need custom packets.

    What do you mean the server can only handle 3 click options? Like for my slayer master he has 4 options.

    1)Talk
    2)shop
    3)Teleport to task
    4)Teleport to frost dragons.

    And they all work if that is what you are talking about. But you are right after the 4th it does require custom packets.

    And yes there is a tutorial on it like you mentioned. I posted the link to it on the bottom of my first reply.


    But if he was wanting to do lets say 40 shops using 1 npc then your way is the way to go using the dialogue handler. I would hate to see someone trying to create custom packets for like 40 right click actions on a npc lol.
    Yes but what I meant was by default.
    The server only has packet data for the 3 packets.
    So, by that logic, it can only handle, 3 options.

    You added the packet for the fourth, therefore making it able to handle.. 4 options.
    Get my point now?

    Ah okay yes I understand you now. Thanks for clarifying.
    Got a project and need a developer? PM me or skype me @ pvm.elite to talk more.

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal