Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • King Bosnia: Any recommendations to private servers?
      October 18, 2018, 04:47:35 PM
    • FightMexoxo: oi i have the files if anyone whats em
      October 18, 2018, 12:44:42 AM
    • The Wanderer: Whoops
      October 15, 2018, 12:56:18 AM
    • The Wanderer: Making own operating system
      October 15, 2018, 12:56:11 AM
    • Travas: no
      October 07, 2018, 04:03:36 PM
    • Saltyspade10: Server still up and running?
      October 05, 2018, 07:13:41 PM
    • Wesam: Can someone upload moparscape.jar?
      October 05, 2018, 11:43:43 AM
    • Ligoe: yo
      September 30, 2018, 12:48:15 PM
    • Ligoe: how come i can't login the game
      September 30, 2018, 12:48:03 PM
    • fuzzout: Anybody here with experience in using Luna source? I'm looking to develop something, but can't seem to get any of my clients to work with it...
      September 26, 2018, 10:47:27 AM
    • `Discardedx2`: ?
      September 21, 2018, 12:24:09 PM
    • Pookey71: ARE YOU HERE TO RECEIVE MY LIMP PENIS!?
      September 20, 2018, 11:55:24 PM
    • Pookey71: THIS IS DEMOCRACY MANIFESTO
      September 20, 2018, 11:55:07 PM
    • Vasi28: Гранд
      September 03, 2018, 07:06:22 PM
    • Rash: test
      August 30, 2018, 09:09:18 PM
    • Guruu:[link]
      August 30, 2018, 12:04:45 AM
    • Guruu: am i allowed to post links shoutbox?
      August 30, 2018, 12:03:46 AM
    • drubrkletern:[link] feedback wanted
      August 28, 2018, 03:55:17 PM
    • bugz000: Anyone got a link for the old ass silab client and cache.zip? from mopar 3.2 era :) 317
      August 25, 2018, 12:48:15 AM
    • cholland2015: Does anyone know where I can download the old moparscape client/server?
      August 24, 2018, 02:30:51 PM

    Author Topic: Multi Shops (solved)  (Read 794 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