Jump to content

pust61

Member
  • Content count

    200
  • Joined

  • Last visited

  1. [SIZE=4][B]Hello people of RuneLocus[/B][/SIZE] [SIZE=3][B]I am the owner of Forbidden World and releasing the server![/B][/SIZE] We got so many features, but before we begin i will tell you dedi information: [COLOR="#00FFFF"]- Located in The Netherlands - 4GB Ram - 2 Processors - 2.66 GHZ x 2 - 24/7 Online[/COLOR] [B][COLOR="#00FF00"]Server Features: - All bosses! - PK System with awesome pk shop and random cash system! - Vote 4 cash and points system! - Many minigames like barrows, duel arena etc. - New weapons/armours - ALL SPECIAL ATTACKS WORKS LIKE KORASI ETC. - All correct stats - Awesome train places - All skills works! - Forums active! - WORKING DICE - Donator shop! - ECONOMY[/COLOR][/B] Here are some vids ( adding pictures later ): [SIZE=2]TRAILER:[/SIZE] [video=youtube;JCT1Xi4WsrA]http://www.youtube.com/watch?v=JCT1Xi4WsrA[/video] [SIZE=2]We are only 5 days ago started! So u can help us to make it big! We are need active staff![/SIZE] [SIZE=4][COLOR="#FF0000"]Join now![/COLOR][/SIZE] Website: [URL="http://forbiddenworld.net/"]Forbidden World - Webclient[/URL] Forums: [URL="http://forbiddenworld.net/forum/forum.php"]Forbidden World - Forums[/URL] Vote: [URL="http://forbiddenworld.net/vote.php"]Forbidden World - Vote[/URL] [COLOR="#FF0000"]Owner[/COLOR] = [COLOR="#FF0000"]Nino[/COLOR] [COLOR="#FFFF00"]Admin[/COLOR] = OPEN SPOT [COLOR="#A9A9A9"]Mod 1[/COLOR] = OPEN SPOT [COLOR="#A9A9A9"]Mod 2[/COLOR] = OPEN SPOT [COLOR="#4B0082"]Forum mod [/COLOR]= [COLOR="#4B0082"]Die fly3[/COLOR]
  2. i have the same problems! Someone help please?
  3. [quote name='madmonkey']not wanna say to much but dont be arrogant come on have respect for newcomers i am an new one in java to i can code pretty good in a 317 till 567 than i am out but when it comes to, creating an tradeable npc or pkp shops making/chancing or adding items that arn't in the server already than i need help to becuse i dont know how to do, and sorry pust61 i hoped i could help but sorry idk[/QUOTE] Aw,, thanks anyway. i hope someone help me
  4. [quote name='Scotticus']Teach you? Are you serious? It's only a change in the model headers, L2RSPS[/QUOTE] Wow i am new with java man seriously pff? Paying 1MIL RS07 GP guys!
  5. Dear Runelocus, My question was; how can i add Old-Style whip and custom whips...? What i have now is: [IMG]http://i44.tinypic.com/7284qx.png[/IMG] I hope someone will teach me how.. Thanks.
  6. As the title say; Who have the link of caligorealm cache?!?! [url]http://www.runelocus.com/forums/showthread.php?84752-PI-Caligo-Realm-PK-Spawn-Eco-TokHaar-Kol-100-Korasi-(With-anim-s-and-GFX)[/url] its broken there :(
  7. cart, can you be mm for me and halo now..??

  8. Support! Nice idea.
  9. Dear Jackcoulson, Please give me the account, i seriously want an account with the stats like that account. U will make me very happy if you give the account to me, i am 15 years old. Never have been more then combat 120+. I like the account and i am personally think u are a great one, simply i think ur just a nice funny guy! Please give the account to me u will make my dreams come true. I hope you read this and give it to me. Seriously i will be love you if you give (NO HOMO). Just the way you understand. I still respect u if you don't give it to me. Have a nice day/live. Greetings, Pust61
  10. get an other source.
  11. displee, there isn't a code called that in that files..
  12. well i am new with java, so where could i do that..? can you explain me more..?
  13. bump... TradeSession.java: [PHP] package org.dementhium.model.player; import org.dementhium.model.Container; import org.dementhium.model.Item; import org.dementhium.model.definition.ItemDefinition; import org.dementhium.net.ActionSender; import org.dementhium.util.Logger; import org.dementhium.util.Misc; /** * Represents a trade session * * @author Stephen */ public class TradeSession { private final Player trader, partner; private TradeState currentState = TradeState.STATE_ONE; private Container traderItemsOffered = new Container(28, false); private Container partnerItemsOffered = new Container(28, false); private boolean traderDidAccept, partnerDidAccept; /* * Some info for the future, * 44 = wealth transfer * 43 = left limit * 45 = right limit */ public TradeSession(Player trader, Player partner) { this.trader = trader; this.partner = partner; trader.setAttribute("didRequestTrade", Boolean.FALSE); partner.setAttribute("didRequestTrade", Boolean.FALSE); } public void start() { refreshScreen(); openFirstTradeScreen(trader); openFirstTradeScreen(partner); } public Player getPartner() { return partner; } public void openFirstTradeScreen(Player p) { ActionSender.sendTradeOptions(p); ActionSender.sendInterface(p, 335); ActionSender.sendInventoryInterface(p, 336); ActionSender.sendItems(p, 90, traderItemsOffered, false); ActionSender.sendItems(p, 90, partnerItemsOffered, true); ActionSender.sendString(p, "", 335, 37); String name = p.equals(trader) ? partner.getUsername() : trader.getUsername(); ActionSender.sendString(p, "Trading with: " + Misc.formatPlayerNameForDisplay(name), 335, 15); ActionSender.sendString(p, Misc.formatPlayerNameForDisplay(name), 335, 22); } public void openSecondTradeScreen(Player p) { currentState = TradeState.STATE_TWO; partnerDidAccept = false; traderDidAccept = false; ActionSender.sendInterface(p, 334); ActionSender.sendString(p, "<col=00FFFF>Trading with:<br><col=00FFFF>" + Misc.formatPlayerNameForDisplay(p.equals(trader) ? partner.getUsername() : trader.getUsername()), 334, 54); ActionSender.sendString(p, "Are you sure you want to make this trade?", 334, 34); } public void offerItem(Player pl, int slot, int amt) { if (currentState.equals(TradeState.STATE_ONE)) { if (pl.equals(trader)) { if (pl.getInventory().getContainer().get(slot) == null) { return; } Item item = new Item(pl.getInventory().getContainer().get(slot).getId(), amt); if (item != null) { if (!item.getDefinition().isTradeable() && item.getId() != 21371) { pl.sendMessage("You cannot trade this item!"); return; } if (pl.getInventory().getContainer().getItemCount(item.getId()) < amt) { if (ItemDefinition.forId(item.getId()).isNoted() || ItemDefinition.forId(item.getId()).isStackable()) { amt = pl.getInventory().lookup(item.getId()).getAmount(); } else { amt = pl.getInventory().getContainer().getItemCount(item.getId()); } item.setAmount(amt); } if (0 >= amt) { return; } if (traderItemsOffered.getFreeSlots() < amt && !pl.getInventory().getContainer().get(slot).getDefinition().isNoted() && !pl.getInventory().getContainer().get(slot).getDefinition().isStackable()) { item.setAmount(traderItemsOffered.getFreeSlots()); } traderItemsOffered.add(item); pl.getInventory().getContainer().remove(new Item(pl.getInventory().getContainer().get(slot).getId(), amt)); pl.getInventory().refresh(); } } else if (pl.equals(partner)) { Item inventoryItem = pl.getInventory().getContainer().get(slot); Item item = inventoryItem != null ? new Item(inventoryItem.getId(), amt) : null; if (item != null) { if (!item.getDefinition().isTradeable() && item.getId() != 5) { pl.sendMessage("You cannot trade this item!"); return; } if (pl.getInventory().getContainer().getItemCount(item.getId()) < amt) { if (ItemDefinition.forId(item.getId()).isNoted() || ItemDefinition.forId(item.getId()).isStackable()) { amt = pl.getInventory().lookup(item.getId()).getAmount(); } else { amt = pl.getInventory().getContainer().getItemCount(item.getId()); } item.setAmount(amt); } if (0 >= amt) { return; } if (partnerItemsOffered.getFreeSlots() < amt && !pl.getInventory().getContainer().get(slot).getDefinition().isNoted() && !pl.getInventory().getContainer().get(slot).getDefinition().isStackable()) { item.setAmount(partnerItemsOffered.getFreeSlots()); } partnerItemsOffered.add(item); pl.getInventory().getContainer().remove(item); pl.getInventory().refresh(); } } refreshScreen(); } } public void removeItem(Player pl, int slot, int amt) { if (currentState.equals(TradeState.STATE_ONE)) { if (pl.equals(trader)) { Item item = new Item(traderItemsOffered.get(slot).getId(), amt); if (item != null) { if (traderItemsOffered.getItemCount(item.getId()) < amt) { if (ItemDefinition.forId(item.getId()).isNoted() || ItemDefinition.forId(item.getId()).isStackable()) { amt = traderItemsOffered.lookup(item.getId()).getAmount(); } else { amt = traderItemsOffered.getItemCount(item.getId()); } item.setAmount(amt); } if (0 >= amt) { return; } if (pl.getInventory().getFreeSlots() < amt && !traderItemsOffered.get(slot).getDefinition().isNoted() && !traderItemsOffered.get(slot).getDefinition().isStackable()) { item.setAmount(pl.getInventory().getFreeSlots()); } trader.getInventory().getContainer().add(new Item(traderItemsOffered.get(slot).getId(), item.getAmount())); trader.getInventory().refresh(); traderItemsOffered.remove(item); ActionSender.TradeIcons(partner, slot); resetAccept(); } } else if (pl.equals(partner)) { Item item = new Item(partnerItemsOffered.get(slot).getId(), amt); if (item != null) { if (partnerItemsOffered.getItemCount(item.getId()) < amt) { if (ItemDefinition.forId(item.getId()).isNoted() || ItemDefinition.forId(item.getId()).isStackable()) { amt = partnerItemsOffered.lookup(item.getId()).getAmount(); } else { amt = partnerItemsOffered.getItemCount(item.getId()); } item.setAmount(amt); } if (0 >= amt) { return; } if (pl.getInventory().getFreeSlots() < amt && !partnerItemsOffered.get(slot).getDefinition().isNoted() && !partnerItemsOffered.get(slot).getDefinition().isStackable()) { item.setAmount(pl.getInventory().getFreeSlots()); } partner.getInventory().getContainer().add(new Item(partnerItemsOffered.get(slot).getId(), item.getAmount())); partner.getInventory().refresh(); partnerItemsOffered.remove(item); ActionSender.TradeIcons(trader, slot); resetAccept(); } } refreshScreen(); } } private void refreshScreen() { ActionSender.sendItems(trader, 90, traderItemsOffered, false); ActionSender.sendItems(partner, 90, partnerItemsOffered, false); ActionSender.sendItems(trader, 90, partnerItemsOffered, true); ActionSender.sendItems(partner, 90, traderItemsOffered, true); String name = trader.getUsername(); ActionSender.sendString(partner, Misc.formatPlayerNameForDisplay(name), 335, 22); String name1 = partner.getUsername(); ActionSender.sendString(trader, Misc.formatPlayerNameForDisplay(name1), 335, 22); ActionSender.sendString(trader, 335, 21, " has " + partner.getInventory().getFreeSlots() + " free inventory slots."); ActionSender.sendString(partner, 335, 21, " has " + trader.getInventory().getFreeSlots() + " free inventory slots."); ActionSender.sendBConfig(trader, 729, getTradersItemsValue()); ActionSender.sendBConfig(trader, 697, getPartnersItemsValue()); ActionSender.sendBConfig(partner, 729, getPartnersItemsValue()); ActionSender.sendBConfig(partner, 697, getTradersItemsValue()); } private int getTradersItemsValue() { int initialPrice = 0; for (Item item : traderItemsOffered.toArray()) { if (item != null) { initialPrice += item.getDefinition().getExchangePrice(); } } return initialPrice; } private int getPartnersItemsValue() { int initialPrice = 0; for (Item item : partnerItemsOffered.toArray()) { if (item != null) { initialPrice += item.getDefinition().getExchangePrice(); } } return initialPrice; } @SuppressWarnings("unused") private void flashSlot(Player pl, int slot) { if (pl.equals(trader)) { ActionSender.sendClientScript(trader, 143, new Object[]{slot, 7, 4, 21954593}, "Iiii"); } else if (pl.equals(partner)) { ActionSender.sendClientScript(partner, 143, new Object[]{slot, 7, 4, 21954593}, "Iiii"); } } public void acceptPressed(Player pl) { if (!traderDidAccept && pl.equals(trader)) { traderDidAccept = true; } else if (!partnerDidAccept && pl.equals(partner)) { partnerDidAccept = true; } switch (currentState) { case STATE_ONE: if (pl.equals(trader)) { if (partnerDidAccept && traderDidAccept) { openSecondTradeScreen(trader); openSecondTradeScreen(partner); } else { ActionSender.sendString(trader, "Waiting for other player...", 335, 37); ActionSender.sendString(partner, "The other player has accepted", 335, 37); } } else if (pl.equals(partner)) { if (partnerDidAccept && traderDidAccept) { openSecondTradeScreen(trader); openSecondTradeScreen(partner); } else { ActionSender.sendString(partner, "Waiting for other player...", 335, 37); ActionSender.sendString(trader, "The other player has accepted", 335, 37); } } break; case STATE_TWO: if (pl.equals(trader)) { if (partnerDidAccept && traderDidAccept) { giveItems(); } else { ActionSender.sendString(trader, "Waiting for other player...", 334, 34); ActionSender.sendString(partner, "The other player has accepted", 334, 34); } } else if (pl.equals(partner)) { if (partnerDidAccept && traderDidAccept) { giveItems(); } else { ActionSender.sendString(partner, "Waiting for other player...", 334, 34); ActionSender.sendString(trader, "The other player has accepted", 334, 34); } } break; } } public void tradeFailed() { trader.getInventory().getContainer().addAll(traderItemsOffered); partner.getInventory().getContainer().addAll(partnerItemsOffered); endSession(); trader.getInventory().refresh(); partner.getInventory().refresh(); } public void endSession() { traderItemsOffered = partnerItemsOffered = null; trader.setTradeSession(null); partner.setTradePartner(null); ActionSender.sendCloseInterface(trader); ActionSender.sendCloseInterface(partner); ActionSender.closeInventoryInterface(trader); ActionSender.closeInventoryInterface(partner); } private void giveItems() { if (!trader.getInventory().getContainer().hasSpaceFor(partnerItemsOffered)) { ActionSender.sendMessage(partner, "The other player does not have enough space in their inventory."); ActionSender.sendMessage(trader, "You do not have enough space in your inventory."); tradeFailed(); return; } else if (!partner.getInventory().getContainer().hasSpaceFor(traderItemsOffered)) { ActionSender.sendMessage(trader, "The other player does not have enough space in their inventory."); ActionSender.sendMessage(partner, "You do not have enough space in your inventory."); tradeFailed(); return; } for (Item itemAtIndex : traderItemsOffered.toArray()) { if (itemAtIndex != null) { partner.getInventory().addItem(itemAtIndex.getId(), itemAtIndex.getAmount()); } } for (Item itemAtIndex : partnerItemsOffered.toArray()) { if (itemAtIndex != null) { trader.getInventory().addItem(itemAtIndex.getId(), itemAtIndex.getAmount()); } } Logger.writeTradeLog(trader, partner, traderItemsOffered, partnerItemsOffered); endSession(); partner.getInventory().refresh(); trader.getInventory().refresh(); } public Container getPlayerItemsOffered(Player p) { return (p.equals(trader) ? traderItemsOffered : partnerItemsOffered); } public enum TradeState { STATE_ONE, STATE_TWO } public void resetAccept() { partnerDidAccept = traderDidAccept = false; switch (currentState) { case STATE_ONE: ActionSender.sendString(partner, "", 335, 37); ActionSender.sendString(trader, "", 335, 37); break; case STATE_TWO: ActionSender.sendString(partner, "", 334, 34); ActionSender.sendString(trader, "", 334, 34); break; } } public TradeState getState() { return currentState; } } [/PHP] Playeroption.java [PHP] package org.dementhium.net.packethandlers; import org.dementhium.content.activity.ActivityManager; import org.dementhium.content.activity.impl.DuelActivity; import org.dementhium.content.areas.CoordinateEvent; import org.dementhium.content.misc.Following; import org.dementhium.model.World; import org.dementhium.model.map.path.DefaultPathFinder; import org.dementhium.model.player.Player; import org.dementhium.model.player.TradeSession; import org.dementhium.net.ActionSender; import org.dementhium.net.PacketHandler; import org.dementhium.net.message.Message; import org.dementhium.util.Constants; public class PlayerOption extends PacketHandler { public static final int FIRST_OPTION = 70; public static final int TRADE_PLAYER = 27; // RIGHT! public static final int FOLLOW_PLAYER = 80; @Override public void handlePacket(Player player, Message packet) { switch (packet.getOpcode()) { case FIRST_OPTION: handleFirstOption(player, packet); break; case TRADE_PLAYER: handleTradeRequest(player, packet); break; case FOLLOW_PLAYER: Following.playerFollow(player, World.getWorld().getPlayers().get(packet.readLEShortA())); break; } } private void handleFirstOption(final Player player, Message packet) { int playerIndex = packet.readLEShort(); final Player other = World.getWorld().getPlayers().get(playerIndex); if (other == null || !other.isOnline() || player.getIndex() == other.getIndex()) { return; } player.getActionManager().stopAction(); if (World.getWorld().getAreaManager().getAreaByName("ChallengeRoom").contains(player.getLocation())) { player.turnTo(other); if (!World.getWorld().doPath(new DefaultPathFinder(), player, other.getLocation().getX(), other.getLocation().getY(), false, false).isRouteFound()) { player.sendMessage("I can't reach that!"); return; } else { Following.combatFollow(player, other); } World.getWorld().submitAreaEvent(player, new CoordinateEvent(player, other.getLocation().getX(), other.getLocation().getY(), other.size(), other.size()) { @Override public void execute() { if (other.getAttribute("didRequestDuel") == Boolean.TRUE && ((Short) other.getAttribute("duelWithIndex") == player.getIndex())) { ActivityManager.getSingleton().register(new DuelActivity(player, other)); } else { ActionSender.sendInterface(player, 640); ActionSender.sendConfig(player, 283, 67108864); player.setAttribute("isStaking", Boolean.FALSE); player.setAttribute("duelWithIndex", other.getIndex()); } } }); } else if (player.getActivity().isCombatActivity(player, other) || player.getPlayerArea().inWilderness() || (player.getAttribute("isInDuelArena", Boolean.FALSE) == Boolean.TRUE && World.getWorld().getAreaManager().getAreaByName("Duel").contains(player.getLocation()))) { player.turnTo(other); player.getCombatExecutor().setVictim(other); } } private void handleTradeRequest(final Player player, Message packet) { int partnerIndex = packet.readShort(); packet.readByte(); if (partnerIndex < 0 || partnerIndex >= Constants.MAX_AMT_OF_PLAYERS) { return; } final Player partner = World.getWorld().getPlayers().get(partnerIndex); if (partner == null || !partner.isOnline() || player.getIndex() == partner.getIndex()) { return; } if(player.hasStarter() == false || partner.hasStarter() == false){//Can't trade people during Tutorial cutscene! return; } player.getActionManager().stopAction(); player.turnTo(partner); if (!World.getWorld().doPath(new DefaultPathFinder(), player, partner.getLocation().getX(), partner.getLocation().getY(), false, false).isRouteFound()) { player.sendMessage("I can't reach that!"); return; } else { Following.combatFollow(player, partner); } World.getWorld().submitAreaEvent(player, new CoordinateEvent(player, partner.getLocation().getX(), partner.getLocation().getY(), partner.size(), partner.size()) { @Override public void execute() { if (partner.getTradeSession() != null) { ActionSender.sendMessage(player, "The other player is busy."); return; } if (partner.getAttribute("didRequestTrade") == Boolean.TRUE && ((Short) partner.getAttribute("tradeWithIndex") == player.getIndex())) { TradeSession session = new TradeSession(player, partner); player.setTradeSession(session); partner.setTradePartner(player); session.start(); } else { ActionSender.sendMessage(player, "Sending trade request..."); ActionSender.sendTradeReq(partner, player.getUsername(), "wishes to trade with you."); player.setAttribute("tradeWithIndex", partner.getIndex()); player.setAttribute("didRequestTrade", Boolean.TRUE); } } }); } } [/php] Remember: Using 637/639 Dementhium.
×