Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • SOUPSOUP: just get a vpn
      August 13, 2018, 06:44:28 PM
    • jme: _^_ will answer all of your javascript questions
      August 12, 2018, 07:11:00 PM
    • doomsale: and where is boxman?
      August 10, 2018, 03:16:59 AM
    • doomsale: Where can i play the Moparscape MMORPG with the Metallica instrumentals?
      August 10, 2018, 03:16:47 AM
    • doomsale: no longer clicking on doors and dummies at east bank
      August 10, 2018, 03:16:07 AM
    • doomsale: were all grown up now huh?
      August 10, 2018, 03:15:58 AM
    • _^_: hey everyone look at my graphs [link]
      August 06, 2018, 01:52:16 PM
    • braedyn: Someone pl0x help me out with PI Lottery!!
      August 03, 2018, 02:12:25 AM
    • Travas: p3n1s
      July 26, 2018, 09:46:33 PM
    • Krackkid: You up :eggplant:
      July 23, 2018, 06:18:17 PM
    • DeathsChaos9: no
      July 23, 2018, 03:53:31 PM
    • Emulous: Come check out Emulous: [link]
      July 22, 2018, 03:37:19 PM
    • Emulous:[link]
      July 22, 2018, 03:37:00 PM
    • Travas: ur mom
      July 21, 2018, 06:04:50 PM
    • YNRDAB: Watcha big ballers up too?
      July 20, 2018, 11:01:06 AM
    • dark250: i need help for coding client
      July 19, 2018, 08:27:37 AM
    • Travas: yes
      July 14, 2018, 02:19:44 PM
    • drubrkletern: lmao racist and sexist much?
      July 14, 2018, 01:11:52 PM
    • Cole1497: yeah i got you lil boat give me a second
      July 13, 2018, 03:19:35 AM
    • B0ATY.: yo can anyone unban my ip, i got banned for saying i hope someone gets aids :p
      July 12, 2018, 09:16:00 PM

    Author Topic: Multi Shops (solved)  (Read 783 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 »
    Runescape Gambling

    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.
    Runescape Gambling

    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.
    Runescape Gambling

    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