Jump to content

Solomun

Legendary Member
  • Posts

    1,402
  • Credits

  • Joined

  • Last visited

  • Days Won

    1
  • Feedback

    0%

Everything posted by Solomun

  1. What eclipse version are you using?
  2. A simple google search: https://stackoverflow.com/questions/2083461/unbound-classpath-container-in-eclipse
  3. According to this post you should not reply to your topic in order to bring it up. Please use the button which is created for this reason.
  4. mysql> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass'; mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' -> WITH GRANT OPTION; mysql> CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass'; mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%' -> WITH GRANT OPTION; Source: https://stackoverflow.com/questions/1559955/host-xxx-xx-xxx-xxx-is-not-allowed-to-connect-to-this-mysql-server
  5. Φιλε οτι και να σου πω ψεμα θα ναι. Εγω απλα σου προτεινω και λεω οτι ειναι καλυτερο το aCis γιατι ειναι οργανωμενο pack. Το frozen ειναι σκετο χαος. Επομενως οτι και να γινει καλυτερα aCis.
  6. Ιδια διαδικασια πανω κατω για compile, ναι. Java version σιγουρα θα χρειαστεις 8+. Τα αλλα δε παιζουν ρολο, αλλα ο Χριστός...τι eclipse mars και mysql 5.1. Αυτα παιζαν μπαλα πριν 10 χρονια :P Τραβα ενα update.
  7. Καλα δε το συζηταω. Το aCis ειναι μακραν καλυτερο απο frozen (προσωπικη αποψη παντα). Επισης πιο ευκολα βρισκεις developer να δουλεψει πανω στο aCis παρα σε κατι που ειναι παρατημενο εδω και 100 χρονια.
  8. Ναι και εγω το free aCis θα χρησιμοποιουσα. Ποιο buffer χρησιμοποιεις? Εχει δικο του το frozen?
  9. Να βρεις buffs. -Δε σε νιωθω..Τι εννοεις? Οτι θες τα IDs απο τα buffs? Acis: Μπορεις να το εχεις free, αλλα παλαιοτερη εκδοση του (αν δε κανω λαθος) - παλαιοτερο rev Developer: Δυσκολα θα βρεις πιστευω...Η αν βρεις θα σου ζηταει 150 ευρο για καθε γραμμη κωδικα.
  10. Ωραια. Εστω οτι με στελνεις πμ και δε ξερω να σε βοηθησω τι γινεται? Πρεπει να βρεις αλλον να στειλεις πμ. Γιατι πολυ απλα οπως σου ειπα δε ποσταρεις εδω τι θες, ωστε να το δουν και αλλο χρηστες, με αποτελεσμα να εχεις παραπανω πιθανοτητες να παρεις τη βοηθεια που χρειαζεσαι?
  11. Θα προσπαθησω να στο πω οσο πιο απλα μπορω. Βλεπεις ενα ποστ που καποιος λεει "Βοηθεια καντε με πμ". Μπανεις στο κοπο να τον κανεις πμ και να του το βγαλεις με το στανιο το τι βοηθεια θελει? Πολυ απλα, οχι. Αν βαριεται ο ιδιος να ποσταρει το τι βοηθεια χρειαζεται, ετσι και αυτοι που μπορουν να βοηθησουν βαριουνται να μπουν στον κοπο να κανουν πμ. Απλα πες τι βοηθεια χρειαζεσαι. Και εισαι σε ελληνικο section. Δε χρειαζονται καθολου τα Αγγλικα.
  12. Check the console for any errors. The attribute "chance" might be incorrect value.
  13. Can you show us the code you read the votes of the link?
  14. Change it to UTF-8 and re-paste the URL of your server's details.
  15. Depends. Like i said HtmlUnit looks for classes or attributes right? Let's say, the class the hopzone stores its votes, is named like <div class="voteclass">1500</div> right? Then you will set HtmlUnit look for voteclass and u get the votes. But when you mess with Kadar (hopzone owner) he is changing the class name every now and then, just to mess with people vote reward systems. So the class is named, lets say, voteclas now. You must change Html Unit Configuration, to search for voteclas, instead of voteclass. l2 network and topzone didnt change so often, so...reward systems are still working
  16. Check your votefile.properties file encoding.
  17. This actually made me laugh a bit. You said you put this link: https://l2.hopzone.net/lineage2/details/102978/L2TimeMachine The thing is, that something went wrong while you copy paste or something. It is encoding problems. So try to copy it with UTF-8 encoding. (What operating system you use?) Try to run this program in your eclipse and u will see the difference: if you have URL myURL = new URL(CORRECT_URL); your response is 200 a.k.a, a good one. But if you use URL myURL = new URL(BROKEN_URL); your response is BAD_REQUEST (400). Run the SSCCE with both URLs and you will see what i mean :) P.S: HtmlUnit is not required for such a vote system, but ok...
  18. Instead of using https://apis.hopzone.net...... link, try to use the link where u see your votes. Example:
  19. Hmmm. How this vote system should work like? I mean it is auto reward every x votes or .getreward like?
  20. Show us AutoRewardHandler 373 line.
  21. Despite @melron's answer. As far as i remember, this cannot be done they way you are trying do (even if it is a great approach). So, you can go my way, with a custom item handler for each item (will be a pain in the ass if you want to use it for many items, but easy for 1-2 items so can play around with a lot of stuff). Finally, the way i see things now, in order to make it generic and make it work for a lot of items, you would typically need: -1 new object or edit L2ExtractableProduct and add it a kind of field "groupId", which will support the group. -Then make the parser, parse the groups (in case of edit L2ExtractableProduct, you have to make it accept 4 arguments, in order not to screw the already existing capsuled items) -A new handler for these items in order to group the items. (I would leave "ExtractableItems" handler as it is) Since i gave you the example, i will give you an example how to make groups in the handler. Check this SSCCE: package test; import java.util.ArrayList; import java.util.List; import java.util.Random; public class Maxcheaters { // @formatter:off private static final double[]GROUPS = { 100, //Group 0, 100% chance 50, //Group 1, 50% chance 3.1, //Group 2, 3.1% chance }; private static final Item[] ITEMS = { //Group 0: Adena or Ancient adena new Item(57, 100,120, 0), //Adena, 100-120 count, group 0 new Item(5575,100,100,0), //Ancient adena, 100 count, group 0 //Group 1: Knights Epaulette new Item(9912,500,1000,1), //Knight epaulette, 100% chance, 500-1k count, group 1 new Item(9912,50011,100110,1), //Knight epaulette, 100% chance, 500-1k count, group 1 //Group 2: Attribute crystals (9552,9553,9554,9555,9556,9557 ) new Item(9552,1,1,2), //Holy Crystal, 1 count, group 2 new Item(9553,1,1,2), //Dark Crystal, 1 count, group 2 new Item(9554,1,1,2), //Wind Crystal, 1 count, group 2 }; private static Random random = new Random(); // @formatter:on public static void main(String[] args) { for (int groupId = 0; groupId < GROUPS.length; groupId++) { double groupChance = GROUPS[groupId]; double random = randomDouble(); if (random >= groupChance) //Group did not succeed continue; List<Item> itemsInThisGroup = new ArrayList<>(); for (Item i : ITEMS) { if (i.groupId == groupId) itemsInThisGroup.add(i); } int randomItem = randomInt(0, itemsInThisGroup.size() - 1); Item item = itemsInThisGroup.get(randomItem); int count = randomInt(item.minCount, item.maxCount); System.out.println("ID=" + item.id + " - Count=" + count + " - Group=" + item.groupId); } } private static double randomDouble() { return Math.random() * 100; } private static int randomInt(int min, int max) { return random.nextInt(max + 1 - min) + min; } private static class Item { private int id; private int minCount; private int maxCount; private int groupId; public Item(int id, int minCount, int maxCount, int groupId) { super(); this.id = id; this.minCount = minCount; this.maxCount = maxCount; this.groupId = groupId; } } } You can run it, and you will see that it does what you want. Let's see it on handler though. public class AttributeCrystalBox implements IItemHandler { // @formatter:off private static final double[]GROUPS = { 100, //Group 0, 100% chance 50, //Group 1, 50% chance 93.1, //Group 2, 3.1% chance }; private static final Item[] ITEMS = { //Group 0: Adena or Ancient adena new Item(57, 100,120, 0), //Adena, 80% chance, 100-120 count, group 1 new Item(5575,100,100,0), //Ancient adena, 50%chance, 100 count, group 1 //Group 1: Knights Epaulette new Item(9912,500,1000,1), //Knight epaulette, 100% chance, 500-1k count, group 2 new Item(9912,50011,100110,1), //Knight epaulette, 100% chance, 500-1k count, group 2 //Group 2: Attribute crystals (9552,9553,9554,9555,9556,9557 ) new Item(9552,1,1,2), //Holy Crystal, 3%chance, 1 count, group 3 new Item(9553,1,1,2), //Dark Crystal, 3%chance, 1 count, group 3 new Item(9554,1,1,2), //Wind Crystal, 3%chance, 1 count, group 3 }; @Override public boolean useItem(L2Playable playable, L2ItemInstance item, boolean forceUse) { if (item == null) { return false; } if (item.getId() != 21888) // Attribute crystal box id { return false; } L2PcInstance player = playable.getActingPlayer(); if (player == null) { return false; } giveItems(); player.destroyItem("Attribute Box", item, 1, player, true); return true; } private void giveItems(L2PcInstance player) { for (int groupId = 0; groupId < GROUPS.length; groupId++) { double groupChance = GROUPS[groupId]; double random = randomDouble(); if (random >= groupChance) //Group did not succeed continue; List<Item> itemsInThisGroup = new ArrayList<>(); for (Item i : ITEMS) { if (i.groupId == groupId) itemsInThisGroup.add(i); } int randomItem = randomInt(0, itemsInThisGroup.size() - 1); Item item = itemsInThisGroup.get(randomItem); int count = randomInt(item.minCount, item.maxCount); player.addItem("Attribute box", item.id, count, null, true); } } /* Replace these with Rnd.get() */ private static double randomDouble() { return Math.random() * 100; } private static int randomInt(int min, int max) { return random.nextInt(max + 1 - min) + min; } private static class Item { private int id; private int minCount; private int maxCount; private int groupId; public Item(int id, int minCount, int maxCount, int groupId) { super(); this.id = id; this.minCount = minCount; this.maxCount = maxCount; this.groupId = groupId; } } } So now you are able to add whatever you want. P.S: Please ignore any syntax errors, everything made in notepad :P
×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock