Thread: RSPS Library

Page 6 of 8 FirstFirst ... 45678 LastLast
Results 51 to 60 of 73
  1. #51  
    Registered Member
    Necrotic's Avatar
    Join Date
    Mar 2016
    Posts
    158
    Thanks given
    156
    Thanks received
    56
    Rep Power
    130
    This is actually a high quality project, sending love.
    Reply With Quote  
     

  2. #52  
    Registered Member
    Join Date
    May 2017
    Posts
    124
    Thanks given
    41
    Thanks received
    43
    Rep Power
    56
    Upcoming: I'm going to be finishing off some unfinished classes that are very necessary such as configuration. I'm also going to be adding some type of shop system. This would be a type of feature

    Code:
    	/**
    	 * This method is just pseudo-code.
    	 * 
    	 * The shopper is the entity buying something, the item is obviously the item being bought
    	 */
    	public boolean buyable(Shopper shopper, ShopItem item) {
    		ShopCurrency currency = this.readCurrency(shopper, PlayerVariables.class, "dragon_tokens");//You can retrieve a currency by reading a class variable
    		
    		/** OR THIS **/
    		
    		ShopCurrency currency = this.readCurrency(shopper, 995);//Of course you can do it with items too
    		
    		return currency.test(item.requirement()); //The currency is a predicate that tests if the currency meets the item requirements to buy it
    	}
    
    		/**
    	 * There will be a built-in ContainerHandler {@link container.ContainerHandler} within the shop
    	 * class, so any currency (whether variables or items) will be transacted accordingly. You will also
    	 * be able to add quest requirements or any other things you can think of, maybe event something to
    	 * be handled through events.
    	 * 
    	 * Also with the new DataCenter class you will be accessing Shop data from there like so:
    	 * 
    	 * ConfigSection shopInformation = DataCenter.retrieveData("shops", 2, "shop_info", ConfigSection.class);
    	 * 				shopInformation.getString("shop_name");
    	 * 				shopInformation.getInt("quest_requirement");
    	 * ConfigSection itemInformation = DataCenter.retrieveData("shops", 2, "shop_info", ConfigSection.class);
    	 * 				itemInformation.getInt("cost");
    	 * 				itemInformation.getInt("restock_rate");
    	 * 				itemInformation.getInt("stock_limit");
    	 */
    Give me any suggestions before I start developing into this design
    Reply With Quote  
     

  3. #53  
    Registered Member
    Join Date
    May 2017
    Posts
    124
    Thanks given
    41
    Thanks received
    43
    Rep Power
    56
    _jordan has completely added issac to the library but I still need to find a good flexible design for it so there isn't more work on the user's project
    Reply With Quote  
     

  4. #54  
    Registered Member
    Join Date
    May 2017
    Posts
    124
    Thanks given
    41
    Thanks received
    43
    Rep Power
    56
    issac has been implemented to the library
    Reply With Quote  
     

  5. #55  
    Registered Member
    Join Date
    May 2016
    Posts
    384
    Thanks given
    52
    Thanks received
    35
    Rep Power
    29
    Quote Originally Posted by Dragonsevery View Post
    added issac to the library but I still need to find a good flexible design
    You should look through how Apollo have done it, https://www.rune-server.ee/runescape...44-apollo.html
    donald trump approves this message
    Reply With Quote  
     

  6. #56  
    Registered Member
    Tyluur's Avatar
    Join Date
    Jun 2010
    Age
    26
    Posts
    5,103
    Thanks given
    1,818
    Thanks received
    1,767
    Rep Power
    2438
    I liked where this project was heading, what happened?
    Quote Originally Posted by blakeman8192 View Post
    Keep trying. Quitting is the only true failure.
    Spoiler for skrrrrr:

    Attached image
    Reply With Quote  
     

  7. Thankful user:


  8. #57  
    Registered Member
    Join Date
    May 2017
    Posts
    124
    Thanks given
    41
    Thanks received
    43
    Rep Power
    56
    I'm always working on this, I've got a combat system about to be pushed, but I'm also working on a game server to actually show the things I've implemented into this library. I've completely forgotten about writing the wiki to show everyone how to use this library, that's something I should be working on

    Also, when a project doesn't have updates in a while, usually it's safe to assume the project is dead...except mine This isn't a project that can die, but only improve
    Reply With Quote  
     

  9. Thankful user:


  10. #58  
    Registered Member
    Tyluur's Avatar
    Join Date
    Jun 2010
    Age
    26
    Posts
    5,103
    Thanks given
    1,818
    Thanks received
    1,767
    Rep Power
    2438
    Quote Originally Posted by Dragonsevery View Post
    I'm always working on this, I've got a combat system about to be pushed, but I'm also working on a game server to actually show the things I've implemented into this library. I've completely forgotten about writing the wiki to show everyone how to use this library, that's something I should be working on

    Also, when a project doesn't have updates in a while, usually it's safe to assume the project is dead...except mine This isn't a project that can die, but only improve
    I'm planning on using this library, any updates?
    Quote Originally Posted by blakeman8192 View Post
    Keep trying. Quitting is the only true failure.
    Spoiler for skrrrrr:

    Attached image
    Reply With Quote  
     

  11. #59  
    Registered Member
    Join Date
    May 2017
    Posts
    124
    Thanks given
    41
    Thanks received
    43
    Rep Power
    56
    Quote Originally Posted by Tyluur View Post
    I'm planning on using this library, any updates?

    I've run out of ideas at the moment,
    I believe it contains the most useful parts for a server. You don't need to create a new server to use it either, just import the library and use what you need

    I've got a couple things on the todo list I completely forgot about


    Oh yeah, by the way this is what dialogs look like:

    Code:
    public class MatthiasDialog extends NPCDialog {
    
    	public MatthiasDialog(Player player, boolean instantly) {
    		super(player, 5092);
    
    		Item weapon = player.getEquipment().get(3);
    		Item shield = player.getEquipment().get(WieldType.SHIELD.getSlot());
    		if (instantly) {
    			if (weapon != null && (weapon.getId() == 10024 || weapon.getId() == 10023)) {
    				npc(HAPPY, "Are you done with my falcon?");
    				options("Yes", () -> {
    					npc(HAPPY, "Okay, thank you");
    					player.getEquipment().set(3, null);
    				}, "No", () -> this.finish());
    			} else {
    				options("Okay. Pay the 500 coins", () -> {
    					if (weapon != null || shield != null) {
    						npc(CONFUSED, "You must have both hands free to use the falcon.");
    					} else {
    						if (player.getInventory().remove(new Item(995, 500))) {
    							npc(HAPPY, "Alright, here you go.");
    							player.getEquipment().set(3, new Item(10024));
    						} else {
    							npc(CONFUSED, "You don't have enough to pay for my falcon.");
    						}
    					}
    				}, "No, I'll keep my money", () -> finish());
    			}
    		} else {
    			if (weapon != null && (weapon.getId() == 10024 || weapon.getId() == 10023)) {
    				npc(HAPPY, "Are you done with my falcon?");
    				options("Yes", () -> {
    					npc(HAPPY, "Okay, thank you");
    					player.getEquipment().set(3, null);
    				}, "No", () -> this.finish());
    			} else {
    				npc(HAPPY, "Hello, " + player.getName() + ". I can allow you to use my falcon to catch these kebbits at a good price. What do you say?");
    				options("Okay", () -> {
    					npc(HAPPY, "It will cost you 500 coins to use my falcon.");
    					options("Pay the 500 coins", () -> {
    						if (weapon != null || shield != null) {
    							npc(CONFUSED, "You must have both hands free to use the falcon.");
    						} else {
    							if (player.getInventory().remove(new Item(995, 500))) {
    								npc(HAPPY, "Alright, here you go.");
    								player.getEquipment().set(3, new Item(10024));
    							} else {
    								npc(CONFUSED, "You don't have enough to pay for my falcon.");
    							}
    						}
    					}, "No, I'll keep my money", () -> finish());
    				}, "No", () -> this.finish());
    			}
    		}
    	}
    
    }
    Reply With Quote  
     

  12. #60  
    Registered Member
    Tyluur's Avatar
    Join Date
    Jun 2010
    Age
    26
    Posts
    5,103
    Thanks given
    1,818
    Thanks received
    1,767
    Rep Power
    2438
    Quote Originally Posted by Dragonsevery View Post

    I've run out of ideas at the moment,
    I believe it contains the most useful parts for a server. You don't need to create a new server to use it either, just import the library and use what you need

    I've got a couple things on the todo list I completely forgot about


    Oh yeah, by the way this is what dialogs look like:

    Code:
    public class MatthiasDialog extends NPCDialog {
    
    	public MatthiasDialog(Player player, boolean instantly) {
    		super(player, 5092);
    
    		Item weapon = player.getEquipment().get(3);
    		Item shield = player.getEquipment().get(WieldType.SHIELD.getSlot());
    		if (instantly) {
    			if (weapon != null && (weapon.getId() == 10024 || weapon.getId() == 10023)) {
    				npc(HAPPY, "Are you done with my falcon?");
    				options("Yes", () -> {
    					npc(HAPPY, "Okay, thank you");
    					player.getEquipment().set(3, null);
    				}, "No", () -> this.finish());
    			} else {
    				options("Okay. Pay the 500 coins", () -> {
    					if (weapon != null || shield != null) {
    						npc(CONFUSED, "You must have both hands free to use the falcon.");
    					} else {
    						if (player.getInventory().remove(new Item(995, 500))) {
    							npc(HAPPY, "Alright, here you go.");
    							player.getEquipment().set(3, new Item(10024));
    						} else {
    							npc(CONFUSED, "You don't have enough to pay for my falcon.");
    						}
    					}
    				}, "No, I'll keep my money", () -> finish());
    			}
    		} else {
    			if (weapon != null && (weapon.getId() == 10024 || weapon.getId() == 10023)) {
    				npc(HAPPY, "Are you done with my falcon?");
    				options("Yes", () -> {
    					npc(HAPPY, "Okay, thank you");
    					player.getEquipment().set(3, null);
    				}, "No", () -> this.finish());
    			} else {
    				npc(HAPPY, "Hello, " + player.getName() + ". I can allow you to use my falcon to catch these kebbits at a good price. What do you say?");
    				options("Okay", () -> {
    					npc(HAPPY, "It will cost you 500 coins to use my falcon.");
    					options("Pay the 500 coins", () -> {
    						if (weapon != null || shield != null) {
    							npc(CONFUSED, "You must have both hands free to use the falcon.");
    						} else {
    							if (player.getInventory().remove(new Item(995, 500))) {
    								npc(HAPPY, "Alright, here you go.");
    								player.getEquipment().set(3, new Item(10024));
    							} else {
    								npc(CONFUSED, "You don't have enough to pay for my falcon.");
    							}
    						}
    					}, "No, I'll keep my money", () -> finish());
    				}, "No", () -> this.finish());
    			}
    		}
    	}
    
    }
    I'm planning on using these for dialogues in RedRune. One thing I've noticed that any RSPS doesn't have is dialogue queuing, as in when you're in a dialogue and another one pops up (lets say "Congratulations, you have reached level 99" for example), the new one gets priority over the previous one, but the previous one still exists once the dominant one has ended. This would be a good addition to your library.
    Quote Originally Posted by blakeman8192 View Post
    Keep trying. Quitting is the only true failure.
    Spoiler for skrrrrr:

    Attached image
    Reply With Quote  
     

  13. Thankful users:


Page 6 of 8 FirstFirst ... 45678 LastLast

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. What kind of library would help the current RSPS advance?
    By Nio.. in forum RS 503+ Client & Server
    Replies: 8
    Last Post: 06-24-2010, 09:31 AM
  2. RSPS Banlist Project
    By Nets8 in forum Tools
    Replies: 14
    Last Post: 04-15-2009, 01:46 AM
  3. RSPS Server Library
    By Shiver in forum Downloads
    Replies: 49
    Last Post: 02-15-2009, 03:18 AM
  4. Solumstone RSPS Ready
    By sam0507 in forum Tools
    Replies: 0
    Last Post: 12-17-2007, 03:14 AM
  5. RSPS Fundamentals
    By Rat Dawg in forum Tutorials
    Replies: 5
    Last Post: 12-10-2007, 01:53 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
  •