Jump to content

Search the Community

Showing results for tags 'functional'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Found 5 results

  1. [COLOR="#0000CD"][SIZE=4]Ever since I saw the HaxUnit hackers get their hands on the Rotten Potato in real Runescape, I've been dying to make my own, with commands and all. And yes, I am fully aware that this is beyond easy to code. However, this being my first "Show-Off" thread, I decided I'd start off small and work my way up. Before I show the pictures, I'd like to thank any and all developers of Matrix718 for the base of this item, prior to me adding onto it. [SIZE=4]Matrix718 is responsible for 100% of the Punishment tab shown[/SIZE]. Since starting my server, I've simply tweaked the commands within it to give more safety to server developers, added in logs in case I ever need to investigate an abuse, etc. I won't be showing the "Commands" option of the potato, or specific Macro Events locations for the safety and well-being of my server.[/SIZE][/COLOR] [SIZE=6][COLOR="#FF0000"]Punishment Panel:[/COLOR][/SIZE] [IMG]http://i.imgur.com/y4jULK0.jpg[/IMG] [IMG]http://i.imgur.com/D6fqjT2.jpg[/IMG] [IMG]http://i.imgur.com/dy81tjm.jpg[/IMG] [SIZE=6][COLOR="#FF0000"]Control Panel:[/COLOR][/SIZE] [IMG]http://i.imgur.com/45jXvi9.jpg[/IMG] [IMG]http://i.imgur.com/fxXnU6y.jpg[/IMG] [IMG]http://i.imgur.com/7dpSPGx.jpg[/IMG] [IMG]http://i.imgur.com/PpMhqbW.jpg[/IMG] [IMG]http://i.imgur.com/EThsZn5.jpg[/IMG] [COLOR="#008080"][SIZE=4]Thoughts/Comments/Constructive Criticism?[/SIZE][/COLOR]
  2. Hello Runelocus users, I was a private web developer for revox they decided to quit and i'm still looking for another great server to play. Thought this whole package of what the site is right now (Not fully functional as you can see, didn't had the time to finish before they quited) would be a good web base for some rsps websites. It is aprox. 80% done in functionality, only things left to code are: - Compare users (highscores) - View based on skill (highscores) - Donation system Make sure you are running a PHP version of 5.5 or higher before using this, if you have errors after uploading (No database errors) it will most likely be your PHP version that is out-dated. If you have an error like sayin 'Could not connect to the database' than you have to edit root/[b]src/Data/config/DBConfig.php[/b] with your database information. (Also make sure to import the database provided in the download) The community board is not included in this download link. The security for the website is also up-to-date when you keep respecting the workflow of the application regarding queries and form submits. You can download the whole package here including the database: [url]http://mafiasource.be/web/public/Revox.zip[/url] And don't hack my database ffs, to lazy to change it anyway. A demo is live on [url]http://revoxrsps.eu/[/url] <-- The package is how the website is. Not fully functional for the case you didn't get it yet. By using this you can keep all current functionality (PHP code) i do however ask to change your cleint side code (HTML / CSS) I ask to change the layout to something unique because it could be that Revox returns and when we do we will keep our current layout. Got a ittle stuck in it's code ? Follow my tutorial: [URL="http://www.runelocus.com/forums/showthread.php?106486-Advanced-web-development-Introduction-to-MVC-the-Model-View-Controller-pattern"]Advanced-web-development-Introduction-to-MVC-the-Model-View-Controller-pattern[/URL] Client removed and re-scanned the zip file (Clean now): [IMG]http://i.imgur.com/oHPX3kZ.png[/IMG] Regards, Michael
  3. I have created like 10 total quests with this and it works 100% and i have supported state saving which is easy just request help i you need it. A server successfully using this system : [url]http://www.runelocus.com/forums/showthread.php?94065-Asgarnia-Official-Release-Exclusive-on-Runelocus[/url] Step 1 : Create a new package, call it 'quest' and you should probably make it extend either a 'model' or 'content' base folder. Inside the newly created package, create a new Java interface : Quest [CODE] /** * * [MENTION=52317]auth[/MENTION]or Joshua Barry * */ public interface Quest { /** * Determines if the player has the requirements to complete this quest. * * [MENTION=75098]Para[/MENTION]m player The player attempting the quest. * [MENTION=184045]return[/MENTION] {@code true} if the player can complete the quest. */ public abstract boolean hasRequirements(Player player); /** * Determine what happens when the questing player dies. * * [MENTION=75098]Para[/MENTION]m player The player who has died. * [MENTION=184045]return[/MENTION] {@code true} if the player has died. */ public abstract boolean deathListener(Player player); /** * Determines what happens when the questing player kills another entity. * * [MENTION=75098]Para[/MENTION]m player The player who has killed the victim entity. * [MENTION=184045]return[/MENTION] */ public abstract boolean defeatListener(Player player); /** * Determines whether a player has clicked a specific button or not, and * what the outcome will be. * * [MENTION=75098]Para[/MENTION]m player * [MENTION=184045]return[/MENTION] */ public abstract boolean dialougeListener(Player player); /** * Start the quest. */ public abstract void start(Player player); /** * End the quest. */ public abstract void end(Player player); /** * Give the player the reward items. */ public abstract void giveRewards(Player player); /** * The list of rewards the player will receive upon quest completion. * * [MENTION=184045]return[/MENTION] */ public abstract Item[] getRewards(); /** * Gets the quest attribute name. * * [MENTION=184045]return[/MENTION] */ public abstract String getAttributeName(); /** * Gets the quest name. * * [MENTION=184045]return[/MENTION] */ public abstract String getQuestName(); /** * Gets the amount of quest points to award the player. * * [MENTION=184045]return[/MENTION] */ public abstract short getQuestPointAward(); /** * Gets the amount of experience gained. * * [MENTION=184045]return[/MENTION] */ public abstract double[][] getExperienceAward(); /** * Displayed on reward interface. * * [MENTION=184045]return[/MENTION] */ public abstract String getAdditionalMessage(); /** * Gets the value of the final quest. * * [MENTION=184045]return[/MENTION] */ public abstract short getFinalStage(); /** * Gets the quest button id. * * [MENTION=184045]return[/MENTION] */ public abstract short getQuestButton(); } [/CODE] Next, a Java class called QuestEntry [CODE] import java.util.Map.Entry; /** * A convenience class for simplifying quest retrieval from the quest database. * * [MENTION=52317]auth[/MENTION]or Joshua Barry * */ public class QuestEntry implements Entry<String, Integer> { /** * The name of this quest. */ private final String name; /** * The button id of the quest. The one found on the quest tab. */ private final int button; public QuestEntry(String name, int button) { this.name = name; this.button = button; } [MENTION=15855]Over[/MENTION]ride public String getKey() { return name; } [MENTION=15855]Over[/MENTION]ride public Integer getValue() { return button; } [MENTION=15855]Over[/MENTION]ride public Integer setValue(Integer value) { return button; } } [/CODE] Now this is an EXAMPLE of my QuestRepository which I have left [B][COLOR=#FF0000]unmodified[/COLOR][/B] to show how to add quests to the repository. [CODE] import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; import com.asgarniars.rs2.content.quest.impl.CooksAssistant; import com.asgarniars.rs2.content.quest.impl.DoricsQuest; import com.asgarniars.rs2.content.quest.impl.DruidicRitual; import com.asgarniars.rs2.content.quest.impl.RuneMysteries; import com.asgarniars.rs2.content.quest.impl.SheepShearer; import com.asgarniars.rs2.content.quest.impl.TheRestlessGhost; import com.asgarniars.rs2.content.quest.impl.WaterfallQuest; import com.asgarniars.rs2.content.quest.impl.WitchsPotion; import com.asgarniars.rs2.model.players.Player; /** * * author Joshua Barry <Sneakyhearts> * */ public class QuestRepository { /** * The amount of quests available in revision #317 */ public static final int AMOUNT_OF_QUESTS = 103; /** * The mapping holding all quest data. */ public static final Map<QuestEntry, Quest> QUEST_DATABASE = new HashMap<QuestEntry, Quest>(); /** * p.s. static initializers are ugly */ static { QUEST_DATABASE.put(new QuestEntry("SheepShearer", 7344), new SheepShearer()); QUEST_DATABASE.put(new QuestEntry("RuneMysteries", 7335), new RuneMysteries()); QUEST_DATABASE.put(new QuestEntry("DoricsQuest", 7336), new DoricsQuest()); QUEST_DATABASE.put(new QuestEntry("TheRestlessGhost", 7337), new TheRestlessGhost()); QUEST_DATABASE.put(new QuestEntry("DruidicRitual", 7355), new DruidicRitual()); QUEST_DATABASE.put(new QuestEntry("WitchsPotion", 7348), new WitchsPotion()); QUEST_DATABASE.put(new QuestEntry("WaterfallQuest", 7350), new WaterfallQuest()); QUEST_DATABASE.put(new QuestEntry("CooksAssistant", 1), new CooksAssistant()); } /** * Grabs a quest from the mapping with the given button index. * * [MENTION=75098]Para[/MENTION]m button The quest button id. * [MENTION=184045]return[/MENTION] The {@code Quest} which id matches the id given, or {@code null} * if the quest didn't exist. */ public static Quest get(int button) { Set<QuestEntry> entries = QUEST_DATABASE.keySet(); for (Iterator<QuestEntry> it$ = entries.iterator(); it$.hasNext();) { QuestEntry entry = it$.next(); if (entry.getValue() == button) { return QUEST_DATABASE.get(entry); } } return null; } /** * Grab a quest from the mapping with the given name. * * [MENTION=75098]Para[/MENTION]m name The quest's name. * [MENTION=184045]return[/MENTION] The {@code Quest} whose name matches the one provided, or * {@code null} if the quest with the given name couldn't be found. */ public static Quest get(String name) { Set<QuestEntry> entries = QUEST_DATABASE.keySet(); for (Iterator<QuestEntry> it$ = entries.iterator(); it$.hasNext();) { QuestEntry entry = it$.next(); if (entry.getKey().equalsIgnoreCase(name)) { return QUEST_DATABASE.get(entry); } } return null; } /** * Handles the quest side bar interfaces and name * * [MENTION=75098]Para[/MENTION]m player The player. */ public static void handle(Player player) { for (Quest quest : QUEST_DATABASE.values()) { if (player.getQuestStorage().hasStarted(quest)) { player.getActionSender().changeInterfaceComponentColor(quest.getQuestButton(), 0x33FF66); } if (player.getQuestStorage().hasFinished(quest)) { player.getActionSender().changeInterfaceComponentColor(quest.getQuestButton(), 0x3366); } player.getActionSender().sendString(quest.getQuestName(), quest.getQuestButton()); } } } [/CODE] Another class called QuestStorage [CODE] import java.util.HashMap; import java.util.Map; /** * Quest storage, a repository to hold the state's and access to quests. * * [MENTION=52317]auth[/MENTION]or Joshua Barry * */ public class QuestStorage { /** * The current quest states. */ private final Map<Quest, Integer> states = new HashMap<Quest, Integer>(); /** * Gets the quest state. * * [MENTION=75098]Para[/MENTION]m questId The quest id to check. * [MENTION=184045]return[/MENTION] The quest state (0 at default). */ public int getState(int questId) { return states.get(QuestRepository.get(questId)); } /** * Gets the quest state by quest. * * [MENTION=75098]Para[/MENTION]m quest The quest to check. * [MENTION=184045]return[/MENTION] The quest state (0 at default). */ public int getState(Quest quest) { return states.get(quest); } /** * Checks if the player has finished a certain quest. * * [MENTION=75098]Para[/MENTION]m quest The quest id. * [MENTION=184045]return[/MENTION] {@code True} if so, {@code false} if not. */ public boolean hasFinished(Quest quest) { if (states.containsKey(quest)) { return quest != null && quest.getFinalStage() <= states.get(quest); } return false; } /** * Checks if the player has started a certain quest. * * [MENTION=75098]Para[/MENTION]m quest The quest's id. * [MENTION=184045]return[/MENTION] {@code true} if the player has started the quest, {@code false} * if not. */ public boolean hasStarted(Quest quest) { if (states.containsKey(quest)) { return states.get(quest) > 0 && states.get(quest) < quest.getFinalStage(); } return false; } /** * * [MENTION=75098]Para[/MENTION]m questId The quest to set the stage for. * [MENTION=75098]Para[/MENTION]m state the state to set. */ public void setState(Quest quest, int state) { states.put(quest, state); } } [/CODE] Step 2: create another package which extends 'quest' and call it 'impl' (implementation's) now you create your abstract base class : QuestStructure [CODE] package com.asgarniars.rs2.content.quest.impl; import com.asgarniars.rs2.content.dialogue.Dialogue; import com.asgarniars.rs2.content.dialogue.StatementDialogue; import com.asgarniars.rs2.content.dialogue.StatementType; import com.asgarniars.rs2.content.quest.Quest; import com.asgarniars.rs2.content.quest.QuestRepository; import com.asgarniars.rs2.content.skills.Skill; import com.asgarniars.rs2.model.items.Item; import com.asgarniars.rs2.model.items.ItemManager; import com.asgarniars.rs2.model.players.Player; /** * The foundation of a quest upon which all other quests should stand. * * [MENTION=52317]auth[/MENTION]or Joshua Barry * */ public abstract class QuestStructure implements Quest { [MENTION=15855]Over[/MENTION]ride public void start(Player player) { if (!this.hasRequirements(player)) { Dialogue dialogue = new StatementDialogue(StatementType.NORMAL, new String[] { "You do not meet the requirements for this quest." }); player.open(dialogue); return; } player.getQuestStorage().setState(this, 1); QuestRepository.handle(player); player.setAttribute(getAttributeName(), (byte) -1); } [MENTION=15855]Over[/MENTION]ride public void end(Player player) { player.setQuestPoints(player.getQuestPoints() + getQuestPointAward()); giveRewards(player); QuestRepository.handle(player); player.getActionSender().sendMessage("Congratulations! Quest complete!"); player.removeAttribute(getAttributeName()); player.removeAttribute("currentQuest"); } [MENTION=15855]Over[/MENTION]ride public void giveRewards(Player player) { StringBuilder rewardNames = new StringBuilder(); if (getRewards() != null) for (Item item : getRewards()) { if (player.getInventory().hasRoomFor(item)) { player.getInventory().addItem(item); rewardNames.append(ItemManager.getInstance().getItemName(item.getId()).concat("\\n")); } } StringBuilder experienceGains = new StringBuilder(); for (int x = 0; x < this.getExperienceAward().length; x++) { short skill = (short) getExperienceAward()[x][0]; double exp = getExperienceAward()[x][1]; experienceGains.append((int) exp + " " + Skill.getSkillName(skill) + " XP.\\n"); player.getSkill().addExperience(skill, exp); } StringBuilder additionalMessage = new StringBuilder(); if (getAdditionalMessage() != null) additionalMessage.append(getAdditionalMessage().concat("\\n")); player.getActionSender().sendString(getQuestPointAward() + " Quest Points\\n".concat(experienceGains.toString().concat(additionalMessage.toString())).concat(rewardNames.toString()), 4444); player.getActionSender().sendString("You have completed the " + getQuestName() + " Quest!", 301); player.getActionSender().sendConfig(101, player.getQuestPoints()); player.getActionSender().sendInterface(297); } } [/CODE] COMPLETE!!! now to see an example of a quest I created (all object interactions, dialogues are coded into other areas of server as per usual) [CODE] package com.asgarniars.rs2.content.quest.impl; import com.asgarniars.rs2.content.skills.Skill; import com.asgarniars.rs2.model.items.Item; import com.asgarniars.rs2.model.players.Player; /** * * [MENTION=52317]auth[/MENTION]or Joshua Barry * */ public class DruidicRitual extends QuestStructure { [MENTION=15855]Over[/MENTION]ride public boolean hasRequirements(Player player) { return player.isLoggedIn(); } [MENTION=15855]Over[/MENTION]ride public boolean deathListener(Player player) { return false; } [MENTION=15855]Over[/MENTION]ride public boolean defeatListener(Player player) { return false; } [MENTION=15855]Over[/MENTION]ride public boolean dialougeListener(Player player) { if (player.getQuestStorage().hasFinished(this)) end(player); return true; } [MENTION=15855]Over[/MENTION]ride public Item[] getRewards() { return null; } [MENTION=15855]Over[/MENTION]ride public String getAttributeName() { return "DruidicRitual"; } [MENTION=15855]Over[/MENTION]ride public String getQuestName() { return "Druidic Ritual"; } [MENTION=15855]Over[/MENTION]ride public short getQuestPointAward() { return 4; } [MENTION=15855]Over[/MENTION]ride public double[][] getExperienceAward() { return new double[][] { { Skill.HERBLORE, 250 } }; } [MENTION=15855]Over[/MENTION]ride public String getAdditionalMessage() { return "Access to the Herblore skill"; } [MENTION=15855]Over[/MENTION]ride public short getFinalStage() { return 4; } [MENTION=15855]Over[/MENTION]ride public short getQuestButton() { return 7355; } } [/CODE] [CENTER] [IMG]http://i.imgur.com/6KZL7Kf.png[/IMG] [IMG]http://i.imgur.com/uo0jwzN.png[/IMG] [IMG]http://i.imgur.com/zWddSwq.png[/IMG] [/CENTER]
  4. Faab234


    Scripting language written in Javascript. [URL="https://github.com/FabianM/functional"]https://github.com/FabianM/functional[/URL] [PHP]## # Hello world in Functional! ## print("Hello world")[/PHP] [PHP]## # Variables in Functional. ## set("myvar", "String") print(myvar)[/PHP]
  5. wen i make a .jar file all it does it says connecting error and counts down from 15 and does that over and over again the only way to make it stop it to open task manager and stop it that way i do not know why this happens but i need a fully functional .jar file for my webclient if you can help me please teamveiwer me and do it for me i mite just be jaring it wrong but if you can make it work im willing to pay 5-15 dollars no one has be able to do this so far but im hopeing someone can figure it out please. thank you for helping