Thread: [RUSE-Morytania] Weird Point System and how to use?

Results 1 to 3 of 3
  1. #1 [RUSE-Morytania] Weird Point System and how to use? 
    Registered Member KripkeUnites's Avatar
    Join Date
    Feb 2019
    Posts
    83
    Thanks given
    12
    Thanks received
    11
    Rep Power
    20
    Hey guys!

    When I initially got the morytania source, I straight away went about adding my own point systems. After I was done I moved on to more important content thinking my job was complete. HOWEVER, after going back and investigating it would appear the two point systems I created work but when a player purchases an item, it resets their points to the negative equivalent of the item they purchased. So if they purchased bandos tassets for 200 points they now have -200 points.
    SMFH right?

    So I went about reading about how the working point systems work within the source. For some reason some of the point systems load through PointsHandler, and some directly through the Player file. I paid GOON to fix my prestige points, however this problem remains.

    Why is this happening? Currently the points in question are loading through the player class, and I checked all the classpaths in playerloading, playersaving, and shop.java and they are all loading through the player file and not the pointshandler file. When I tried using the pointshandler file to load these points Eclipse was telling me that the int was being used improperly, even though it was matching the working existing point systems.

    Any advice or explanation of how to add points properly is welcome! Thanks for reading

    PS. I suppose I should clarify in my player saving class it uses json

    this is whats in my player loading class:
    Code:
    			if (reader.has("rift-points")) {
    				player.setRiftPoints(reader.get("rift-points").getAsInt());
    			}
    and this is in my player saving:
    Code:
    object.addProperty("rift-points", new Integer(player.getRiftPoints()));
    Im fairly certain the issue does not reside within my shop class but if you want those posted I will
    Reply With Quote  
     

  2. #2  
    nice


    Join Date
    Jul 2014
    Posts
    740
    Thanks given
    382
    Thanks received
    562
    Rep Power
    4239
    show Shop class
    Reply With Quote  
     

  3. #3  
    Registered Member
    Grant_'s Avatar
    Join Date
    Aug 2014
    Posts
    495
    Thanks given
    96
    Thanks received
    109
    Rep Power
    136
    Quote Originally Posted by KripkeUnites View Post
    Hey guys!

    When I initially got the morytania source, I straight away went about adding my own point systems. After I was done I moved on to more important content thinking my job was complete. HOWEVER, after going back and investigating it would appear the two point systems I created work but when a player purchases an item, it resets their points to the negative equivalent of the item they purchased. So if they purchased bandos tassets for 200 points they now have -200 points.
    SMFH right?

    So I went about reading about how the working point systems work within the source. For some reason some of the point systems load through PointsHandler, and some directly through the Player file. I paid GOON to fix my prestige points, however this problem remains.

    Why is this happening? Currently the points in question are loading through the player class, and I checked all the classpaths in playerloading, playersaving, and shop.java and they are all loading through the player file and not the pointshandler file. When I tried using the pointshandler file to load these points Eclipse was telling me that the int was being used improperly, even though it was matching the working existing point systems.

    Any advice or explanation of how to add points properly is welcome! Thanks for reading

    PS. I suppose I should clarify in my player saving class it uses json

    this is whats in my player loading class:
    Code:
    			if (reader.has("rift-points")) {
    				player.setRiftPoints(reader.get("rift-points").getAsInt());
    			}
    and this is in my player saving:
    Code:
    object.addProperty("rift-points", new Integer(player.getRiftPoints()));
    Im fairly certain the issue does not reside within my shop class but if you want those posted I will
    Your player-saving logic wouldn't have anything to do with purchasing an item. Player-saving is simply just to store the variable on logout/save in a file and then read it back once the player has logged in. Seems like you have that functionality working. I do believe that there is an issue with how you are handling the custom point system inside your ShopHandler, ShopAssistant (whatever the name of your shop buying and selling class is).

    You may try posting that here. I'd suggest maybe giving some insight as to what you modified in that class if you do so. Or if you did anything at all to your shop handling class.
    Attached image
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Replies: 0
    Last Post: 09-04-2013, 01:29 AM
  2. Enhanced for-loops and how to use them
    By TheRedArmy in forum Tutorials
    Replies: 8
    Last Post: 02-05-2011, 10:29 PM
  3. Replies: 35
    Last Post: 04-20-2010, 08:32 PM
  4. Replies: 9
    Last Post: 06-30-2009, 02:20 PM
  5. Replies: 18
    Last Post: 05-18-2008, 11:43 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •