Jump to content

Search the Community

Showing results for tags 'placing'.



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 7 results

  1. So basically I want to know how you change the focus from one button to another, or one component to the other via keyboard. So far i have the following code: [CODE] JButton one = new JButton("1"); Action buttonPress = new AbstractAction(){ public void actionPerformed(ActionEvent e){ System.out.println("You pressed the number 1!"); } }; one.getInputMap().put(KeyStroke.getKeyStroke("1"),"1"); one.getActionMap().put("1",buttonPress);[/CODE] Which works fine IF the focus is set on the JButton, however the focus doesn't change to the JButton when I enter the '1' key on my keyboard.
  2. Hi there, i was trying to do is, when a player interacts with a object, then the object will temporary spawns another object. on its place, Then if you use the new object, it turns out into another object temporary. So what i mainly did was i used woodcutting.java as a base. and no i do not want this to receive xp, and not as farming. this was just for trying making objects spawn other objects. [[CODE]package com.rs.game.player.actions; import com.rs.cache.loaders.ItemDefinitions; import com.rs.game.Animation; import com.rs.game.World; import com.rs.game.WorldObject; import com.rs.game.WorldTile; import com.rs.game.player.Player; import com.rs.game.player.Skills; import com.rs.game.ForceTalk; import com.rs.utils.Utils; public final class EvilFarming extends Action { public static enum EvilFarmingDefinitions { SEEDLING1(1, 1800, -1, 20, 5, 11392, 1800, 1), SEEDLING2(1, 1800, -1, 20, 5, 11393, 1800, 2), SEEDLING3(1, 1800, -1, 20, 5, 11394, 1800, 3), SEEDLING4(1, 1800, -1, 20, 5, 11395, 1800, 4), EVILSEED1(1, 1800, -1, 20, 5, 11922, 1800, 5), EVILSEED2(1, 1800, -1, 20, 5, 11923, 1800, 6), EVILSEED3(1, 1800, -1, 20, 5, 11924, 1800, 7), EVILSEED4(1, 1800, -1, 120, 17, 11927, 1800, 1), IVYROCKS(1, 1800, -1, 120, 17, 38443, 1800, 10); private int level; private double xp; private int logsId; private int logBaseTime; private int logRandomTime; private int stumpId; private int respawnDelay; private int randomLifeProbability; private EvilFarmingDefinitions(int level, double xp, int logsId, int logBaseTime, int logRandomTime, int stumpId, int respawnDelay, int randomLifeProbability) { this.level = level; this.xp = xp; this.logsId = logsId; this.logBaseTime = logBaseTime; this.logRandomTime = logRandomTime; this.stumpId = stumpId; this.respawnDelay = respawnDelay; this.randomLifeProbability = randomLifeProbability; } public int getLevel() { return level; } public double getXp() { return xp; } public int getLogsId() { return logsId; } public int getLogBaseTime() { return logBaseTime; } public int getLogRandomTime() { return logRandomTime; } public int getStumpId() { return stumpId; } public int getRespawnDelay() { return respawnDelay; } public int getRandomLifeProbability() { return randomLifeProbability; } } private WorldObject tree; private EvilFarmingDefinitions definitions; private int emoteId; private boolean usingBeaver = false; private int axeTime; public EvilFarming(WorldObject tree, EvilFarmingDefinitions definitions) { this.tree = tree; this.definitions = definitions; } @Override public boolean start(Player player) { if (!checkAll(player)) return false; player.getPackets() .sendGameMessage( usingBeaver ? "Your beaver uses its strong teeth to chop down the tree..." : "You attempt to light the " + (EvilFarmingDefinitions.IVYROCKS == definitions ? "EvilFarming" : "EvilFarming") + "...", true); setActionDelay(player, getWoodcuttingDelay(player)); return true; } private int getWoodcuttingDelay(Player player) { int summoningBonus = player.getFamiliar() != null ? (player .getFamiliar().getId() == 6808 || player.getFamiliar().getId() == 6807) ? 10 : 0 : 0; int wcTimer = definitions.getLogBaseTime() - (player.getSkills().getLevel(8) + summoningBonus) - Utils.getRandom(axeTime); if (wcTimer < 1 + definitions.getLogRandomTime()) wcTimer = 1 + Utils.getRandom(definitions.getLogRandomTime()); wcTimer /= player.getAuraManager().getWoodcuttingAccurayMultiplier(); return wcTimer; } private boolean checkAll(Player player) { if (!setAxe(player)) { player.getPackets().sendGameMessage("You feed the seedling with fear, The seedling gets stronger!"); return false; } if (!hasFiremakingLevel(player)) return false; if (!player.getInventory().hasFreeSlots()) { player.getPackets().sendGameMessage("Not enough space in your inventory."); return false; } return true; } private boolean hasFiremakingLevel(Player player) { if (definitions.getLevel() > player.getSkills().getLevel(8)) { player.getPackets().sendGameMessage("You need a Firemaking level of " + definitions.getLevel() + " to feed this seedling."); return false; } return true; } private boolean setAxe(Player player) { int level = player.getSkills().getLevel(1); int weaponId = player.getEquipment().getWeaponId(); if (weaponId != -1) { switch (weaponId) { case 23014: //Burning Log if (level >= 1) { emoteId = 11971; axeTime = 250; return true; } break; } } if (player.getInventory().containsOneItem(23014)) { if (level >= 1) { //Burning Log emoteId = 16700; axeTime = 13; return true; } } return false; } public static int getAxeAnim(Player player) { int level = player.getSkills().getLevel(8); int weaponId = player.getEquipment().getWeaponId(); if (weaponId != -1) { switch (weaponId) { case 23014: //Logs if (level >= 1) { return 2846; } break; } } if (player.getInventory().containsOneItem(23014)) { if (level >= 1) { return 2846; } } return -1; } private boolean hasAxe(Player player) { if (player.getInventory().containsOneItem(23014)) return true; int weaponId = player.getEquipment().getWeaponId(); if (weaponId == -1) return false; switch (weaponId) { case 23014://Logs return true; default: return false; } } @Override public boolean process(Player player) { player.setNextAnimation(new Animation(usingBeaver ? 1 : emoteId)); return checkTree(player); } private boolean usedDeplateAurora; @Override public int processWithDelay(Player player) { addLog(player); if (!usedDeplateAurora && (1 + Math.random()) < player.getAuraManager() .getChanceNotDepleteMN_WC()) { usedDeplateAurora = true; } else if (Utils.getRandom(definitions.getRandomLifeProbability()) == 0) { long time = definitions.respawnDelay * 600; World.spawnTemporaryObject( new WorldObject(definitions.getStumpId(), tree.getType(), tree.getRotation(), tree.getX(), tree.getY(), tree.getPlane()), time); if (tree.getPlane() < 3 && definitions != EvilFarmingDefinitions.IVYROCKS) { WorldObject object = World.getObject(new WorldTile(tree.getX() - 1, tree.getY() - 1, tree.getPlane() + 1)); if (object == null) { object = World.getObject(new WorldTile(tree.getX(), tree .getY() - 1, tree.getPlane() + 1)); if (object == null) { object = World.getObject(new WorldTile(tree.getX() - 1, tree.getY(), tree.getPlane() + 1)); if (object == null) { object = World.getObject(new WorldTile(tree.getX(), tree.getY(), tree.getPlane() + 1)); } } } if (object != null) World.removeTemporaryObject(object, time, false); } player.setNextAnimation(new Animation(-1)); return -1; } if (!player.getInventory().hasFreeSlots()) { player.setNextAnimation(new Animation(-1)); player.getPackets().sendGameMessage( "Not enough space in your inventory."); return -1; } return getWoodcuttingDelay(player); } private void addLog(Player player) { double xpBoost = 1.00; if (!hasFullOutfit(player) && player.getEquipment().getChestId() == 10939) xpBoost += 0.008; if (!hasFullOutfit(player) && player.getEquipment().getLegsId() == 10940) xpBoost += 0.006; if (!hasFullOutfit(player) && player.getEquipment().getHatId() == 10941) xpBoost += 0.004; if (!hasFullOutfit(player) && player.getEquipment().getBootsId() == 10933) xpBoost += 0.002; if (hasFullOutfit(player)) xpBoost += 1.500; if (player.getEquipment().getWeaponId() == 13661 && Utils.random(1000) < 300) { player.sendMessage("Your inferno adze burns the logs instantly."); player.getSkills().addXp(Skills.FIREMAKING, definitions.getXp() * xpBoost); } else { player.getSkills().addXp(Skills.FIREMAKING, definitions.getXp() * xpBoost); } if (definitions == EvilFarmingDefinitions.IVYROCKS) { player.getPackets().sendGameMessage("The seedling grows as it consumes all the fear.", true); } else { String logName = ItemDefinitions.getItemDefinitions(definitions.getLogsId()).getName().toLowerCase(); player.getPackets().sendGameMessage("The seedling grows as it consumes all the fear.", true); } } public boolean hasFullOutfit(Player player) { if (player.getEquipment().getChestId() == 10939 && player.getEquipment().getLegsId() == 10940 && player.getEquipment().getHatId() == 10941 && player.getEquipment().getBootsId() == 10933) return true; return false; } private boolean checkTree(Player player) { return World.getRegion(tree.getRegionId()).containsObject(tree.getId(), tree); } @Override public void stop(Player player) { setActionDelay(player, 3); } } [/CODE] [CODE] if (object.getId() == 11391) { player.getActionManager().setAction(new EvilFarming(object,EvilFarmingDefinitions.SEEDLING1)); } else if (id == 11392) player.getActionManager().setAction(new EvilFarming(object,EvilFarmingDefinitions.SEEDLING2)); else if (id == 11393) player.getActionManager().setAction(new EvilFarming(object,EvilFarmingDefinitions.SEEDLING3)); else if (id == 11394) player.getActionManager().setAction(new EvilFarming(object,EvilFarmingDefinitions.SEEDLING4)); else if (id == 11395) player.getActionManager().setAction(new EvilFarming(object,EvilFarmingDefinitions.EVILSEED1)); else if (id == 11922) player.getActionManager().setAction(new EvilFarming(object,EvilFarmingDefinitions.EVILSEED2)); else if (id == 11923) player.getActionManager().setAction(new EvilFarming(object,EvilFarmingDefinitions.EVILSEED3)); else if (id == 11924) player.getActionManager().setAction(new EvilFarming(object,EvilFarmingDefinitions.EVILSEED4));[/CODE] the result that i wanted to get was like in this photo. [IMG]https://scontent-a-ams.xx.fbcdn.net/hphotos-xaf1/t1.0-9/10462666_474569032687941_578874284207507060_n.jpg[/IMG] so if you used, object 1, it turns out in object 2, then use object 2 then it turns out in object 3. but momently it does not update the curent model to the next ID, when object 11391 turns into object 11392. then i cant use it anymore. But if i spawn object 11392 on another spot. then object 11392 turns into object 11393 after using. So my question was, is there any possible way of making this work? and not only that, is it possible to make objects spawn temporary objects *more then one*. Help is greatly appreciated!
  3. okay so I am trying to replace the skills with a nicer interface in my opinion. here is what happens when I try to change them [URL=http://imgur.com/h9wP9iK][IMG]http://i.imgur.com/h9wP9iK.png[/IMG][/URL]
  4. Hey guys thanks for at least opening this post, I am having trouble on my private server to place objects. It is that I can do "::object id" and it will place the object I want but then when I logout and back in then the object is gone. Also when I place this object it isn't visible to other players only to the player who has placed the object. I have had this problem with a few clients making me try new clients every time. Eventually I found a very good client so I want to use it but I need the help of you guys to tell me if its the clients fault or the servers fault and how I can fix it. Is it a problem with saving the world? Or what please help and if you can't thanks for reading my post! Help :D
  5. Hello, 1. #1 fixed ------------- [B]2. Alright the second thing is My NPCs.xml, I was wondering if there is a way to make them turn directions because there isn't a variable there to change it[/B] Thanks - ChaoticPig Skype: ChaoticPig
  6. Hey, In this tutorial I will try and help you Add objects. I am doing this on the MATRIX Source. First go into your Source Folder then: src/com/rs/utils/NPCSpawning.Java If you scroll down inside that Java file you will find a section of it with this code below: [code]/** * Object custom add */ World.spawnObject(new WorldObject(17010, 10, 0, 3154, 3484, 0), true); } [/code] Here is the break down of the code above: [code]World.spawnObject(new WorldObject(OBJECT ID, 10, THE WAY IT FACES, X Coord, Y Coord, 0), true);[/code] Here is what I have found out about the way the object faces: 0 - South 1 - West 2 - North 3 - East And the object we will add is an Altar in the "Grand Exchange". [code]World.spawnObject(new WorldObject(409, 10, 0, 3165, 3477, 0), true);[/code] Save/Close/Compile and your done. Hope I helped. -Chris.
  7. okay, so ive learned how to place an NPC by doing Source\Source\data\npcs unpackedSpawnLists and PackedSpawns (matrix source) but i have a question.. in the unpacked folder ide paste (ID) (X) (Y) (Z) 528 - 1000 2000 0 [COLOR="#FF0000"]My question is: What can i paste after the 0? what if i want the NPC to walk? what if i dont want the NPC to walk? etc.[/COLOR] thanks to anyone who helps :D
×