Jump to content

melron

Legendary Member
  • Posts

    1,403
  • Credits

  • Joined

  • Last visited

  • Days Won

    32
  • Feedback

    0%

Everything posted by melron

  1. at least we are trying :D
  2. Alright then im doing it wrong... And im asking again now, Even if i will use a list to store them .... Then i have to do the same thing to shuffle them right?.......... :D Forget about vectors.. lets say i have list ... i want just the way for a random split for 2 other lists...
  3. Thank you for your help, I want 2 teams (the players vector will be clean after the split) im trying to use a kind of shuffle ... with your way its like the first 25 players go to team1 and the others go to team 2.. i want random selection :/ p.s if i can do this one with a better way i will not say no :D But if i will use a list or something , I should do the same method as im searching now... Am i wrong?
  4. i updated my previous post you can take a look
  5. Yea u found it! as im saying.... Edit: Actually i havent something to show you.. i just want to create this code i havent ready code to show you im just want find this way to split... To explain it again: players using the command .example When the list 'players' collect 50 people the registration will close. after that i want to split the players in these 2 vectors randomly so i can continue work with them... i think you can understand what i mean.. i wanna start making something... atm the code is here but as i said isnt showing something... You dont need these.. Open registrations check registrations Event.java Say2.java checkCommand in Say2.java And in shuffle i want to make this split... So??
  6. What code do you need? i havent ready code that working thats why im asking for help... players = 50 players vec1 = 0 vec2 = 0; how i can randomly split the players to vec1 & vec2. Sorry for no posting my code but i think its rly useless since im looking the way for a split Correct me if im wrong Edit: Actually i havent something to show you.. i just want to create this code
  7. Hello guys! Im trying to find the best way to split 3 Vectors... example: public static Vector<L2PcInstance> players = new Vector<>(); Contains 50 players. I want to split them to 25 - 25 but not taking 1 by 1 .. i want randomly selection in the next 2 vectors public static Vector<L2PcInstance> vec1 = new Vector<>(); public static Vector<L2PcInstance> vec2 = new Vector<>(); Im always missing something and the result isnt correct. Someone can help me? Thank you!!!
  8. Καλές γιορτές και σε εσένα φίλε μου! Καλή χρονιά σε ολους!
  9. Compile problem. isnt update the new changes. check it out
  10. drop the message, player.logout(true);
  11. before player.store() add this player.getAppearance().setSex(newGenre)
  12. con = L2DatabaseFactory.getInstance().getConnection(None) // delete none
  13. create one more array like FORBIDDEN and insert your custom weapons ids CUSTOM = [6367,22] and paste these lines in 73 line (in case u deleted) if idtest in CUSTOM: htmltext += "<tr><td><img src=\""+str(icon)+"\" width=32 height=32></td><td><a action=\"bypass -h Quest q8015_Enchex step1next_" + str(Item.getObjectId()) +"\">" + itemTemplate.getName() + " ["+str(pgrade)+"] " + enchant + "</a></td></tr>" else: htmltext += "<tr><td><img src=\"Icon."+str(icon)+"\" width=32 height=32></td><td><a action=\"bypass -h Quest q8015_Enchex step1next_" + str(Item.getObjectId()) +"\">" + itemTemplate.getName() + " ["+str(pgrade)+"] " + enchant + "</a></td></tr>"
  14. just lol... i mean you have to edit this line bro... Make an array named CUSTOM = [you,ids,here,for,example] and before the line 73 use an if statement for example if idtest not in CUSTOM: .... else: ....
  15. As you can see your icon path is: ct1icon.weapon_dynasty_hammer_i01 if u look closer in line 73 of init.py <img src=\"Icon."+str(icon)+"\" width=32 it load icons with the string of your path and before this string puts Icon. So in this case trying to load the path : Icon.ct1icon.weapon_dynasty_hammer_i01 ....
  16. can you paste the item icon path?
  17. The code is using one if before it takes the icon from z_market_icons. Did you check the conditions? 1# Your weapon musnt be in FORBIDDEN array (look @ the start) 2# Your weapon template must have duration -1 (db part) 3# Your weapon grade must be 5 (S grade) 4# Your weapon type must be in Types TYPES = ["Sword","Blunt","Dagger","Bow","Etc","Pole","Fist","Dual Sword","Dual Fist","Big Sword","Big Blunt"] 5# Your weapon enchant must be more than 0. if idtest not in FORBIDDEN and itemTemplate.getDuration() == -1 and grade == 5 and itype in TYPES and Item.getEnchantLevel() > 0:
  18. activeChar.getKnownTypeInRadius(L2PcInstance.class, 1250)
  19. i think these errors are showing because activeChar is Character. add a cast or change it to L2PcInstance..
  20. Did u add the configs properly in npcs.properties?
  21. replace _log to LOGGER: LOGGER.info("Error saving showNpcCrest for castle " + getName() + ": " + e.getMessage());
  22. Solved! Thank you!!
×
×
  • Create New...