Jump to content

Search the Community

Showing results for tags 'detection'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Found 2 results

  1. [CENTER]Tired of seeing people abusing dupes in PI's since there's so many of them. I have made a very basic dupe detection to detect these guys and set them banned instant. [B]Note:[/B] The Configuration.java represents Config.java in regular PI Usage: Player X dupes ags Player X keeps duping the ags, now he passes the duping limit Server - detects the player, adds to the ban list, force logouts and finishes the ban. Server - Tells in console who has been duping to inform you. Add to anywhere (DupeDetection.java) [CODE]package server.antimacro; import server.Connection; import server.configuration.Configuration; import server.model.players.Client; import server.model.players.PlayerHandler; /** * @author Fuzen Seth * [MENTION=98951]infor[/MENTION]mation Basic duping detection. * [MENTION=3199]Sin[/MENTION]ce 23.9.2014 * @update 1.0 */ public class DupeDetection { /** Possible duping items. (un-noted ids) */ public static final int[] DUPING_ITEMS = {11694,11696,11698,11700,11724,11726}; /** Item amount to ban duper.*/ public static final int MAX_DUPE_LIMIT = 100; /** true: Checks inventory e.g 28 ags (un-noted) */ public static final boolean INVENTORY_CHECK_ENABLED = false; /** Dupe decect instance*/ private static DupeDetection detection = new DupeDetection(); /** Scans the player's items and gives a ban.*/ public void scan(Client client) { if (client.playerRights > 1) return; for (int item : DUPING_ITEMS) if (client.getItems().getItemAmount(item) > MAX_DUPE_LIMIT || INVENTORY_CHECK_ENABLED && client.getItems().getItemAmount(item) > 27) { ban(client); client.forceLogout(); } } /** Bans player directly. */ public void ban(Client c) { try { Connection.addNameToBanList(c.playerName); Connection.addNameToFile(c.playerName); for (int i = 0; i < Configuration.MAX_PLAYERS; i++) { if (PlayerHandler.players[i] != null) { if (PlayerHandler.players[i].playerName .equalsIgnoreCase(c.playerName)) { PlayerHandler.players[i].disconnected = true; System.out.println(""+c.playerName+" was banned for duping items."); } } } } catch (Exception e) { System.out.print("Player "+c.playerName+" has logged out."); } } public static DupeDetection getDetection() { return detection; } } [/CODE] Next go to Client.java and find [CODE]public void process() {[/CODE] Under that add this [CODE]DupeDetection.getDetection().scan(this);[/CODE] Also add to Client java this force logout. [code] /** * Sends to the player a forced logout. */ public void forceLogout() { if (this.clan != null) { this.clan.removeMember(this); } outStream.createFrame(109); setConnected(false); if (hasNpc == true) getSummoning().pickUpClean(this, summonId); CycleEventHandler.getSingleton().stopEvents(this); properLogout = true; ConnectedFrom.addConnectedFrom(this, connectedFrom); } [/code] [U] Congrats you cannot abuse dupes anymore.[/U] Media [img]http://puu.sh/bKdKg/bc6fdb76e8.jpg[/img] [img]http://puu.sh/bKezr/0dce6105ab.jpg[/img] Console action when server auto-bans a player. [img]http://puu.sh/bKeFB/9db6effaeb.png[/img] [B][U]I find this system a must-have if you're hosting a PI since theres just simply too many dupes[/U][/B] and many unidentified. Also i'm pretty sure that [B]someone is going to ask does it ban staff members too? answer: No.[/B] *Credits *Fuzen Seth *Format[/CENTER]
  2. The problem: I have up to 20 ish npcs and 20 ish projectiles on screen at a time; how do i check for collisions between any of them? Some info: I'm extremely inexpierenced in the game dev world and i only just figured out a haxy way to make and draw a tile map platformer. My current 'collision detection' is literally just having player only add x_speed to xpixelposition if Main.map.getMapArray[ytile][xtile+ 1] is greater then 2(cos 0 1 2 are all unwalkable). The same thing goes for projectile(even same var names)