Jump to content

Search the Community

Showing results for tags 'hyperion'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 30 results

  1. Ziek`

    avDariR.jpg

    1. Cart

      Cart

      WeirdChamp

    2. Ziek`

      Ziek`

      This is a 100% real screenshot from MSN days

    3. Ziek`

      Ziek`

      I also have

       kDaDoS0.png

  2. http://uppit.com/iozatmq1h8qt/484_Stuff.zip containts rs2dh 484 ieldor 484 hyperion 484 484client credits Brown Mystic Flow Me
  3. Hi, I basically want to change the interface on the spellbook that has text on varrock teleport to something like "Training teleports", how might i do this using the setstring packet?
  4. [CENTER][IMG]http://i60.tinypic.com/v80k1s.png[/IMG] [b][SIZE=2]RuneKingdom has now been in private development for over a year now. Thanks to the original Hyperion development team, they've made this project possible. When the project was first started, we didn't think we would ever come this far. We were mostly just using it as a learning experience, then realizing how much time we've spent on it and literally built it up from just a completely clean base, we decided to take a leap and put it up to the next step. [COLOR="#FF0000"][SIZE=4]This is not a remake![/COLOR][/b][/size] [url=http://www.****************/members/photon/]Photon[/url] - Main project developer Corey - Main project developer (not developing anymore) [url=http://www.****************/members/spear/]Spear[/url] - Side project developer Josh - Side project developer [url=http://www.****************/members/galkon/]Galkon[/url] - Original client developer [url=http://www.****************/members/graham/]Graham[/url] - Original Hyperion developer Blake - Original Hyperion developer And everyone else who contributed to the original Hyperion project! [B][SIZE=4][COLOR="#FF8C00"]**Features**[/COLOR][/SIZE][/B] [LEFT] [IMG]http://img2.wikia.nocookie.net/__cb20130227091657/2007scape/images/thumb/5/51/Attack-icon.png/20px-Attack-icon.png[/IMG][B][COLOR="DarkOrange"]Melee System[/COLOR][/B] -[COLOR="Lime"]A near perfect melee maxhit and special max hit tested via RuneHQ[/COLOR] -[COLOR="Lime"]Poisoned weapons and poisioning to opponent.[/COLOR] -[COLOR="Lime"]Correct special melee effects (Wretched Strength, Void melee increase)[/COLOR] -[COLOR="Lime"]Proper item requirements.[/COLOR] [IMG]http://img2.wikia.nocookie.net/__cb20130228040727/2007scape/images/thumb/7/72/Ranged-icon.png/21px-Ranged-icon.png[/IMG][B][COLOR="DarkOrange"]Ranging System[/COLOR][/B] [COLOR="Lime"]-Correct bolt specials(Dragon's breath, Leech life etc.) -Correct ammo to bows and crossbows. -Proper range timers (Need to test for perfection) -Correct range bonuses -Proper ranging max hit [/COLOR] [IMG]http://img4.wikia.nocookie.net/__cb20130228041537/2007scape/images/thumb/7/77/Magic-icon.png/21px-Magic-icon.png[/IMG][B][COLOR="DarkOrange"]Magic System[/COLOR][/B] -[COLOR="Lime"]Correct casting and freezing timers[/COLOR] -[COLOR="Lime"]Nearly all modern spell's working.[/COLOR] -[COLOR="Lime"]All ancient spell's working[/COLOR] -[COLOR="Lime"]All lunar spell's working[/COLOR] -[COLOR="Lime"]Autocasting for selected staffs[/COLOR] [B][COLOR="DarkOrange"][SIZE="3"]**Skilling System[/SIZE][/COLOR][/B] [IMG]http://i51.tinypic.com/20uq4i9.png[/IMG][B][COLOR="Gold"]Slayer[/COLOR][/B] [img]http://img3.wikia.nocookie.net/__cb20130228042653/2007scape/images/thumb/f/f3/Thieving-icon.png/21px-Thieving-icon.png[/img][b][color="lime"]Thieving[/color][/b] [img]http://img3.wikia.nocookie.net/__cb20130228042812/2007scape/images/thumb/f/f0/Farming-icon.png/21px-Farming-icon.png[/img][b][color="Gold"]Farming[/color][/b] [IMG]http://i56.tinypic.com/20kf18m.png[/IMG][B][COLOR="Lime"]Herblore[/COLOR][/B] [IMG]http://img3.wikia.nocookie.net/__cb20130228041634/2007scape/images/thumb/0/0f/Woodcutting-icon.png/17px-Woodcutting-icon.png[/IMG][B][COLOR="Lime"]Woodcutting[/COLOR][/B] [img]http://img1.wikia.nocookie.net/__cb20130228042713/2007scape/images/thumb/7/77/Fletching-icon.png/21px-Fletching-icon.png[/img][b][color="lime"]Fletching[/color][/b] [IMG]http://i52.tinypic.com/2dadj54.png[/IMG][B][COLOR="Lime"]Firemaking[/COLOR][/B] [IMG]http://img1.wikia.nocookie.net/__cb20130228040753/2007scape/images/f/f7/Cooking-icon.png[/IMG][B][COLOR="Orange"]Cooking[/COLOR][/B] [IMG]http://i53.tinypic.com/1z1y3wl.png[/IMG][B][COLOR="Lime"]Fishing[/COLOR][/B] [IMG]http://i55.tinypic.com/16a5vee.png[/IMG][B][COLOR="Gold"]Runecrafting[/COLOR][/B] [IMG]http://img2.wikia.nocookie.net/__cb20130227091636/2007scape/images/thumb/8/84/Agility-icon.png/17px-Agility-icon.png[/IMG][B][COLOR="Red"]Agility[/COLOR][/B] [IMG]http://i53.tinypic.com/10x63rt.png[/IMG][B][COLOR="Lime"]Mining[/COLOR][/B] [img]http://img2.wikia.nocookie.net/__cb20130227091813/2007scape/images/d/df/Smithing-icon.png[/img][b][color="lime"]Smithing[/color][/b] [img]http://img2.wikia.nocookie.net/__cb20130228041613/2007scape/images/thumb/4/48/Crafting-icon.png/21px-Crafting-icon.png[/img][b][color="Gold"]Crafting[/color][/b] [IMG]http://images1.wikia.nocookie.net/__cb20100607202123/runescape/images/5/5c/Minigame_icon.png[/IMG] [COLOR="DarkOrange"][B]Minigames[/B][/COLOR] [COLOR=Lime]-Duel Arena[/COLOR] [COLOR=Lime]-Barrows[/COLOR] [COLOR=Gold]-Tzhaar Caves[/COLOR] [COLOR=Gold]-Mage Training Arena[/COLOR] [COLOR=Gold]-Pest Control[/COLOR] [COLOR="Red"]-Barbarian Assault[/COLOR] [IMG]http://images.wikia.com/runescape/images/archive/e/e1/20100205121459%21Music_icon.png[/IMG] [COLOR="DarkOrange"][B]Music/Sounds[/B][/COLOR] [COLOR=Lime]-Music plays in most regions[/COLOR] [COLOR=Lime]-Weapon sounds[/COLOR] [COLOR=Lime]-NPC sounds[/COLOR] [COLOR=Lime]-Custom sounds/music (used for custom quests & mini-games)[/COLOR] [IMG]http://i.imgur.com/QR4Lh.png[/IMG] [COLOR="DarkOrange"][B]Miscellaneous[/B][/COLOR] [COLOR="Lime"]-Random Events[/COLOR] [COLOR="Lime"]-Bankpin system[/COLOR] [COLOR="Gold"]-Skilling Guilds[/COLOR] [COLOR="Gold"]-Pickable items[/COLOR] [COLOR="Lime"]-Transportation (boats, gnome glider, gnome trees, etc)[/COLOR] [COLOR="Gold"]-Treasure Trails[/COLOR] [COLOR="Lime"]-Poison on items[/COLOR] [COLOR="Lime"]-Enchanting[/COLOR] [COLOR="Lime"]-Run Draining (with restore based on Agility level)[/COLOR] [COLOR="Lime"]-Global Door/Ladder system[/COLOR] [COLOR="Lime"]-Global skill/dungeon areas[/COLOR] [COLOR="Lime"]-Client Launcher[/COLOR] [COLOR="Lime"]-Fullscreen Client support[/COLOR] [COLOR="Lime"]-Realistic lighting and shadows[/COLOR] [COLOR="Lime"]-Fully working Clan Chat (ranks, ban system, etc)[/COLOR] [b]And tons of other stuff![/b] [/left] [/SPOILER] [B][SIZE=4][COLOR="#FF8C00"]Fullscreen Support [img]http://i948.photobucket.com/albums/ad328/Miasmic_Ltd/runekingdom.png[/img] Other pictures [img]http://i948.photobucket.com/albums/ad328/Miasmic_Ltd/runekingdom1.png[/img] [img]http://i948.photobucket.com/albums/ad328/Miasmic_Ltd/runekingdom2.png[/img] [img]http://i948.photobucket.com/albums/ad328/Miasmic_Ltd/runekingdom3.png[/img] [img]http://i948.photobucket.com/albums/ad328/Miasmic_Ltd/runekingdom4.png[/img] [img]http://i948.photobucket.com/albums/ad328/Miasmic_Ltd/runekingdom5.png[/img] [img]http://i948.photobucket.com/albums/ad328/Miasmic_Ltd/runekingdom6.png[/img] [img]http://i948.photobucket.com/albums/ad328/Miasmic_Ltd/runekingdom7.png[/img] [img]http://i948.photobucket.com/albums/ad328/Miasmic_Ltd/runekingdom8.png[/img] [img]http://i948.photobucket.com/albums/ad328/Miasmic_Ltd/runekingdom9.png[/img] [img]http://i948.photobucket.com/albums/ad328/Miasmic_Ltd/runekingdom10.png[/img] [img]http://i948.photobucket.com/albums/ad328/Miasmic_Ltd/runekingdom11.png[/img] [img]http://i948.photobucket.com/albums/ad328/Miasmic_Ltd/runekingdom12.png[/img] [img]http://i948.photobucket.com/albums/ad328/Miasmic_Ltd/runekingdom13.png[/img] Please show your support by thanking the thread! If you have any questions, feel free to post below. If you want to make any support signatures, I'll be more than happy to post them on the thread along with giving you credit. [/COLOR][/SIZE][/B] [/CENTER][/size]
  5. I was wondering if anyone had a fix for the problem I have ran into on my server. What happens is a player can type any symbol and "spoof" any user's username. For Example: #Ryan would show up as "Ryan" in yell and in game chat. Anyone know of a way to fix this?
  6. So after a day and a half trying to figure out how to put these crafting items onto the crafting interface, I have brought myself here. I'm almost there, but I keep getting a NullPointerException printed in the [i]client[/i] console. [img]http://puu.sh/4YhMY.png[/img] What I have so far, is the numbers (child ids I presume) of the interface 446, remember this is 474 so there are only 600 or so interface ids, and the rest are child ids. [i]This is created via a command, not when I use a mould on a furnace. So I can see the id numbers.[/i] [img]http://puu.sh/4YhIe.png[/img] What I need to do is display the rings, necklaces, amulets and bracelets on the interface, but all I get is a NullPointer. Here's some of my code: [i]What would type and slot refer too? These are what I am having trouble with I believe.[/i] [code] public ActionSender sendUpdateItem(int interfaceId, int childId, int type, int slot, Item item) { PacketBuilder bldr = new PacketBuilder(187, Type.VARIABLE_SHORT); bldr.putInt(interfaceId << 16 | childId); bldr.putShort(type); bldr.putSmart(slot); if (item != null) { bldr.putShort(item.getId() + 1); int count = item.getCount(); if (count > 254) { bldr.put((byte) 255); bldr.putInt(count); } else { bldr.put((byte) count); } } else { bldr.putShort(0); bldr.put((byte) -1); } player.write(bldr.toPacket()); return this; } [/code] Here is how the sendUpdateItem method is being used... [code] public static void showInterface(Player player, int face) { int interfaceType = ( face == 1592 ? 0 : face == 1595 ? 1 : face == 1597 ? 2 : face == 11065 ? 3 : -1 ); if (interfaceType < 0) return; if(player.getInventory().contains(face)) { for(int i = 0; i < CraftData.craftInterfaceArray[interfaceType].length;i++) { player.getActionSender().sendUpdateItem(446, interfaceFrames[interfaceType][1], interfaceType, -1, new Item(CraftData.craftInterfaceArray[interfaceType][i], 1)); player.getActionSender().sendInterfaceModel(interfaceFrames[interfaceType][0], 120, CraftData.craftInterfaceArray[interfaceType][i]); } player.getActionSender().sendString(60, "Choose an item to make."); } else { player.getActionSender().sendInterfaceModel(interfaceFrames[interfaceType][0], 120, -1); player.getActionSender().sendString(interfaceFrames[interfaceType][1], interfaceMessage[interfaceType]); for(int i = 0; i < CraftData.craftInterfaceArray[interfaceType].length;i++) { player.getActionSender().sendUpdateItem(446,interfaceFrames[interfaceType][1], face, -1, null); } } } public static void openInterface(Player player) { player.getActionQueue().clearAllActions(); showInterface(player, 1592); showInterface(player, 1595); showInterface(player, 1597); showInterface(player, 11065); player.getActionSender().sendInterface(446, false); } [/code] And here are some arrays that are referred too in showInterface... [code] public static String[] interfaceMessage = { "You need a ring mould to craft rings.", "You need a necklace mould to craft necklaces.", "You need an amulet mould to craft amulets.", "You need a combat bracelet mould to craft bracelets." }; public static int[][] interfaceFrames = { { 63, 64 }, { 110, 111 }, { 157, 158 }, {207, 208} }; public static int[][] craftInterfaceArray = { {1635, 1637, 1639, 1641, 1643, 1645, 6575}, {1654, 1656, 1658, 1660, 1662, 1664, 6577}, {1692, 1694, 1696, 1698, 1700, 1702, 6581}, {4151, 4153, 4151, 1038, 1057, 1040, 75} }; [/code] If anyone could shed light on where the NullPointer is coming from (there's no server side error), or use the picture with the String ids to cross reference my arrays and double check everything is in order, that would be helpful. I need a new pair of eyes on it because after a day of trial and error I have probably overlooked something very simple.
  7. King JC

    Hyperion 474

    [center][IMG]http://puu.sh/4NL1Q.png[/IMG][/center] KingScape is a real 474 Hyperion (the Rs2-Server project), and is here to try new things. Players will always have the freedom in our server to do as they please, despite being a themed server. Players who are world active (standing idle doesn't count), contributory to the economic structure and are socially acceptable (through a certain amount of secret formulas) work their way up a prestigious ladder. Ranking is not displayed to any of the players. At the end of each week the server selects the player with the highest prestige and that player becomes King for the week. Being elected King has its perks. Although the system is still being brainstormed, the current features are: [list] [*]You own Varrock Palace. No other players can walk on to the premise [*]You are awarded the yellow partyhat to your collection. Only Kings may wear and obtain it (including ex-Kings) [*]You receive 2% tax from each player's weekly cash income, all automated. [*]You must use that tax to pay the Varrock Palace rent, pay your servant, pay your guard and pay your accountant. The rest is yours. [/LIST] [SIZE=5][B]Generic Feature[/B][/SIZE] [LIST] [*]Combat, clipping and following work as expected [*]Global item spawns, doors, trap doors, ladders, stairs, chests, caves, dungeons [/LIST] [SIZE=5][B]Unique Features[/B][/SIZE] [LIST] [*]In game calendar and clock [LIST] [*]24 hour clock [*]Monday to Sunday [*]Every real second is 1 in game minute [*]Saving and loading (remembers the time and date if the server is switched off) [*]Ghosts spawn at night, making it dangerous to be out of the cities at this time [/LIST] [*]Government System [LIST] [*]Each week a player is automatically nominated King of the server [*]Nomination of King is judged by economic contribution, social attitude, world activity etc. [*]All other players pay a 2% tax of their weekly coins to the King (only if they earn 9,999gp or more) [*]Only the King can enter Varrock Palace, any one else is escorted off by a guard [/LIST] [*]Players can get jobs working for NPCs around the world [*]Water temperature for the world's oceans and rivers, resulting in variable fishing [*]Can catch schools of fishes (up to 5 fishes in 1 catch) [*]Exp rate is dynamic corresponding to the amount of players online, capped at x250. The more players, the higher the exp rate.[/LIST] [SIZE=5][B]Goals[/B][/SIZE] One of my long-term goals is to host and reach 100 players online. [img]http://images1.wikia.nocookie.net/__cb20120426145847/runescape/images/9/9d/Melee-icon.png[/img][B]Melee[/B] [img]http://images3.wikia.nocookie.net/__cb20120122082216/runescape/images/7/72/Ranged-icon.png[/img][B]Range[/B] [img]http://images2.wikia.nocookie.net/__cb20120122182528/runescape/images/7/77/Magic-icon.png[/img][B]Magic[/B] [img]http://images4.wikia.nocookie.net/__cb20120121220331/runescape/images/2/24/Prayer-icon.png[/img][B]Prayer[/B] [LIST] [*]All prayers work [/LIST] [img]http://images1.wikia.nocookie.net/__cb20120122221425/runescape/images/8/84/Agility-icon.png[/img][B]Agility[/B] [img]http://images3.wikia.nocookie.net/__cb20120122233049/runescape/images/f/f7/Cooking-icon.png[/img][B]Cooking[/B] [img]http://images3.wikia.nocookie.net/__cb20120122231156/runescape/images/4/48/Crafting-icon.png[/img][B]Crafting[/B] [img]http://images2.wikia.nocookie.net/__cb20120121214504/runescape/images/6/6d/Firemaking-icon.png[/img][B]Firemaking[/B] [img]http://images4.wikia.nocookie.net/__cb20120123002212/runescape/images/0/0b/Fishing-icon.png[/img][B]Fishing[/B] [LIST] [*]Every major fish [*]Water temperature changes the way you catch fish (the colder, the more fish you catch) [*]Catch schools of fish (5 fish in 1 catch) [*]All major fishing locations supported [/LIST] [img]http://images4.wikia.nocookie.net/__cb20120122200319/runescape/images/7/77/Fletching-icon.png[/img][B]Fletching[/B] [img]http://images1.wikia.nocookie.net/__cb20120122235048/runescape/images/f/f1/Herblore-icon.png[/img][B]Herblore[/B] [img]http://images4.wikia.nocookie.net/__cb20120122191028/runescape/images/2/28/Mining-icon.png[/img][B]Mining[/B] [img]http://images1.wikia.nocookie.net/__cb20120122223429/runescape/images/6/64/Runecrafting-icon.png[/img][B]Runecrafting[/B] [img]http://images1.wikia.nocookie.net/__cb20120122232122/runescape/images/d/df/Smithing-icon.png[/img][B]Smithing[/B] [img]http://images4.wikia.nocookie.net/__cb20120121214707/runescape/images/c/cf/Slayer-icon.png[/img][B]Slayer[/B] [img]http://images1.wikia.nocookie.net/__cb20120122201602/runescape/images/f/f3/Thieving-icon.png[/img][B]Thieving[/B] [img]http://images4.wikia.nocookie.net/__cb20120122222711/runescape/images/0/0f/Woodcutting-icon.png[/img][B]Woodcutting[/B] [LIST] [*]Every tree [*]Every axe [*]Bird's nests [*]Tree felling and regrowth [/LIST] [b]Media[/b] [i]In game calendar[/i] [IMG]http://puu.sh/4MTMA.png[/IMG] [i]Restricted areas[/i] [img]http://puu.sh/4Nd0K.gif[/img] [i]Getting a job and demonstrating you can't just buy logs from players to make a quick profit[/i] [img]http://puu.sh/4Nf1U.gif[/img] [SIZE=5][b]Credits[/b][/SIZE] Original rs2-server team volatile int King JC
  8. wonda

    Hyperion 459?

    A few years ago there was a blank 459 Hyperion source and I have been searching all the main rsps sites for it and have yet to find it. Anyway, can someone point me in the right direction of finding it? (PS hope this is the right section)
  9. Hey guys how are you doing. For me I'm not doing to well because I keep getting this same error with Xstream every single time. I tried downgrading my java to java 6 and it won't run. I tried using jre7 and it run but pops up xstream error and won't run the server here is my error: [code] C:\Users\Home\Desktop\Vayken 464\Hyperion>Title Hyperion Rs2-Server 474 C:\Users\Home\Desktop\Vayken 464\Hyperion>java -Xms512m -cp bin;lib/jython.jar;l ib/slf4j-api-1.5.8.jar;lib/mina-core-2.0.0-M6.jar;lib/slf4j-jdk14-1.5.8.jar;lib/ commons-compress-1.0.jar;lib/junit-4.6.jar org.rs2server.Server Jul 12, 2013 11:00:36 PM org.rs2server.Server main INFO: Starting Hyperion... Jul 12, 2013 11:01:01 PM org.rs2server.rs2.RS2Server bind INFO: Binding to port : 43594... Jul 12, 2013 11:01:01 PM org.rs2server.rs2.ScriptManager <init> INFO: Loading scripts... Jul 12, 2013 11:01:03 PM org.rs2server.rs2.RS2Server start INFO: Waiting for pending background loading tasks... Jul 12, 2013 11:01:07 PM org.rs2server.rs2.model.Door init INFO: Loading doors... Jul 12, 2013 11:01:07 PM org.rs2server.Server main SEVERE: Error starting Hyperion. java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: com/tho ughtworks/xstream/XStream at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at org.rs2server.util.BlockingExecutorService.waitForPendingTasks(Blocki ngExecutorService.java:50) at org.rs2server.rs2.RS2Server.start(RS2Server.java:77) at org.rs2server.Server.main(Server.java:36) Caused by: java.lang.NoClassDefFoundError: com/thoughtworks/xstream/XStream at org.rs2server.util.XMLController.<clinit>(XMLController.java:38) at org.rs2server.rs2.model.Door.init(Door.java:87) at org.rs2server.rs2.model.World$2.call(World.java:169) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: com.thoughtworks.xstream.XStream at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 8 more Jul 12, 2013 11:01:08 PM org.rs2server.cache.Cache init INFO: Loaded cache. Jul 12, 2013 11:01:08 PM org.rs2server.rs2.model.boundary.BoundaryManager init INFO: Loading boundary definitions... Jul 12, 2013 11:01:08 PM org.rs2server.rs2.model.ItemDefinition init INFO: Loading item definitions... Jul 12, 2013 11:01:13 PM org.rs2server.rs2.model.ItemDefinition init INFO: Loaded 11791 item definitions. Jul 12, 2013 11:01:13 PM org.rs2server.rs2.model.NPCDefinition init INFO: Loading NPC definitions... Jul 12, 2013 11:01:13 PM org.rs2server.rs2.model.NPCDefinition init INFO: Loaded 6391 NPC definitions. Jul 12, 2013 11:01:13 PM org.rs2server.rs2.model.CombatNPCDefinition init INFO: Loading combat NPC definitions... Jul 12, 2013 11:01:13 PM org.rs2server.rs2.model.equipment.EquipmentDefinition i nit INFO: Loading equipment definitions... Jul 12, 2013 11:01:13 PM org.rs2server.rs2.model.Shop init INFO: Loading Shops definitions... Jul 12, 2013 11:01:13 PM org.rs2server.rs2.model.ItemSpawn init INFO: Loading item spawns... Jul 12, 2013 11:01:13 PM org.rs2server.rs2.model.minigame.impl.FightPits <init> INFO: Fight Pits minigame started. [/code] I'm guessing it has something to do with XMLController but I have no idea what to do in it tho. [code]SEVERE: Error starting Hyperion. java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: com/tho ughtworks/xstream/XStream at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at org.rs2server.util.BlockingExecutorService.waitForPendingTasks(Blocki ngExecutorService.java:50) at org.rs2server.rs2.RS2Server.start(RS2Server.java:77) at org.rs2server.Server.main(Server.java:36) Caused by: java.lang.NoClassDefFoundError: com/thoughtworks/xstream/XStream at org.rs2server.util.XMLController.<clinit>(XMLController.java:38) at org.rs2server.rs2.model.Door.init(Door.java:87) at org.rs2server.rs2.model.World$2.call(World.java:169) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: com.thoughtworks.xstream.XStream at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 8 more [/code] So if anyone have time just post a comment below and please tell me how to fix this error. Thank you for your time on reading my problem and have a good day. ;)
  10. [CENTER][IMG]http://i41.tinypic.com/347k0v9.png[/IMG][/CENTER] [B][QUOTE]FROM YERFY: I decided to use hyperion because everyone uses Dementhium and I wanted to do something different. I love hyperion and I think it's a great base to use. Venged and I will try to keep the thread updated with new things that we add. This will be made public but it is also a learning process for me since I am still not where I want to be with programming.[/QUOTE][/B] Credits go to Bando from r-s for the base. [B][I][U]KEY[/U][/I][/B] [CODE][COLOR="#008000"]Green[/COLOR]= Completed [COLOR="#FFD700"]Golden[/COLOR]= Started [COLOR="#FF0000"]Red[/COLOR]= Not Started[/CODE] [CENTER][B]Current Features (Some things base already had)[/B] [spoiler= Currently] *Private Chat *Clan Chat *Combat pvp/pvm *Lobby *Login Server *Shopping *Trading *Prayer/Quick Prayer *Small Summoning base *And other things[/spoiler] [B]What we plan to add (Features)[/B] [spoiler=Skills][COLOR="#008000"]Woodcutting Firemaking Mining[/COLOR] [COLOR="#FFD700"]Summoning Slayer Fishing[/COLOR] [COLOR="#FF0000"]Crafting Fletching Herblore Smithing Farming Herblore Hunter Cooking Thieving Agility Runecrafting[/COLOR] [/spoiler] [spoiler=Minigames] [COLOR="#008000"]Barrows[/COLOR] [COLOR="#FF0000"]Clan Wars Castle Wars Pest Control Warriors Guild Fight Pits[/COLOR] [/spoiler] [spoiler=Misc or the little things] [COLOR="#008000"]World Map[/COLOR] [COLOR="#FF0000"]Price Check Character Design Following Regional Music Examining[/COLOR] [/spoiler] [CENTER][FONT=Comic Sans MS][I]Media[COLOR="#FF0000"][/COLOR][/I][/FONT][/CENTER] [spoiler= Media] Woodcutting [IMG]http://i41.tinypic.com/2v1q45f.png[/IMG] Firemaking [IMG]http://i41.tinypic.com/htvfid.png[/IMG] Resting [IMG]http://i43.tinypic.com/znakh0.jpg[/IMG] [/spoiler] We will try to have a beta release around June 5th just to see how the server runs. Also website will be posted on here soon That is all. [/CENTER]
  11. Ryan

    Hyperion 377

    This is Hyperion converted to the 377 revision. The cache loader also reads the 377 cache. Media: [SPOILER="Media"] [IMG]http://i524.photobucket.com/albums/cc330/Rabrg/377_runerock.gif[/IMG] [/SPOILER] Download: [URL]http://www.mediafire.com/?owf5kfogz4411l6[/URL] Credits: [LIST] [*]blakeman8192 [*]Graham [*]Sadistic [/LIST] For resources: [URL]http://www.runelocus.com/wiki/index.php?title=377[/URL]
  12. [CENTER]Hi, I am looking for a high developed server, hyperion based. [B]Things what i want done on the source: Player/npc clipping Good combat system New hitmarks Okay switches / for hybriding Good looking client / Full screen All specials done Good stability / ECO server Atleast a few working skills [/B] Okay if the source has ^^ that , we will dicuss for a good price . Willing to give a good bonus if the base also has summoning done with specials and clipping! Contact me on my skype or send me a PM! Skype: rafr200[/CENTER]
  13. [center][b][color=teal][font=times new roman][SIZE=7]CounterPlay[/SIZE][/font][/color][/b] Base : SabSabi 459 This project is basically going to be a learning project to learn more and more about Hyperion, it will start out as a pvp server and will progress into an economy server with all skills fully working. [B]Media[/B] [IMG]http://puu.sh/1ygu9[/img] [IMG]http://puu.sh/1yl21[/img] [IMG]http://puu.sh/1yl2Q[/img] [IMG]http://puu.sh/1ym51[/img] [IMG]http://puu.sh/1ym8b[/img] [IMG]http://puu.sh/1yLXu[/img] [IMG]http://puu.sh/1yM3n[/img] [IMG]http://puu.sh/1yM5I[/img] [IMG]http://puu.sh/1yBPe[/img] [B]Updates[/B] [CODE][7/12/2012] - Switched to SabSabi 459 [7/12/2012] - Started Firemaking [8/12/2012] - Started Thieving [8/12/2012] - Jewelry teleportation nearly finished [8/12/2012] - Many more bosses added; KBD, DKS, Kalphite queen etc... [8/12/2012] - Bones on altar completed [8/12/2012] - Alot more prayers added [8/12/2012] - More locations populated Thieving updates [8/12/2012] - Most npc's are pickpocketable a few left. [8/12/2012] - Ardougne stalls added [8/12/2012] - Stalls will lose items for a few seconds after stealing [8/12/2012] - Npc's will stun you [8/12/2012] - Guards will attack you if caught stealing from stalls [9/12/2012] - Pickpocketing is about 85% [9/12/2012] - Main cities like Ardougne, Falador, Varrock etc.. are now populated [9/12/2012] - Started to work on a pest control base [9/12/2012] - Many stalls around the world are now thieve able [9/12/2012] - Spells like vengeance, vengeance other etc.. have been added [9/12/2012] - Started to work on Mining.[/CODE] Support Signature [IMG]http://puu.sh/1xDOA[/img] [CODE][IMG]http://puu.sh/1xDOA[/IMG][/CODE][/center]
  14. [center] [URL="http://sythril.com"][img]http://sythril.com/images/advertisements/banner1.png[/img][/URL] [/center] [SIZE="3"][COLOR="MediumTurquoise"]Why Should You Support Us?[/COLOR][/SIZE] Sythril has been around for over two years with a stable community and over 3,800 registered members. Even in the hard times we choose to remain online and we will continue to do so. Now myself and my co-developer Arch337 are working on the server and expect a beta shortly. [SIZE="3"][COLOR="mediumturquoise"]What Makes Us Different?[/COLOR][/SIZE] We have high standards and actually believe in creating a fun environment for all of our players both young and old, with over a year of experience as a manager I can assure you Sythril will have friendly and helpful staff members that never abuse their powers, we will offer a fun gameplay based around an economy developed by skilling, bossing, and player killing. [SIZE="3"][COLOR="mediumturquoise"]Our Team[/COLOR][/SIZE] In the past Sythril has tried larger development teams containing 4-6 people and honestly I've found that it is harder to work with a bigger group of people, at least when you are working with the group online instead of in an office. Sythril now only consists of two developers, myself and Arch337 and thus far we're making excellent progress together. Our biggest team member is our community though, with their suggestions and spending time taking part in the community they are really what makes our team. [SIZE="3"][COLOR="MediumTurquoise"]What Is Our Goal?[/COLOR][/SIZE] Sythril is a 474 server using the rs2-server Hyperion base, our goal is to create an original server, a majority of people say the 317 era is dying and I would actually agree with them but I believe a 474 can still strive. Our goal is to create an old style server and attract our players with excellent content and a fun storyline. [spoiler="features"] [CENTER] [COLOR="Lime"]Completed[/COLOR] [COLOR="Orange"]In Progress[/COLOR] [COLOR="Red"]Not Started[/COLOR][/CENTER] [size="2"][COLOR="mediumturquoise"]Forum Integration[/COLOR][/size] [LIST] [*][COLOR="Lime"]Username and password integrated with forums - Completed 10/25/2012[/COLOR] [*][COLOR="lime"]Usergroup(Player rights) integrated with forums - Completed 10/25/2012[/COLOR] [*][COLOR="lime"]Skill levels load from MySQL - Completed 10/25/2012[/COLOR] [*][COLOR="lime"]Skills levels save to MySQL - Completed 10/26/2012[/COLOR] [/LIST] [size="2"][COLOR="mediumturquoise"]Server Moderator Control Panel[/COLOR][/size] [spoiler=modcp sneak peak] [CENTER][COLOR="MediumTurquoise"]As a moderator of Sythril we will give you the tools you need to find players duping, or cheating in general.[/COLOR] [img]http://i46.tinypic.com/98xes9.png[/img] [COLOR="mediumturquoise"]Ever get tired of using a command in-game to ban a player and then having to ask an administrator to remove the ban, well at Sythril we give you the power to perform all the actions you'll need to do as a moderator.[/COLOR] [img]http://i47.tinypic.com/200e2hh.png[/img][/CENTER] [/spoiler] [LIST] [*][COLOR="Lime"]Integrated with forums - Completed 08/20/2012[/COLOR] [*][COLOR="lime"]Search players - Completed 08/20/2012[/COLOR] [*][COLOR="lime"]Load player stats, banks, inventories, trades logs, drop logs, and duel logs - Completed 08/20/2012[/COLOR] [*][COLOR="lime"]Punishment system - Completed 08/20/2012[/COLOR] [*][COLOR="lime"]Remote server restart - Completed 10/25/2012[/COLOR] [*][COLOR="Orange"]Report review linked with the in-game report abuse feature[/COLOR] [*][COLOR="Red"]Chat logs[/COLOR] [/LIST] [SIZE="2"][COLOR="MediumTurquoise"]Combat[/COLOR][/SIZE] [COLOR="Lime"]Player VS Npc[/COLOR] [COLOR="Red"]Player VS Player[/COLOR] [COLOR="Orange"]Combat Triangle[/COLOR] [/spoiler] [SIZE="3"][COLOR="MediumTurquoise"]Do You Miss These Times[/COLOR][/SIZE] [CENTER]When I was a council member at Exorth [img]http://i50.tinypic.com/2dl908j.png[/img] Or when I was a global moderator at Dodian [img]http://i50.tinypic.com/34y6v0z.png[/img][/CENTER] Well as an ex-administrator of both the Dodian server and the Exorth server I can tell you that I have the experience of what it takes to make a successful server and my goal is to bring the fun that you felt on these oldschool servers back.
  15. [CENTER][IMG]http://puu.sh/1jJQf[/IMG][/CENTER] I will be using Hyperion and for a client we will be using MITB's srcAllDummiesRemoved. I work on this when we have spare time, so don't expect very frequent updates. [IMG]http://puu.sh/1iHev[/IMG] [IMG]http://puu.sh/1jk9A[/IMG] [IMG]http://puu.sh/1jkjG[/IMG] [IMG]http://puu.sh/1imKC[/IMG] [IMG]http://puu.sh/1jJEE[/IMG] [list] [*][color=red]Did not start[/color] [*][color=orange]Started; unfinished[/color] [*][color=green]Completed[/color] [/list] [b]Basic Features:[/b] [list] [*][color=green]Idle Logout[/color] [*][color=green]Private Messaging[/color] [*][color=red]Player Following[/color] [*][color=green]NPC Spawning[/color] [*][color=green]Dropping Items[/color] [*][color=green]Picking up Items[/color] [*][color=red]Trading[/color] [*][color=green]Equipment Bonuses[/color] [/list] [b]Skills (Non-combat):[/b] [list] [*][color=orange]Mining[/color] [*][color=red]Smithing[/color] [*][color=orange]Woodcutting[/color] [*][color=red]Firemaking[/color] [*][color=orange]Fishing[/color] [*][color=red]Cooking[/color] [*][color=red]Agility[/color] [*][color=red]Herblore[/color] [*][color=red]Runecrafting[/color] [*][color=red]Thieving[/color] [*][color=red]Crafting[/color] [*][color=red]Fletching[/color] [*][color=red]Farming[/color] [/list]
  16. I use a custom class for MySQL just so I can track query count and all queries ran, but you can easily change this to use something else. I will take [I]constructive[/I] criticism. I'm sure this could have been done better, but it works. I ran some tests on how long it takes to load/save and the averages are the following: 8508444.4 ns = 8.5 ms = load 3447519.4 ns = 3.4 ms = save SQLWorldLoader [code]package org.rs2server.rs2; import java.io.UnsupportedEncodingException; import java.security.NoSuchAlgorithmException; import java.sql.SQLException; import org.rs2server.mysql.Login; import org.rs2server.rs2.model.Player; import org.rs2server.rs2.model.PlayerDetails; public class SQLWorldLoader implements WorldLoader { /** * TODO Offence checking */ @Override public LoginResult checkLogin(PlayerDetails pd) { Player player = null; int code = 2; try { if (!Login.verifyLogin(pd)) { code = 3; } } catch (NoSuchAlgorithmException e) { code = 55; } catch (UnsupportedEncodingException e) { code = 55; } catch (SQLException e) { e.printStackTrace(); code = 55; } if (code == 2) { player = new Player(pd); } return new LoginResult(code, player); } @Override public boolean loadPlayer(Player player) { try { Login.loadPlayer(player); return true; } catch (SQLException e) { e.printStackTrace(); return false; } } @Override public boolean savePlayer(Player player) { try { Login.savePlayer(player); return true; } catch (SQLException e) { e.printStackTrace(); return false; } } }[/code] Login [code]package org.rs2server.mysql; import java.io.UnsupportedEncodingException; import java.security.NoSuchAlgorithmException; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.LinkedList; import java.util.List; import org.rs2server.rs2.model.Item; import org.rs2server.rs2.model.Location; import org.rs2server.rs2.model.Player; import org.rs2server.rs2.model.Player.Rights; import org.rs2server.rs2.model.PlayerDetails; import org.rs2server.rs2.model.Skills; import org.rs2server.rs2.model.combat.CombatState.CombatStyle; import org.rs2server.rs2.model.container.Bank; import org.rs2server.rs2.model.container.Equipment; import org.rs2server.rs2.model.container.Inventory; import org.rs2server.rs2.util.TextUtils; public class Login { /** * Statements */ private static ThreadLocal<PreparedStatement> authStatement = new ThreadLocal<PreparedStatement>(); // verify login private static ThreadLocal<PreparedStatement> newUserStatement = new ThreadLocal<PreparedStatement>(); // insert new user private static ThreadLocal<PreparedStatement> updateDetailsStatement = new ThreadLocal<PreparedStatement>(); // update details private static ThreadLocal<PreparedStatement> updateSettingsStatement = new ThreadLocal<PreparedStatement>(); // update settings private static ThreadLocal<PreparedStatement> updateItemsStatement = new ThreadLocal<PreparedStatement>(); // update items private static ThreadLocal<PreparedStatement> selectDetailsStatement = new ThreadLocal<PreparedStatement>(); // select details private static ThreadLocal<PreparedStatement> selectSettingsStatement = new ThreadLocal<PreparedStatement>(); // select settings private static ThreadLocal<PreparedStatement> selectItemsStatement = new ThreadLocal<PreparedStatement>(); // select items static { authStatement.set(Mysql.prepareStatement("SELECT `id`, `username`, `password`, `password_salt` FROM `users` WHERE `username` = ?")); newUserStatement.set(Mysql.prepareStatement("INSERT INTO `users` (`username`, `password`, `password_salt`) VALUES (?, ?, ?)", Statement.RETURN_GENERATED_KEYS)); updateDetailsStatement.set(Mysql.prepareStatement("INSERT INTO `details` (`user_id`, `pos_x`, `pos_y`, `pos_z`, `skills`, `appearance`, `energy`, `prayer_points`) VALUES (?, ?, ?, ?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE `pos_x` = values(pos_x), `pos_y` = values(pos_y), `pos_z` = values(pos_z), `skills` = values(skills), `appearance` = values(appearance), `energy` = values(energy), `prayer_points` = values(prayer_points);")); updateSettingsStatement.set(Mysql.prepareStatement("INSERT INTO `settings` (`user_id`, `auto_retaliate`, `fight_mode`, `mouse_buttons`, `chat_effects`, `split_pm`, `accept_aid`, `run_toggled`, `music_volume`, `effect_volume`, `screen_brightness`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, '0', '0', ?) ON DUPLICATE KEY UPDATE `auto_retaliate` = values(auto_retaliate), `fight_mode` = values(fight_mode), `mouse_buttons` = values(mouse_buttons), `chat_effects` = values(chat_effects), `split_pm` = values(split_pm), `accept_aid` = values(accept_aid), `run_toggled` = values(run_toggled), `screen_brightness` = values(screen_brightness);")); updateItemsStatement.set(Mysql.prepareStatement("INSERT INTO `items` (`user_id`, `equipment`, `inventory`, `bank`) VALUES (?, ?, ?, ?) ON DUPLICATE KEY UPDATE `equipment` = values(equipment), `inventory` = values(inventory), `bank` = values(bank);")); selectDetailsStatement.set(Mysql.prepareStatement("SELECT * FROM `details` WHERE `user_id` = ?")); selectSettingsStatement.set(Mysql.prepareStatement("SELECT `auto_retaliate`, `fight_mode`, `mouse_buttons`, `chat_effects`, `split_pm`, `accept_aid`, `run_toggled`, `screen_brightness` FROM `settings` WHERE `user_id` = ?")); selectItemsStatement.set(Mysql.prepareStatement("SELECT `equipment`, `inventory`, `bank` FROM `items` WHERE `user_id` = ?")); } /** * Verify the login * @param pd The person trying to logins' player details * @return true if successful, false if failed * @throws NoSuchAlgorithmException * @throws UnsupportedEncodingException * @throws SQLException Throws if there is a sql error */ public static boolean verifyLogin(PlayerDetails pd) throws NoSuchAlgorithmException, UnsupportedEncodingException, SQLException { ResultSet result = null; try { authStatement.get().setString(1, pd.getName().toLowerCase()); result = Mysql.executeQuery(authStatement.get()); if (result.next()) { String password = pd.getPassword(); String passwordHash = TextUtils.MD5( TextUtils.MD5(result.getString("password_salt")) + TextUtils.MD5(password) ); if (passwordHash.equals(result.getString("password"))) { pd.setUserId(result.getInt("id")); return true; } else { return false; } } else { // Temp until site is up String password = pd.getPassword(); String passwordHash = TextUtils.MD5( TextUtils.MD5("abcdef") + TextUtils.MD5(password) ); PreparedStatement statement = newUserStatement.get(); statement.setString(1, pd.getName().toLowerCase()); statement.setString(2, passwordHash); statement.setString(3, "abcdef"); int insertId = Mysql.executeUpdate(statement); pd.setUserId(insertId); return true; } } finally { if (result != null) result.close(); } } /** * Saves a player * @param player The player * @throws SQLException Throws if there is a sql error */ public static void savePlayer(Player player) throws SQLException { PreparedStatement statement = null; statement = updateDetailsStatement.get(); // Update details statement.setInt(1, player.getUserId()); // user_id statement.setInt(2, player.getLocation().getX()); // pos_x statement.setInt(3, player.getLocation().getY()); // pos_y statement.setInt(4, player.getLocation().getZ()); // pos_z String[] skills = new String[Skills.SKILL_COUNT]; for(int i = 0; i < Skills.SKILL_COUNT; i++) { skills[i] = player.getSkills().getLevel(i) + "," + (double) player.getSkills().getExperience(i); } statement.setString(5, TextUtils.implodeArray(";", skills)); // skills statement.setString(6, TextUtils.implodeArray(",", player.getAppearance().getLook())); // appearance statement.setInt(7, player.getWalkingQueue().getEnergy()); // energy statement.setDouble(8, (double) player.getSkills().getPrayerPoints()); // prayer_points Mysql.executeUpdate(statement); statement = updateSettingsStatement.get(); // Update settings statement.setInt(1, player.getUserId()); // user_id statement.setInt(2, player.getSettings().isAutoRetaliating() ? 1 : 0); // auto_retaliate statement.setInt(3, player.getCombatState().getCombatStyle().getId()); // fight_mode statement.setInt(4, player.getSettings().twoMouseButtons() ? 1 : 0); // mouse_bottons statement.setInt(5, player.getSettings().chatEffects() ? 1 : 0); // chat_effects statement.setInt(6, player.getSettings().splitPrivateChat() ? 1 : 0); // split_pm statement.setInt(7, player.getSettings().isAcceptingAid() ? 1 : 0); // accept_aid statement.setInt(8, player.getWalkingQueue().isRunningToggled() ? 1 : 0); // run_toggled statement.setInt(9, player.getSettings().getBrightnessSetting()); // screen_brightness Mysql.executeUpdate(statement); statement = updateItemsStatement.get(); // Update item related things statement.setInt(1, player.getUserId()); // user_id List<String> equipment = new LinkedList<String>(); for(int i = 0; i < Equipment.SIZE; i++) { // Equipment start Item item = player.getEquipment().get(i); if (item == null) continue; equipment.add(i + "," + item.getId() + "," + item.getCount()); } statement.setString(2, TextUtils.implodeArray(";", equipment.toArray(new String[equipment.size()]))); // Equipment end List<String> inventory = new LinkedList<String>(); for(int i = 0; i < Inventory.SIZE; i++) { // Inventory start Item item = player.getInventory().get(i); if (item == null) continue; inventory.add(i + "," + item.getId() + "," + item.getCount()); } statement.setString(3, TextUtils.implodeArray(";", inventory.toArray(new String[inventory.size()]))); // Inventory end List<String> bank = new LinkedList<String>(); for(int i = 0; i < Bank.SIZE; i++) { // Bank Start Item item = player.getBank().get(i); if (item == null) continue; bank.add(i + "," + item.getId() + "," + item.getCount()); } statement.setString(4, TextUtils.implodeArray(";", bank.toArray(new String[bank.size()]))); // Bank end Mysql.executeUpdate(statement); } /** * Loads a users account * @param player The player to load * @throws SQLException Throws if there is a sql error */ public static void loadPlayer(Player player) throws SQLException { ResultSet result = null; selectDetailsStatement.get().setInt(1, player.getUserId()); // Select details result = Mysql.executeQuery(selectDetailsStatement.get()); if (result.next()) { // details int rights = result.getInt("rights"); player.setRights(rights == 2 ? Rights.ADMINISTRATOR : rights == 1 ? Rights.MODERATOR : Rights.PLAYER); // rights player.setMembers(result.getInt("member") == 1); // members player.setLocation(Location.create(result.getInt(4), result.getInt(5), result.getInt(6))); // location String[] look = result.getString(8).split(","); int looks[] = {0, 0, 0, 0, 0, 0, 0, 18, 26, 33, 36, 42, 14}; if (look.length == 13) { for (int i = 0; i < look.length; i++) { looks[i] = Integer.parseInt(look[i]); } } player.getAppearance().setLook(looks); // looks String[] skill = result.getString(7).split(";"); if (skill.length == Skills.SKILL_COUNT) { for (int i = 0; i < Skills.SKILL_COUNT; i++) { String[] skillInfo = skill[i].split(","); player.getSkills().setSkill(i, Integer.parseInt(skillInfo[0]), Double.parseDouble(skillInfo[1])); // skills } } player.getWalkingQueue().setEnergy(result.getInt(9)); // energy player.getSkills().setPrayerPoints(result.getDouble(10), false); // prayer_points } selectSettingsStatement.get().setInt(1, player.getUserId()); // Select settings result.close(); result = Mysql.executeQuery(selectSettingsStatement.get()); if (result.next()) { // settings player.getSettings().setAutoRetaliate(result.getInt(1) == 1); // auto retaliate player.getCombatState().setCombatStyle(CombatStyle.forId(result.getInt(2))); // combat style player.getSettings().setTwoMouseButtons(result.getInt(3) == 1); // mouse buttons player.getSettings().setChatEffects(result.getInt(4) == 1); // chat effects player.getSettings().setSplitPrivateChat(result.getInt(5) == 1); // split pm player.getSettings().setAcceptAid(result.getInt(6) == 1); // accept aid player.getWalkingQueue().setRunningToggled(result.getInt(7) == 1); // run toggled player.getSettings().setBrightnessSetting(result.getInt(8)); // brightness } selectItemsStatement.get().setInt(1, player.getUserId()); result.close(); result = Mysql.executeQuery(selectItemsStatement.get()); if (result.next()) { String[] equipment = result.getString(1).split(";"); for (int i = 0; i < equipment.length; i++) { String[] equipmentInfo = equipment[i].split(","); if (equipmentInfo.length != 3) continue; int id = Integer.parseInt(equipmentInfo[1]); int amt = Integer.parseInt(equipmentInfo[2]); Item item = new Item(id, amt); player.getEquipment().set(Integer.parseInt(equipmentInfo[0]), item); // equipment } String[] inventory = result.getString(2).split(";"); for(int i = 0; i < inventory.length; i++) { String[] inventoryInfo = inventory[i].split(","); if (inventoryInfo.length != 3) continue; int id = Integer.parseInt(inventoryInfo[1]); int amt = Integer.parseInt(inventoryInfo[2]); Item item = new Item(id, amt); player.getInventory().set(Integer.parseInt(inventoryInfo[0]), item); // inventory } String[] bank = result.getString(3).split(";"); for(int i = 0; i < bank.length; i++) { String[] bankInfo = bank[i].split(","); if (bankInfo.length != 3) continue; int id = Integer.parseInt(bankInfo[1]); int amt = Integer.parseInt(bankInfo[2]); Item item = new Item(id, amt); player.getBank().set(Integer.parseInt(bankInfo[0]), item); // bank } } if (result != null) result.close(); } }[/code] [code]-- phpMyAdmin SQL Dump -- version 3.5.2 -- [url]http://www.phpmyadmin.net[/url] -- -- Host: localhost -- Generation Time: Oct 27, 2012 at 07:15 PM -- Server version: 5.5.25a -- PHP Version: 5.4.4 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `runelegend` -- -- -------------------------------------------------------- -- -- Table structure for table `details` -- CREATE TABLE IF NOT EXISTS `details` ( `user_id` int(11) NOT NULL, `rights` tinyint(1) NOT NULL DEFAULT '0', `member` tinyint(1) NOT NULL DEFAULT '0', `pos_x` smallint(6) NOT NULL, `pos_y` smallint(6) NOT NULL, `pos_z` smallint(6) NOT NULL, `skills` mediumtext COLLATE utf8_unicode_ci NOT NULL, `appearance` tinytext COLLATE utf8_unicode_ci NOT NULL, `energy` smallint(6) NOT NULL, `prayer_points` smallint(6) NOT NULL, PRIMARY KEY (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `items` -- CREATE TABLE IF NOT EXISTS `items` ( `user_id` int(11) NOT NULL, `equipment` mediumtext COLLATE utf8_unicode_ci NOT NULL, `inventory` mediumtext COLLATE utf8_unicode_ci NOT NULL, `bank` longtext COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `settings` -- CREATE TABLE IF NOT EXISTS `settings` ( `user_id` int(11) NOT NULL, `auto_retaliate` tinyint(1) NOT NULL, `fight_mode` tinyint(11) NOT NULL, `mouse_buttons` tinyint(1) NOT NULL, `chat_effects` tinyint(1) NOT NULL, `split_pm` tinyint(1) NOT NULL, `accept_aid` tinyint(1) NOT NULL, `run_toggled` tinyint(1) NOT NULL, `music_volume` tinyint(4) NOT NULL, `effect_volume` tinyint(4) NOT NULL, `screen_brightness` tinyint(4) NOT NULL, PRIMARY KEY (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(13) COLLATE utf8_unicode_ci NOT NULL, `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `password_salt` varchar(15) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=0 ;[/code]
  17. Hey guys, I'm here looking for a programmer who is knowledgeable with Rs2-server or Hyperion. I have had my project in development for about 6 months, and decided to pick up on it again. The server is pretty much complete, just need to finish some misc. content and perfect the skills. As well as continue development with Dialogues, etc. I have finished a lot of the features such as combat, clipping, skills etc with my previous programmers. My idea is todo a remake of 2007 runescape. I know a lot of talk is going on about other remakes etc, but i'm doing this for fun, and not really caring about making a profit. Here's what i have to offer for if you would like to program, and be apart of this project. I can handle all the web/management side. I will pay for hosting of the website including the Dedicated server in advance. I will host the server for 1 years time. This way players don't have to worry about wasting their time. I will NOT pay for programming. I will pay to make this server a success...I'll purchase webhosting, dedicated server, Advertisements on toplist etc. We can split the donations 50/50 BEFORE i break even on my return. If you are interested, please get in touch with me via pm or msn. [email][email protected][/email] Thanks.
  18. [b][color=red]For development progress updates, please visit my blog. This is what helps raise money for a dedicated host, by simply viewing:[/color][/b] [url]http://sinscape-rsps.blogspot.co.uk/[/url] Hello. I am here to show you the progress of a Hyperion #474 RSPS development project. The source is a derivative of the "Rs2-Server" release by Scu11 and Vastico, simply called "Rs2-Server Edit" by winter2000. I am now continuing their work under the name "SinScape". [center][b][size=5]Current Contributions:[/size] [SIZE=6][color=red]£34.09[/color]/[color=green]???[/color][/size] [IMG]http://img163.imageshack.us/img163/4091/sinscapesmalllogo.png[/img][/center][/b] [b][u]Primary ambitions and ethics:[/u][/b] [list] [*][b]A new way to fund a dedicated host;[/b] asking for donations is always something I've been against. So, as an alternative, I am going to keep a blog of my development where I plan to set-up a Google Adsense account in the near future. I am also going to make use of another websites referral system, that pays me to refer other people to register with them. I can then use this money to buy a dedicated server for you all to play. Raising the funds this way helps avoid any controversy regarding owners using donations for anything but the server. [*][b]Strong economy;[/b] shop stock and monster drops will be carefully analysed. Everything will be taken into consideration when implementing items to provide fun game-play and a balanced economy. [*][b]Equality;[/b] no donator rank or membership regimes. This helps avoid any "I'm better than you" conflicts. Every player (including moderators) are treated the same. [*][b]Community focused;[/b] a non-profit community that listens to what it's members want, handles disputes in a formal, non-biased manner, has regular events and always finds time to help the needy. No one is left out. [*][b]Management;[/b] a completely diverse way of managing account security, rule-breakers and general server statistics. Text logs of all kinds, so that there is always some form of evidence for handling problems such as a loss of account or some form of bug abuse. [/list] These are just a few initial ideas I have in mind whilst I develop the server and build up an audience/community. [b]Some other features will include:[/b] [list] [*]A vast amount of obtainable items; [*]Detailed and diverse skills to train; [*]Unique dungeons and other areas of the map to explore; [*]New and exciting monsters to slay; [*]Game-play that is not too easy, not too hard; [*]Quality support - you are always an equally valued customer, no matter what; [*]And always much, much more... [/list] The overall plan for the next few months is to build, optimise and test aspects of the game, post regular updates (every day), to build up a big enough audience and hope for a small amount of income to fund a small, dedicated host, to utilize social networking and the works to attract a larger audience, maintain a steady follower base so that it brings a kick start to the community and in-game economy until I am finally ready to open up the game to the public. So for now, if you are interested in this type of server, why not show your support on Facebook, Twitter, YouTube and the forums by liking and/or following, so you can be informed of any updates. [center][url=http://www.facebook.com/SinnedRSPS][IMG]http://img859.imageshack.us/img859/1995/facebooklogo100182759s.png[/img][/url] [url=http://www.youtube.com/user/SinnedRSPS?feature=mhee][IMG]http://img696.imageshack.us/img696/4077/youtubelogon.png[/img][/url] [url=https://twitter.com/#!/SinnedRSPS][IMG]http://img213.imageshack.us/img213/4669/38790845.png[/img][/url][/center] Thanks for reading, and feedback is welcome. All further updates will be posted on my blog, so if you are interested in viewing them I will post a link each time I create a new entry. You can visit the blog here: [url]http://sinscape-rsps.blogspot.co.uk[/url]
  19. [s]I recently switch from PI so i'm new to Hyperion and Eclipse all together. So anyways, I've never seen this error before and was hoping you guys* could help me out. FYI: I have already configured the build-path.[/s] [CODE] at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at org.hyperion.util.BlockingExecutorService.waitForPendingTasks(BlockingExecutorService.java:50) at org.hyperion.rs2.RS2Server.start(RS2Server.java:74) at org.hyperion.Server.main(Server.java:35) Caused by: com.thoughtworks.xstream.converters.ConversionException: Cannot construct org.hyperion.rs2.model.GameObjectDefinition as it does not have a no-args constructor : Cannot construct org.hyperion.rs2.model.GameObjectDefinition as it does not have a no-args constructor ---- Debugging information ---- message : Cannot construct org.hyperion.rs2.model.GameObjectDefinition as it does not have a no-args constructor cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException cause-message : Cannot construct org.hyperion.rs2.model.GameObjectDefinition as it does not have a no-args constructor class : java.util.ArrayList required-type : org.hyperion.rs2.model.GameObjectDefinition path : /list/objectDefinition line number : 2 -------------------------------[/CODE] [s]I'm not asking for you to spoon feed me. I'm just new to java and would like to learn. Thanks.[/s] For any of you who need this fix, just simply update your XStream files in your Lib folder. You can download them from here: [url]https://nexus.codehaus.org/content/repositories/releases/com/thoughtworks/xstream/xstream-distribution/1.4.2/xstream-distribution-1.4.2-bin.zip[/url]
  20. [CENTER][B][SIZE="6"]SEMI SOURCE[/SIZE][/B][/CENTER] (I plan on making this 10x better) I will not provide you with a client. Yo, so this is my first release not gonna get into much detail seeing as it's a cleaned base :hurr: Well here are some pics and a bit of info. Atm this is [B]nothing special[/B] just though i'd release it. Base: Jacks Release. I'll still work on this gonna complete rewrite most of the in the near future i'm currently in the middle of moving so idk when i'll do that. Info: [CODE] Player Clipping. Jagcached fully working(make config/fs/*cache files*) Semi-Cleaned(Still cleaning it) Didn't really do any dupe fixes(Still all of them from Jacks Original Release) Combat is still pretty shitty. :'( Not finished so no trolling :pirate:[/CODE] Pics: [IMG]http://screensnapr.com/e/TXmfJS.png[/IMG] [IMG]http://screensnapr.com/e/bBmcRo.png[/IMG] [IMG]http://screensnapr.com/e/pqYLfD.png[/IMG] [IMG]http://screensnapr.com/e/rMS0p4.png[/IMG] Oh this only contains the src files you'll have to use your own cache, client, and other shit that's needed. Sorry. Credits: Me Anyone who i leeched.<3
  21. Well I have been working on a Hyperion server and I was going to make a server out of it for rune-regrets. But I'm quitting RSPS, Some people have been charging back money from paypal and i've been getting letters home now, after me going first. giving lvl 132 for $20 ect they charge back, all my services i went first and still they charge back. in debt 40 pounds now, I'm not going to get scammed all the time now, RSPS helps you loose too much money Source features: -Stable -Great Combat -16 Skills -4 RuneScape Quests 100% -Dialogue System -Cut Scenes -70% Tutorial island I shortened it because I got bored. -Pest Control -Fight Pits -Jad Caves -Duel arena 40% not really usable yet -Sailing -Dwarf Cannon -and a few more features Vote on I will check it in like 4 days then I'm quitting RSPS for good, byee :)
  22. Daladubz

    Hyperion Logging

    Well i'm coding a Hyperion and well it's been blocking in logging in. I don't understand why it's blocking it though. This is what the run cmd prints out. [CODE]Oct 1, 2011 3:51:46 PM org.hyperion.rs2.net.RS2LoginDecoder doDecode INFO: Invalid login block opcode : 124 Oct 1, 2011 3:51:48 PM org.hyperion.rs2.net.RS2LoginDecoder doDecode INFO: Invalid login block opcode : 9 Oct 1, 2011 3:51:50 PM org.hyperion.rs2.net.RS2LoginDecoder doDecode INFO: Invalid login block opcode : 43[/CODE] Some help would be appreciated :D
  23. Hiya there. I figured I would release a system which I've recently added to my own source, converted to Hyperion. This should work for all versions. [B]Description[/B] The PlayerListener system I shall be explaining here, is a simple implementation of the system I've added to my own source. It allows a more stable, convenient and better performing way to perform certain actions when certain events occur. This tutorial will not add any specific features, but will allow an easier access to actually add them. For example, I currently have the bank deposit box, the trading system, and a start of personal shops. And they are all using this system to secure their actions in a more convenient way than currently seen in the private server scene. In the future, I plan on creating a lot more features with the use of this system. The concept of it is quite simple, really. It's just a far better performing way to e.g. revert a trade when a player gets disconnected. Instead of having one or more methods which check if the player is trading when it got disconnected and perform actions if so, this will just allow you to actually perform these actions while the player is in a trade. When the player is no longer in a trade, you simply remove the assigned PlayerListener implementation and it will no longer perform the desired actions within. Because this system is quite extensible, I will not be giving you everything of it. I will show you how to implement it, and give you an example to demonstrate how it works. So if you're not up to learning some basic Java or are just aiming to cram as much as tutorials as possible into your source, this thread (or the entire Hyperion source for that matter) is not meant for you. [B]Before we get started, I highly suggest you make a full backup of your source. As you should always do when following tutorials.[/B] Now, let's start shall we? :) [HR][/HR] [COLOR="#000080"][B]Step 1. [I]Creating the interface[/I][/COLOR] Preferable package;[/B] [I]org.hyperion.rs2.model.listener[/I] [INDENT]This package probably doesn't exist yet in your source. If you're planning on extending this system to more classes than mentioned in this tutorial, I recommend you to create this new package for later use as well.[/INDENT] [B]Preferable class name;[/B] [I]AbstractPlayerListener[/I] [INDENT]The reason I've chosen this name is because you might want to use a name like PlayerListener for collective purposes of all other extending interfaces.[/INDENT] So, create a new class in the aforementioned package named AbstractPlayerListener.java. Here's the content; [CODE]package org.hyperion.rs2.model.util.listener; import org.hyperion.rs2.model.Player; /** * A tag interface which represents a listener for events that occur at and * around a player. * * @author Mike (The Eternity) * */ public interface AbstractPlayerListener { /** * Listens to general actions of a {@link Player} such as logging out. * * @author Mike (The Eternity) * */ public interface GeneralPlayerListener extends AbstractPlayerListener { /** * Called when the specified {@link Player} has logged out. * * @param player The player. */ public void loggedOut(Player player); } } [/CODE] [B]Explanation of the code:[/B] This code is quite simple (as I said in the description, the entire system is actually quite simple). [LIST] [*]The AbstractPlayerListener is a 'tag interface'. [I]What is a 'tag interface'?[/I] A 'tag interface' is a simple interface which is implemented pure for representation of multiple classes collectively, it doesn't have any methods to override. [/LIST] Moving on to the inner class. [I]What is an inner class?[/I] An inner class is a class or interface type which is declared within another. A good example is actually the code above. As you can see, GeneralPlayerListener is an interface which is actually declared within the AbstractPlayerListener type. More information about (anonymous) inner/nested classes can be found here: [url]http://en.wikipedia.org/wiki/Inner_class[/url] [LIST] [*]The GeneralPlayerListener is an interface type which extends the AbstractPlayerListener. It's implementing classes are categorized as listeners for general events around the player such as logging out, hence it adds the method 'loggedOut(Player)' in our case. [/LIST] So we've added our first basic PlayerListener. Now it's time to make it work, don't you think? ;) [COLOR="#000080"][B]Step 2. [I]Implementing the system[/I][/B][/COLOR] [U]To start off, we're going into the org.hyperion.rs2.model.Player class.[/U] Let's begin with adding the imports, naturally at the top of the class: [CODE]import org.hyperion.rs2.model.util.listener.AbstractPlayerListener; import org.hyperion.rs2.model.util.listener.AbstractPlayerListener.GeneralPlayerListener;[/CODE] Now, at the rest of the declarations (somewhere around the inventory, bank and equipment fields will do), add the following: [CODE] /** * A list of {@link AbstractPlayerListener}s. */ private final List<AbstractPlayerListener> listeners = new CopyOnWriteArrayList<AbstractPlayerListener>();[/CODE] [B]Explanation of the code:[/B] This is nothing special although people that are not that familiar with Java's arsenal of collections, might run into the 'CopyOnWriteArrayList' part. [LIST] [*][I]So what is the CopyOnWriteArrayList and why do we use it here?[/I] The CopyOnWriteArrayList is a special type of List that Java provides us to 'rule out' [URL=http://download.oracle.com/javase/7/docs/api/java/util/ConcurrentModificationException.html]ConcurrentModificationExceptions[/URL]. So basically, it allows you to perform read and write operations at the same time, because it copies the contents when a write operation is requested. This way, the read operation can proceed undisturbed. The main reason we use it here is to allow listeners to actually be able to remove itself or other listeners from the list while performing their desirable actions. [URL="http://download.oracle.com/javase/7/docs/api/java/util/concurrent/CopyOnWriteArrayList.html"]Click here for the CopyOnWriteArrayList API.[/URL] [/LIST] Moving on.. Between your 'getters and setters' add the following piece of code: [CODE] /** * Adds an {@link AbstractPlayerListener} to this {@link Player}. * * @param listener The listener to add. */ public void addListener(AbstractPlayerListener listener) { listeners.add(listener); } /** * Removes an {@link AbstractPlayerListener} from this {@link Player}. * * @param listener The listener to remove. */ public void removeListener(AbstractPlayerListener listener) { listeners.remove(listener); } /** * Removes all listeners currently active for this {@link Player}. */ public void removeAllListeners() { listeners.clear(); } /** * Gets all {@link AbstractPlayerListener}s for this {@link Player}. * * @return The list of listeners for this player. */ public List<AbstractPlayerListener> getListeners() { return listeners; }[/CODE] [B]Explanation of the code:[/B] These methods add, remove, remove all and get the entire list of listeners of a player respectively. This basically allows you to manage the listeners conveniently, for example [I]player.addListener(new HelloWorldPlayerListener());[/I] [HR][/HR] So, what's next? Nothing! This was actually everything there is to it. You can now start using the system! But as promised, I will give you a simple example to work with. [COLOR="#000080"][B]Step 3. [I]Working with the system[/I][/B][/COLOR] [U]For this example, we're opening the org.hyperion.rs2.net.ActionSender class.[/U] Within the ActionSender class, you will find the method 'sendLogin()'. This method basically sends all packets that must be sent to the client when a player logs in. By default, it also adds some utilities to the player's inventory and equipment (which is also part of a listener system, by the way). So let's pick a good spot for our first implementation of the system. I've actually chosen to almost add it at the very top of the method, just below [I]player.setActive(true);[/I] At your chosen spot, we'll add the following piece of code: [CODE]player.addListener(new GeneralPlayerListener() { @Override public void loggedOut(Player player) { System.out.println("Have you heard!? " + player.getName() + " has logged out!"); } });[/CODE] [B]Explanation of the code:[/B] This will add a simple GeneralPlayerListener to the player, which prints out a sentence when a player has logged out. Let's not forget to add the import! [CODE]import org.hyperion.rs2.model.listener.AbstractPlayerListener.GeneralPlayerListener;[/CODE] And that's all for the ActionSender class. To make our example actually functional, we will go into the [I]org.hyperion.rs2.model.World[/I] class. In this class, look for the 'unregister(Player)' method. That method is responsible for performing the necessary actions when a player is being disconnected from the server. At the very top of that method, add the following piece of code: [CODE] for (AbstractPlayerListener l : player.getListeners()) { if (l instanceof GeneralPlayerListener) { ((GeneralPlayerListener) l).loggedOut(player); } }[/CODE] [B]Explanation of the code:[/B] This piece of code will loop through all currently active listeners of the player, and whichever ones are declared as GeneralPlayerListener (hence have the required 'loggedOut(Player)' method) will be notified that the player is being unregistered. Naturally, we add the imports: [CODE]import org.hyperion.rs2.model.util.listener.AbstractPlayerListener; import org.hyperion.rs2.model.util.listener.AbstractPlayerListener.GeneralPlayerListener;[/CODE] [B]And that's all there is to it![/B] If you've followed this tutorial properly, you should be able to compile & run without any errors. If you do happen to face any issues, do not hesitate asking/informing me about them. Congratulations, you have successfully implemented the PlayerListener system! I recommend you play around with it for a while before considering building actual content on it. First, get the hang of it. Then, make use of it. ;) Well that was my tutorial, I hope you liked it! All constructive criticism is appreciated, and questions/comments are of course always welcome. Good luck and have fun! [B] - Mike[/B]
  24. Hey all, I've made some modifications to the Container class from the Hyperion source. It is aimed to improve performance, which is still an important factor even though Hyperion already has decent performance. And when talking about such a commonly used class as this one, every little bit of performance counts. I believe I've correctly renamed everything to Hyperion standards (since I improved it with the use of my own). I've mainly reduced the amount of loops which occurs in several methods, which is quite important when you've got a lot of players to process. There are also some methods added which you may find very useful for certain features, I know I certainly do. Here you are; [CODE]package org.hyperion.rs2.model.container; import static java.lang.System.arraycopy; import static java.util.Collections.unmodifiableCollection; import static org.hyperion.rs2.model.ItemDefinition.getItemDefinition; import java.util.Collection; import java.util.LinkedList; import java.util.List; import org.hyperion.rs2.model.Item; /** * A container holds a group of items. * * @author Graham * @author optimized by Mike * */ public final class Container { // Placed the max stack constant here, since it is located at other classes through many different sources. private static final int ITEM_STACK_CAPACITY = Integer.MAX_VALUE; /** * The type of container. * * @author Graham * */ public enum Type { /** * A standard container such as inventory. */ STANDARD, /** * A container which always stacks, e.g. the bank, regardless of the * item. */ ALWAYS_STACK, } /** * The capacity of this container. */ private final int capacity; /** * The items in this container. */ private Item[] items; /** * A list of listeners. */ private final List<ContainerListener> listeners = new LinkedList<ContainerListener>(); /** * The container type. */ private final Type type; /** * Firing events flag. */ private boolean firingEvents = true; /** * Creates the container with the specified capacity. * * @param type The type of this container. * @param capacity The capacity of this container. */ public Container(Type type, int capacity) { this.type = type; this.capacity = capacity; this.items = new Item[capacity]; } /** * Sets the firing events flag. * * @param firingEvents The flag. */ public void setFiringEvents(boolean firingEvents) { this.firingEvents = firingEvents; } /** * Checks the firing events flag. * * @return <code>true</code> if events are fired, <code>false</code> if not. */ public boolean isFiringEvents() { return firingEvents; } /** * Gets the listeners of this container. * * @return The listeners of this container. */ public Collection<ContainerListener> getListeners() { return unmodifiableCollection(listeners); } /** * Adds a listener. * * @param listener The listener to add. */ public void addListener(ContainerListener listener) { listeners.add(listener); listener.itemsChanged(this); } /** * Removes a listener. * * @param listener The listener to remove. */ public void removeListener(ContainerListener listener) { listeners.remove(listener); } /** * Removes all listeners. */ public void removeAllListeners() { listeners.clear(); } /** * Shifts all items to the top left of the container leaving no gaps. */ public void shift() { final Item[] old = items; items = new Item[capacity]; int newIndex = 0; for (int i = 0; i < capacity; i++) { if (old[i] != null) { items[newIndex] = old[i]; newIndex++; } } if (firingEvents) { fireItemsChanged(); } } /** * Gets the next free slot. * * @return The slot, or {@code -1} if there are no available slots. */ public int freeSlot() { for (int i = 0; i < capacity; i++) { if (items[i] == null) { return i; } } return -1; } /** * Gets the last free slot. * * @return The slot, or {@code -1} if there are no available slots. */ public int lastFreeSlot() { for (int i = capacity - 1; i >= 0; i--) { if (items[i] == null) { return i; } } return -1; } /** * Returns an {@code int} array with all free slots. This method returns an * empty array with {@code length} 0 if there are no free slots. * * @return All free slots. */ public int[] getFreeSlots() { final int count = freeSlots(); if (count == 0) { return new int[0]; } int[] slots = new int[count]; int ptr = -1; for (int i = 0; i < capacity; i++) { if (items[i] == null) { slots[(ptr += 1)] = i; } } return slots; } /** * Attempts to return an {@code int} array with the specified number of free * slots. Meaning that upon success, the returned array {@code length} would * be {@code count + 1}. * * @param count The amount of free slots to obtain. * @return An {@code int} array with the specified amount of slots to * obtain, or less if there aren't that many available. */ public int[] getFreeSlots(int count) { int[] slots = new int[count + 1]; int ptr = -1; for (int i = 0; i < capacity && ptr < count; i++) { if (items[i] == null) { slots[(ptr += 1)] = i; } } return slots; } /** * Returns an {@code int} array with all free slots, in reversed order. This * method returns an empty array with {@code length} 0 if there are no free * slots. * * @return All free slots. */ public int[] getFreeSlotsReversed() { final int count = freeSlots(); if (count == 0) { return new int[0]; } int[] slots = new int[count]; int ptr = capacity; for (int i = capacity - 1; i >= 0; i--) { if (items[i] == null) { slots[(ptr -= 1)] = i; } } return slots; } /** * Attempts to return an {@code int} array with the specified number of free * slots. Meaning that upon success, the returned array {@code length} would * be {@code count + 1}. * * @param count The amount of free slots to obtain. * @return An {@code int} array with the specified amount of slots to * obtain, or less if there aren't that many available. */ public int[] getFreeSlotsReversed(int count) { int[] slots = new int[count + 1]; int ptr = -1; for (int i = capacity - 1; i >= 0 && ptr < count; i--) { if (items[i] == null) { slots[(ptr -= 1)] = i; } } return slots; } /** * Gets the amount of free space this container has for left the specified * item ID. * * @param id The item ID. * @return The amount of free spaces (0 if none). */ public int freeSpace(int id) { if (getItemDefinition(id).isStackable() || type == Type.ALWAYS_STACK) { boolean freeSlot = false; for (Item i : items) { if (i != null) { if (i.getId() == id) { return ITEM_STACK_CAPACITY - i.getCount(); } } else { freeSlot = true; } } if (freeSlot) { return ITEM_STACK_CAPACITY; } } else { return freeSlots(); } return 0; } /** * Attempts to add an item into the next free slot. * * @param item The item. * @return <code>true</code> if the item was added, <code>false</code> if * not. */ public boolean add(Item item) { final int id = item.getId(); if (item.getDefinition().isStackable() || type.equals(Type.ALWAYS_STACK)) { for (int i = 0; i < capacity; i++) { if (items[i] != null && items[i].getId() == id) { final int totalCount = item.getCount() + items[i].getCount(); if (totalCount > ITEM_STACK_CAPACITY || totalCount < 1) { return false; } set(i, new Item(id, totalCount)); return true; } } final int slot = freeSlot(); if (slot == -1) { return false; } else { set(slot, item); return true; } } else { final int count = item.getCount(); final int[] slots = getFreeSlots(count); if (slots.length >= count) { final boolean b = firingEvents; firingEvents = false; try { for (int i = 0; i < count; i++) { set(slots[i], new Item(id)); } if (b) { fireItemsChanged(); } return true; } finally { firingEvents = b; } } else { return false; } } } /** * Attempts to add all {@link Item}s in the specified {@link Container} to * this container. * * @param c The container. * @return {@code true} if all items were added successfully, {@code false} * otherwise. */ public boolean addAll(Container c) { boolean b = firingEvents; firingEvents = false; try { for (Item item : c.toArray()) { if (item != null) { if (!add(item)) { return false; } } } if (b) { fireItemsChanged(); } return true; } finally { firingEvents = b; } } /** * Attempts to add all {@link Item}s in the specified {@link Container} to * this container, in reversed order. Please note that this adds the items * in <b>reversed order</b>, and does <b>not</b> actually starts at the last * free slot. For those actions, referr to * {@link #addAllReversedSlots(Container)}. * * @param c The container. * @return {@code true} if all items were added successfully, {@code false} * otherwise. */ public boolean addAllReversed(Container c) { boolean b = firingEvents; firingEvents = false; try { Item item; for (int i = capacity - 1; i >= 0; i--) { if ((item = c.items[i]) != null) { if (!add(item)) { return false; } } } return true; } finally { firingEvents = b; } } /** * Attempts to add all {@link Item}s in the specified {@link Container} to * this container, in reversed order and starting from the last slot. * * @param c The container * @return {@code true} if all items were added successfully, {@code false} * otherwise. */ public boolean addAllReversedSlots(Container c) { boolean b = firingEvents; firingEvents = false; try { Item item; for (int i = capacity - 1; i >= 0; i--) { if ((item = c.items[i]) != null) { if (!addReversed(item)) { return false; } } } return true; } finally { firingEvents = b; } } /** * Attempts to add an item into the last free slot. * * @param item The item. * @return <code>true</code> if the item was added, <code>false</code> if * not. */ public boolean addReversed(Item item) { final int id = item.getId(); if (item.getDefinition().isStackable() || type.equals(Type.ALWAYS_STACK)) { for (int i = capacity - 1; i >= 0; i--) { if (items[i] != null && items[i].getId() == id) { final int totalCount = item.getCount() + items[i].getCount(); if (totalCount > ITEM_STACK_CAPACITY || totalCount < 1) { return false; } set(i, new Item(id, totalCount)); return true; } } final int slot = lastFreeSlot(); if (slot == -1) { return false; } else { set(slot, item); return true; } } else { final int count = item.getCount(); final int[] slots = getFreeSlotsReversed(count); if (slots.length >= count) { final boolean b = firingEvents; firingEvents = false; try { for (int i = 0; i < count; i++) { set(lastFreeSlot(), new Item(id)); } if (b) { fireItemsChanged(); } return true; } finally { firingEvents = b; } } else { return false; } } } /** * Gets the number of free slots. * * @return The number of free slots. */ public int freeSlots() { return capacity - size(); } /** * Gets an item. * * @param index The position in the container. * @return The item. */ public Item get(int index) { return items[index]; } /** * Gets an item by ID. * * @param id The ID. * @return The item, or <code>null</code> if it could not be found. */ public Item getById(int id) { for (Item item : items) { if (item != null && item.getId() == id) { return item; } } return null; } /** * Gets a slot by ID. * * @param id The ID. * @return The slot, or {@code -1} if it could not be found. */ public int getSlotById(int id) { for (int i = 0; i < capacity; i++) { if (items[i] != null && items[i].getId() == id) { return i; } } return -1; } /** * Gets the last slot by ID. * * @param id The ID. * @return The slot, or {@code -1} if it could not be found. */ public int getLastSlotById(int id) { for (int i = capacity - 1; i >= 0; i--) { if (items[i] != null && items[i].getId() == id) { return i; } } return -1; } /** * Sets an item. * * @param index The position in the container. * @param item The item. */ public void set(int index, Item item) { items[index] = item; if (firingEvents) { fireItemChanged(index); } } /** * Gets the capacity of this container. * * @return The capacity of this container. */ public int capacity() { return capacity; } /** * Gets the size of this container. * * @return The size of this container. */ public int size() { int size = 0; for (Item item : items) { if (item != null) { size++; } } return size; } /** * Checks if this container is empty. * * @return {@code true} if so, {@code false} otherwise. */ public boolean isEmpty() { for (Item item : items) { if (item != null) { return false; } } return true; } /** * Clears this container. */ public void clear() { items = new Item[items.length]; if (firingEvents) { fireItemsChanged(); } } /** * Returns an array representing this container. * * @return The array. */ public Item[] toArray() { return items; } /** * Checks if a slot is used. * * @param slot The slot. * @return <code>true</code> if an item is present, <code>false</code> * otherwise. */ public boolean isSlotUsed(int slot) { return items[slot] != null; } /** * Checks if a slot is free. * * @param slot The slot. * @return <code>true</code> if an item is not present, <code>false</code> * otherwise. */ public boolean isSlotFree(int slot) { return items[slot] == null; } /** * Removes an item. * * @param item The item to remove. * @return The number of items removed. */ public int remove(Item item) { return remove(-1, item); } /** * Removes an item. * * @param preferredSlot The preferred slot to remove from. * @param item The item to remove. * @return The number of items removed. */ public int remove(int preferredSlot, Item item) { int removed = 0; if (item.getDefinition().isStackable() || type.equals(Type.ALWAYS_STACK)) { final int slot = getSlotById(item.getId()); final Item stack = get(slot); if (stack.getCount() > item.getCount()) { removed = item.getCount(); set(slot, new Item(stack.getId(), stack.getCount() - item.getCount())); } else { removed = stack.getCount(); set(slot, null); } } else { for (int i = 0; i < item.getCount(); i++) { int slot = getSlotById(item.getId()); if (i == 0 && preferredSlot != -1) { final Item inSlot = get(preferredSlot); if (inSlot.getId() == item.getId()) { slot = preferredSlot; } } if (slot != -1) { removed++; set(slot, null); } else { break; } } } return removed; } /** * Transfers an item from one container to another. * * @param from The container to transfer from. * @param to The container to transfer to. * @param fromSlot The slot in the original container. * @param id The item id. * @return A flag indicating if the transfer was successful. */ public static boolean transfer(Container from, Container to, int fromSlot, int id) { final Item fromItem = from.get(fromSlot); if (fromItem == null || fromItem.getId() != id) { return false; } if (to.add(fromItem)) { from.set(fromSlot, null); return true; } else { return false; } } /** * Returns a copy of the specified {@link Container}. * * @param c The container to copy. * @return The newly created container. */ public static Container copyOf(Container c) { final int capacity = c.capacity; final Container newC = new Container(c.type, capacity); arraycopy(c.items, 0, newC.items, 0, capacity); return newC; } /** * Swaps two items. * * @param fromSlot From slot. * @param toSlot To slot. */ public void swap(int fromSlot, int toSlot) { final Item temp = get(fromSlot); final boolean b = firingEvents; firingEvents = false; try { set(fromSlot, get(toSlot)); set(toSlot, temp); if (b) { fireItemsChanged(fromSlot, toSlot); } } finally { firingEvents = b; } } /** * Gets the total amount of an item, including the items in stacks. * * @param id The id. * @return The amount. */ public int getCount(int id) { int total = 0; for (Item item : items) { if (item != null && item.getId() == id) { total += item.getCount(); } } return total; } /** * Inserts an item. * * @param fromSlot The old slot. * @param toSlot The new slot. */ public void insert(int fromSlot, int toSlot) { // we reset the item in the from slot final Item from = items[fromSlot]; if (from == null) { return; } items[fromSlot] = null; // find which direction to shift in if (fromSlot > toSlot) { int shiftFrom = toSlot; int shiftTo = fromSlot; for (int i = (toSlot + 1); i < fromSlot; i++) { if (items[i] == null) { shiftTo = i; break; } } final Item[] slice = new Item[shiftTo - shiftFrom]; arraycopy(items, shiftFrom, slice, 0, slice.length); arraycopy(slice, 0, items, shiftFrom + 1, slice.length); } else { int sliceStart = fromSlot + 1; final int sliceEnd = toSlot; for (int i = (sliceEnd - 1); i >= sliceStart; i--) { if (items[i] == null) { sliceStart = i; break; } } final Item[] slice = new Item[sliceEnd - sliceStart + 1]; arraycopy(items, sliceStart, slice, 0, slice.length); arraycopy(slice, 0, items, sliceStart - 1, slice.length); } // now fill in the target slot items[toSlot] = from; if (firingEvents) { fireItemsChanged(); } } /** * Fires an item changed event. * * @param slot The slot that changed. */ public void fireItemChanged(int slot) { for (ContainerListener listener : listeners) { listener.itemChanged(this, slot); } } /** * Fires an items changed event. */ public void fireItemsChanged() { for (ContainerListener listener : listeners) { listener.itemsChanged(this); } } /** * Fires an items changed event. * * @param slots The slots that changed. */ public void fireItemsChanged(int... slots) { for (ContainerListener listener : listeners) { listener.itemsChanged(this, slots); } } /** * Checks if the container contains the specified item. * * @param id The item id. * @return <code>true</code> if so, <code>false</code> if not. */ public boolean contains(int id) { return getSlotById(id) != -1; } /** * Checks if this {@link Container} has enough room for the specified * {@link Item}. * * @param item The item. * @return {@code true} if so, {@code false} otherwise. */ public boolean hasRoomFor(Item item) { return freeSpace(item.getId()) >= item.getCount(); } /** * Replaces the content of this {@link Container} with the specified one's, * filling it up to this {@link Container}'s capacity. * * @param c The container to replace this container's content with. */ public void replace(Container c) { arraycopy(c.items, 0, items, 0, capacity - 1); if (firingEvents) { fireItemsChanged(); } } }[/CODE] If there are any questions, comments or (positive) criteria, do not hesitate to reply. I believe you should just be able to copy and paste it right into your old Container class, implying that you haven't renamed anything. - Mike
  25. Well I made gem cutting for Hyperion and I thought I should share some codes. Hopefully this gets some people off p.i and use different bases. Also you can easily convert to any other base.. Make a new class named GemCutting. [CODE]package org.hyperion.rs2.model.skills.crafting.gemcutting; import org.hyperion.rs2.model.Animation; import org.hyperion.rs2.model.Item; import org.hyperion.rs2.model.Player; import org.hyperion.rs2.model.Skills; import org.hyperion.rs2.model.World; import org.hyperion.rs2.tickable.Tickable; /** * * GemCutting.java * * @author Knasken/'Lucas/Daladubz * */ public class GemCutting { /** * * uncut, cut, exp, required level * */ private static final int[][] GEM = { {1623, 1607, 50, 20}, //sapphire {1621, 1605, 67, 27}, //emerald {1619, 1603, 85, 34}, //ruby {1617, 1601, 107, 43}, //diamond {1631, 1615, 137, 55}, //dragonstone {6571, 6573, 167, 67} //onyx }; /** * * Handles gem cutting.. * * @param player * * @param useItem * * @param useWithItem * * @param slot * * @param useSlot * * @return * */ public static boolean handleGemCutting(Player player, Item useItem, Item useWithItem, int slot, int useSlot) { int item = useItem.getId(); int usedItem = useWithItem.getId(); for (int[] data : GEM) { int unCut = data[0]; int cut = data[1]; int exp = data[2]; int levelReq = data[3]; if (item == unCut && usedItem == 1755 || item == 1755 && usedItem == unCut) { if(player.getSkills().getLevel(Skills.CRAFTING) < levelReq) { player.getActionSender().sendMessage("You need a crafting level of " + levelReq + " in order to cut this gem."); return false; } cutGem(player, unCut, cut, exp); return true; } } return false; } /** * * Method used to cut gems.. * * @param player * * @param uncut * * @param cut * * @param exp * */ public static void cutGem(final Player player, int unCut, final int cut, final int exp) { final Item item = new Item(unCut, 1); final Item itemName = new Item(cut, 1); player.playAnimation(Animation.create(885)); player.getActionSender().sendMessage("You cut the " + itemName.getDefinition().getName().toLowerCase() + "."); World.getWorld().submit(new Tickable(1) { @Override public void execute() { player.getInventory().remove(item); player.getInventory().add(new Item(cut)); player.getSkills().addExperience(12, exp); this.stop(); } }); } }[/CODE] Now that you have that done. Open up ItemonOption and search for [CODE]private void handleItemOptionItem[/CODE] in that void add: [CODE] if(GemCrafting.handleGemCutting(player, usedItem, withItem, usedWithSlot, usedWithSlot)) { return; }[/CODE] [Spoiler=Media] [IMG]http://localhostr.com/file/vlUFyWU/gemcrafting.jpg[/IMG] [/Spoiler] Post any errors you get.
×