Jump to content

Search the Community

Showing results for tags 'advancedcasketjava'.



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 1 result

  1. Okay so there's no problem that i can see and there's no errors that the compiler can pick up, but this doesn't seem to affect the casket in anyway. This is all saved in a file called AdvancedCasket.java and yes i have edit clickitem.java, but this doesnt work can anyone help out or point if i have done something wrong. AdvancedCasket.java: [Code]package server.model.players; import server.model.players.Client; import server.event.EventManager; import server.event.Event; import server.event.EventContainer; import server.util.Misc; public class AdvancedCasket{ public static boolean Canusebox = true; public static int Common [] = {4587, 3751, 4131, 2572, 7927, 1321, 1333, 1631, 1619, 1621, 1623, 1625, 1323, 542, 544, 3179, 536, 534, 383, 385 }; // Add more item Id's public static int Uncommon [] = {9185, 11732, 4732, 4087, 3481, 3483, 3486, 3488, 2669, 2671, 2673, 2675, 2677, 2653, 2655, 2657, 2659, 2661, 1079, 1093, 1113, 1127, 1147, 1163, 1185, 1201, 2591, 2593, 2595, 2597, 2607, 2609, 2611, 2613}; // Add more item Id's public static int Rare [] = {4151, 1038, 1040, 1042, 1044, 1046, 1048, 6585, 2615, 2617, 2619, 2621, 7386, 7390, 7394}; // Add more item Id's public static int GenerateCasketPrize(final Client c) { EventManager.getSingleton().addEvent(new Event() { int BoxTimer = 2; int Coins = 500000 + Misc.random(500000); public void execute(EventContainer Box) { Canusebox = false; if (BoxTimer == 1) { c.sendMessage("Retreiving your prize..."); } if (BoxTimer == 0) { c.getItems().addItem(995, Coins); int Random = Misc.random(100); if (Random <= 64) { c.getItems().addItem(Common[(int) (Math.random() * Common.length)], 1); c.sendMessage("Bad luck... You have recieved a [MENTION=231]red[/MENTION]@common [MENTION=24291]bla[/MENTION]@item and [MENTION=112005]Blu[/MENTION]@"+ Coins +" [MENTION=24291]bla[/MENTION]@coins."); } else if (Random >= 65 && Random <= 89) { c.getItems().addItem(Uncommon[(int) (Math.random() * Uncommon.length)], 1); c.sendMessage("not bad! You have recieved an @[email protected] [MENTION=24291]bla[/MENTION]@item and [MENTION=112005]Blu[/MENTION]@"+ Coins +" [MENTION=24291]bla[/MENTION]@coins."); } else if (Random >= 90 && Random <= 100) { c.getItems().addItem(Rare[(int) (Math.random() * Rare.length)], 1); c.sendMessage(" What luck! you have recieved an [MENTION=112005]Blu[/MENTION]@rare [MENTION=24291]bla[/MENTION]@item and [MENTION=112005]Blu[/MENTION]@"+ Coins +" [MENTION=24291]bla[/MENTION]@coins."); } } if (c == null || BoxTimer <= 0) { Box.stop(); Canusebox = true; return; } if (BoxTimer >= 0) { BoxTimer--; } } }, 1000); return Common[(int) (Math.random() * Common.length)]; } public static void Open(int itemID, Client c) { if (itemID == 405) { if (c.getItems().freeSlots() > 1) { if (Canusebox == true) { c.getItems().deleteItem(405, 1); GenerateMyrsteryPrize(c); } else { c.sendMessage("Please wait a few seconds before clicking this item again."); } } else { c.sendMessage("You need 2 free inventory slots."); } } } }[/Code] Clickitem.java: [Code] if (itemId == 405) if (c.getItems().playerHasItem(405)) { AdvancedCasket.Open(itemId, c); return; }[/code]
×