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: Official MoparScape Server - In Development  (Read 69286 times)

    0 Members and 1 Guest are viewing this topic.

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Well I must have forgot to set the default. The bounds thing should work but I just realized the iteration code should be: random.nextInt(1) + 1
    yea I already changed that :P Well, random.nextInt(2) + 1 because nextInt(1) always returns 0

    I have it commented in the code snipped I posted :P
    « Last Edit: June 09, 2014, 07:32:51 PM by Davidi2 »
    Runescape Gambling

    Offlinerunescape120

    • Member
    • **
    • Posts: 7
    • Thanks: +0/-0
      • View Profile
    is the server up?
    Runescape Gambling

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    is the server up?
    No, it is in development currently and not yet in a stable alpha or beta stage, sorry.
    Runescape Gambling

    OfflineDan0194

    • Member
    • ****
    • Posts: 1,140
    • Thanks: +0/-0
      • View Profile
    I heard you should only call methods that are in it's own class.
    lol who told you winterLove had bad codes
    Smart man.
    if you read this your a fagit

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    I heard you should only call methods that are in it's own class.
    What?

    OfflineDan0194

    • Member
    • ****
    • Posts: 1,140
    • Thanks: +0/-0
      • View Profile
    In your CombatAction class your constructer has
    Code: Java
    1. mob.getCombatHandler().initiate(target);
    I heard that you should only call methods in that own class. That's wrong?
    lol who told you winterLove had bad codes
    Smart man.
    if you read this your a fagit

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    I mean... if that is a thing I've never heard of it. It does make a bit of sense from a design standpoint, so if it bothers you just create an init() method that is called at the end of the constructor. Personally I don't see it as big enough of a deal to worry about for now. Also worth pointing out that it wouldn't really matter if the method was in its own class, it would depend on what those methods do.

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    Well I must have forgot to set the default. The bounds thing should work but I just realized the iteration code should be: random.nextInt(1) + 1
    yea I already changed that :P Well, random.nextInt(2) + 1 because nextInt(1) always returns 0

    I have it commented in the code snipped I posted :P

    oh it is exclusive, I see. well then...

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Bows/crossbows done today, and I can pretty much copy what I did for them for all the thrown weapons as well. It's looking like I may be able to have a more stable prealpha up in a week or two for a few days?


    TODO for pre alpha:
    More shop definitions
    More NPC definitions/spawns (maybe make some drops too)
    Equipment level requirementsDONE
    Equipment bonusesDONE
    More magic definitions
    Prayer (maybe)
    Actual hit chance calculations
    Friends lists/PMingDONE


    « Last Edit: June 12, 2014, 08:30:13 PM by Davidi2 »

    Offlinesini

    • Member
    • ****
    • *
    • *
    • Posts: 5,785
    • Thanks: +0/-0
      • View Profile
    gaaaaaaaay

    Offlinearham 4

    • Member
    • ****
    • *
    • Posts: 6,721
    • Thanks: +0/-0
      • View Profile
    TODO for pre alpha:
    More shop definitions
    More NPC definitions/spawns (maybe make some drops too)
    Equipment level requirements
    Equipment bonuses
    More magic definitions
    Prayer (maybe)
    Friends lists/PMing
    Why do pre-alpha is there is barely any content for us to see/test. :P
    lolol remember when mopar was a thing

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    TODO for pre alpha:
    More shop definitions
    More NPC definitions/spawns (maybe make some drops too)
    Equipment level requirements
    Equipment bonuses
    More magic definitions
    Prayer (maybe)
    Friends lists/PMing
    Why do pre-alpha is there is barely any content for us to see/test. :P
    Because that's the point of pre-alpha.
    It's not even alpha stage, there's plenty of time for content to be added before the actual alpha or beta, or release.

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Pre alpha will be for people to test more mechanical things. I had someone on today that helped me find yet another error with player updating I had to fix. It's things that like in the core of the server I want to make sure function before we get a lot of people on testing content. There will be some content (most of smithing, fishing, woodcutting, firemaking, etc were done months ago) but I want to make sure nothing major will cause the server to crash and such. The normal alpha stage will be once most of that core is done and I am finishing up the core skills (rest of magic, crafting, polishing runecrafting, slayer, herblore, thieving) and stuff like that (especially getting all the missing animations and definitions). Once that's done, beta will probably just be a larger volume of people stress testing the server and finding bugs.
    « Last Edit: June 10, 2014, 06:59:04 PM by Davidi2 »

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Added the friends/ignore lists and private messaging

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Added the friends/ignore lists and private messaging
    Hey, you're not allowed to double post!
    Lol, jokes.
    Does the ignore list work properly, or is it just there?

    Offlinearham 4

    • Member
    • ****
    • *
    • Posts: 6,721
    • Thanks: +0/-0
      • View Profile
    Added the friends/ignore lists and private messaging
    Hey, you're not allowed to double post!
    Lol, jokes.
    Does the ignore list work properly, or is it just there?
    I never really have understood what adding a person to the ignore list does lol.
    lolol remember when mopar was a thing

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    It works properly. Take a look at the canSeeMee method and the status updating methods.

    Code: Java
    1. publicclass Friends {
    2.  
    3.         publicenum PrivacySetting {
    4.                 ON, FRIENDS, OFF, HIDE
    5.         }
    6.  
    7.         publicenum FriendsListStatus {
    8.                 LOADING, CONNECTING, CONNECTED
    9.         }
    10.  
    11.         privatefinal Player player;
    12.  
    13.         private List<Long> friendsList;
    14.         private List<Long> ignoreList;
    15.  
    16.         privatefinal Set<Long> onlineFriends =new HashSet<Long>();
    17.  
    18.         private PrivacySetting privateChat = PrivacySetting.ON;
    19.         private PrivacySetting publicChat = PrivacySetting.ON;
    20.         private PrivacySetting trade = PrivacySetting.ON;
    21.  
    22.         privateint messageTicket;
    23.        
    24.        
    25.         public Friends(Player player){
    26.                 this.player= player;
    27.         }
    28.  
    29.         publicvoid init(){
    30.                 player.send(new PrivacySettingsUpdateMessage(publicChat.ordinal(), privateChat.ordinal(), trade.ordinal()));
    31.                 player.send(new FriendsListStatusMessage((byte) FriendsListStatus.CONNECTED.ordinal()));
    32.  
    33.                 List<Long> toUpdate =new ArrayList<Long>(friendsList);
    34.                 for(Player other : World.getWorld().getPlayers()){
    35.                         if(toUpdate.isEmpty()){
    36.                                 break;
    37.                         }
    38.                         if(toUpdate.contains(other.getLongUsername())){
    39.                                 toUpdate.remove(other.getLongUsername());
    40.                                 if(other.getFriends().canSeeMe(player)){
    41.                                         player.send(new FriendStatusMessage(other.getLongUsername(), 1));
    42.                                         onlineFriends.add(other.getLongUsername());
    43.                                 }else{
    44.                                         player.send(new FriendStatusMessage(other.getLongUsername(), 0));
    45.                                 }
    46.                         }
    47.                 }
    48.  
    49.                 for(Long friend : toUpdate){
    50.                         player.send(new FriendStatusMessage(friend, 0));
    51.                 }
    52.                 if(ignoreList.size()>0){
    53.                         player.send(new SendIgnoresMessage(ignoreList));
    54.                 }
    55.                 login();
    56.         }
    57.        
    58.         publicvoid privateChatSent(long name, byte[] packed){
    59.                 if(!friendsList.contains(name)){
    60.                         return;
    61.                 }
    62.                 // Repack the text to ensure its all valid
    63.                 String text = ChatUtils.unpack(packed);
    64.                 packed =newbyte[256];
    65.                 int len = ChatUtils.pack(text, packed);
    66.                 packed =Arrays.copyOf(packed, len);
    67.                 Player other = World.getWorld().getPlayerByLongName(name);
    68.                 if(other !=null){
    69.                         if(other.getFriends().canSeeMe(player)){
    70.                                 other.send(new PrivateChatReceivedMessage(player.getLongUsername(), (byte) player.getRights(), packed, other.getFriends().getNextMessageTicket()));
    71.                                 player.send(new PrivateChatSentMessage(name, packed));
    72.                         }
    73.                 }
    74.                
    75.         }
    76.        
    77.         publicvoid addFriend(long name){
    78.                 if(friendsList.contains(name)|| ignoreList.contains(name)|| name == player.getLongUsername()){
    79.                         return;
    80.                 }
    81.                 if(friendsList.size()>=200){
    82.                         player.sendMessage("Your friends list is full!");
    83.                         return;
    84.                 }
    85.                 friendsList.add(name);
    86.                 Player other = World.getWorld().getPlayerByLongName(name);
    87.                 if(other !=null){
    88.                         if(other.getFriends().canSeeMe(player)){
    89.                                 loggedIn(other);
    90.                         }
    91.                         if(privateChat == PrivacySetting.FRIENDS){
    92.                                 other.getFriends().loggedIn(player);
    93.                         }
    94.                 }
    95.         }
    96.  
    97.         publicvoid addIgnore(long name){
    98.                 if(friendsList.contains(name)|| ignoreList.contains(name)|| name == player.getLongUsername()){
    99.                         return;
    100.                 }
    101.                 if(ignoreList.size()>=100){
    102.                         player.sendMessage("Your ignore list is full!");
    103.                         return;
    104.                 }
    105.                 ignoreList.add(name);
    106.                 Player other = World.getWorld().getPlayerByLongName(name);
    107.                 if(other !=null){
    108.                         other.getFriends().loggedOut(player);
    109.                 }
    110.         }
    111.  
    112.         publicvoid removeFriend(long name){
    113.                 if(!friendsList.contains(name)|| name == player.getLongUsername()){
    114.                         return;
    115.                 }
    116.                 friendsList.remove(name);
    117.                 Player other = World.getWorld().getPlayerByLongName(name);
    118.                 if(other !=null){
    119.                         if(privateChat == PrivacySetting.FRIENDS){
    120.                                 other.getFriends().loggedOut(player);
    121.                         }
    122.                 }
    123.         }
    124.  
    125.         publicvoid removeIgnore(long name){
    126.                 if(!ignoreList.contains(name)|| name == player.getLongUsername()){
    127.                         return;
    128.                 }
    129.                 ignoreList.remove(name);
    130.                 Player other = World.getWorld().getPlayerByLongName(name);
    131.                 if(other !=null){
    132.                         if(privateChat == PrivacySetting.ON){
    133.                                 other.getFriends().loggedIn(player);
    134.                         }
    135.                 }
    136.         }
    137.  
    138.         publicvoid loggedIn(Player other){
    139.                 if(friendsList.contains(other.getLongUsername())){
    140.                         if(!onlineFriends.contains(other.getLongUsername())){
    141.                                 player.send(new FriendStatusMessage(other.getLongUsername(), 1));
    142.                                 onlineFriends.add(other.getLongUsername());
    143.                         }
    144.                 }
    145.         }
    146.  
    147.         publicvoid loggedOut(Player other){
    148.                 if(onlineFriends.contains(other.getLongUsername())){
    149.                         player.send(new FriendStatusMessage(other.getLongUsername(), 0));
    150.                         onlineFriends.remove(other.getLongUsername());
    151.                 }
    152.         }
    153.  
    154.         publicboolean canSeeMe(Player other){
    155.                 switch(privateChat){
    156.                 case FRIENDS:
    157.                         return friendsList.contains(other.getLongUsername());
    158.                 case ON:
    159.                         return!ignoreList.contains(other.getLongUsername());
    160.                 default:
    161.                         returnfalse;
    162.                 }
    163.         }
    164.  
    165.         publicvoid login(){
    166.                 for(Player other : World.getWorld().getPlayers()){
    167.                         if(canSeeMe(other)){
    168.                                 other.getFriends().loggedIn(player);
    169.                         }
    170.                 }
    171.         }
    172.  
    173.         publicvoid refresh(){
    174.                 for(Player other : World.getWorld().getPlayers()){
    175.                         if(canSeeMe(other)){
    176.                                 other.getFriends().loggedIn(player);
    177.                         }else{
    178.                                 other.getFriends().loggedOut(player);
    179.                         }
    180.                 }
    181.         }
    182.  
    183.         publicvoid changePrivateChat(int status){
    184.                 if(status >2|| status <0|| status == privateChat.ordinal()){
    185.                         return;
    186.                 }
    187.                 privateChat = PrivacySetting.values()[status];
    188.                 refresh();
    189.         }
    190.  
    191.         publicvoid changePublicChat(int status){
    192.                 if(status >3|| status <0|| status == publicChat.ordinal()){
    193.                         return;
    194.                 }
    195.                 publicChat = PrivacySetting.values()[status];
    196.         }
    197.  
    198.         publicvoid changeTrade(int status){
    199.                 if(status >2|| status <0|| status == trade.ordinal()){
    200.                         return;
    201.                 }
    202.                 trade = PrivacySetting.values()[status];
    203.         }
    204.  
    205.         publicvoid loadedLists(List<Long> friendsList, List<Long> ignoreList){
    206.                 this.friendsList= friendsList;
    207.                 this.ignoreList= ignoreList;
    208.         }
    209.  
    210.         publicvoid loadedPrivateChat(int privateChat){
    211.                 this.privateChat= PrivacySetting.values()[privateChat];
    212.         }
    213.  
    214.         publicvoid loadedPublicChat(int publicChat){
    215.                 this.publicChat= PrivacySetting.values()[publicChat];
    216.         }
    217.  
    218.         publicvoid loadedTrade(int trade){
    219.                 this.trade= PrivacySetting.values()[trade];
    220.         }
    221.  
    222.         public List<Long> getFriendsList(){
    223.                 return friendsList;
    224.         }
    225.  
    226.         public List<Long> getIgnoreList(){
    227.                 return ignoreList;
    228.         }
    229.  
    230.         public PrivacySetting getPrivateChat(){
    231.                 return privateChat;
    232.         }
    233.  
    234.         public PrivacySetting getPublicChat(){
    235.                 return publicChat;
    236.         }
    237.  
    238.         public PrivacySetting getTrade(){
    239.                 return trade;
    240.         }
    241.        
    242.         publicint getNextMessageTicket(){
    243.                 return++messageTicket;
    244.         }
    245.  
    246. }

    Working on getting equipment level requirements now

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Added the friends/ignore lists and private messaging
    Hey, you're not allowed to double post!
    Lol, jokes.
    Does the ignore list work properly, or is it just there?
    I never really have understood what adding a person to the ignore list does lol.
    Wow, then you've clearly NEVER played RuneScape (especially now with all the gold seller auto chat bots, if they're still around like they were).
    Ignoring a person does just that, ignores them.
    You won't see any PM's from them, they see you as offline, and neither will see each others message (I don't know if it's filtered in CC, but in public chat I know for a fact it is).

    In the early days of the GE in RuneScape, there were at least 50+ spam bots sitting at the entrance. They would flood your chatbox, making the GE the worst place for communication. Unless you "ignored" all of the spam bots, and then you'd only see the chats from the active players.
    (this was the same for Lumby back when the GE wasn't a thing)

    OfflineDavidi2

    • Member
    • ****
    • *
    • Posts: 23,272
    • Thanks: +0/-0
      • View Profile
    Magic and prayer requirements done... almost done with range... then come the fun defense and attack requirements... woohoooo

    Offlinearham 4

    • Member
    • ****
    • *
    • Posts: 6,721
    • Thanks: +0/-0
      • View Profile
    Added the friends/ignore lists and private messaging
    Hey, you're not allowed to double post!
    Lol, jokes.
    Does the ignore list work properly, or is it just there?
    I never really have understood what adding a person to the ignore list does lol.
    Wow, then you've clearly NEVER played RuneScape (especially now with all the gold seller auto chat bots, if they're still around like they were).
    Ignoring a person does just that, ignores them.
    You won't see any PM's from them, they see you as offline, and neither will see each others message (I don't know if it's filtered in CC, but in public chat I know for a fact it is).

    In the early days of the GE in RuneScape, there were at least 50+ spam bots sitting at the entrance. They would flood your chatbox, making the GE the worst place for communication. Unless you "ignored" all of the spam bots, and then you'd only see the chats from the active players.
    (this was the same for Lumby back when the GE wasn't a thing)
    I never really used the ignore feature. Don't have a single person in my ignore lists to date.
    lolol remember when mopar was a thing

     

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