Jump to content

melron

Legendary Member
  • Posts

    1,403
  • Credits

  • Joined

  • Last visited

  • Days Won

    32
  • Feedback

    0%

Everything posted by melron

  1. Well create your instance. in every button use 1 specific bypass example the first button named Wind Walk should have bypass bypass -h npc_%objectId%_buy 1204 2 1204 ID / 2 = lvl Your bypass "buy" should check if any skill contains these infos then you should check the player's skills and count all your custom buffs if the count is lower than the maximum amount continue and give the buff. Lets see that <button value="Wind Walk" action="bypass -h npc_%objectId%_Buy 1204 2" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td></p> Your instance bypass: else if (currentCommand.startsWith("buy")) { if (st.countTokens() != 2) return; String id = st.nextToken(); // get the id String level = st.nextToken(); // get the level int idval; int lvl; try { idval = Integer.parseInt(id); // trying to parse them lvl = Integer.parseInt(level); } catch (NumberFormatException e) { System.out.println(e.getMessage()); return; } int found = 0; for (L2Effect f : player.getAllEffects()) { if (f.getSkill().getId() == 1 || f.getSkill().getId() == 2 || .....) { found++; if (found > 3) { player.sendMessage("You have reached the maximum ammount of buffs"); return; } } } L2Skill skill = SkillTable.getInstance().getInfo(idval, lvl); if (skill != null) if (!player.destroyItemByItemId("buySkill", 57, 500, null, true)) // check for items player.sendMessage("You do not have enough adena!"); else player.addSkill(skill, true); // store skill . (false for not store) } note: if you have many skills for sell its better to use a list and then check with contains to avoid this 'for' loop
  2. Yea customs are there too :P
  3. Seems like you didnt add properly the user command (starts from line 606 in pb)
  4. Do you remember clan notice? I bet you do. Check how the notice appearing in the combobox when a leader want to edit it. There isn't any tag or amything like that... it's a whole code. Btw vampir answered you twice.
  5. Check again what import you added about connection
  6. Yes Collections.max(_ILoveCookiesButMySisterAteAllOfThemIn1NightThatBitch.entrySet(), Map.Entry.comparingByValue()).getKey();
  7. Both cases can be done. I can do it tommorow because im not home again. But if you want it today for pvp case, you have to check the count of pvp's when the player increasing them and with some if statements (switch will be better) add then add your desired coupon
  8. Good idea elfo! I may add it ;) Thank you!!
  9. I didnt add any way you have to add it manually. The code have an example you can take it from //setcoupon {category} . If you still need help on how you can add it you can ask for it or tell me when the player should get coupons ;)
  10. Html updated. Thank you my friend ;)
  11. Yes change it with admin_search ... I will update it when I go home ! Thank you!
  12. Heh thank you :) :D
  13. Updated. Thanks!
  14. Hello members, I made a useful search action only for gms in order to save some of your time while you want to search items (ids,actual names etc). (Its 15 min code since i copied Bookmarks code and edited it) write //search to open the html or //search {word} for directly search Coded in aCis 370 rev Video Code Html P.s Dont forget to add the commands in adminCommands.xml ps2. i didnt design the html cause im lazy. Edit: Updated by @StinkyMadness
  15. 1st) wrong section. add one more global variable like private static final maxEnchant =0; then when you check the type of the item like this else if (event.equals("enchantShieldOrSigil")) { armorType = Inventory.PAPERDOLL_LHAND; enchantType = "EnchantArmor.htm"; htmlText = enchant(enchantType, player, armorType, itemRequiredArmor, itemRequiredArmorCount); } add your desired max enchant based on what type is. example 'shield' should be +15 so... else if (event.equals("enchantShieldOrSigil")) { armorType = Inventory.PAPERDOLL_LHAND; enchantType = "EnchantArmor.htm"; maxEnchant = 15; htmlText = enchant(enchantType, player, armorType, itemRequiredArmor, itemRequiredArmorCount); } then replace if ( currentEnchant < 25 ) to if ( currentEnchant < maxEnchant ) but, as i can see there is something wrong with your enchanter.. why this is there? newEnchantLevel = setEnchant(player, item, currentEnchant+100, armorType); every enchant is +100?
  16. Main post updated: Redeem manager dropped /coupons command now is available the coupons menu contains : remove,redeem and reward list added daily limit task manager running and the limit will be lifted the time you will set in configs new video uploaded new html files uploaded added 1 column in characters table
  17. An easy way to check all these things is to write the instance.isin and then you will see all the possible checks like this: so you will find your checks: if (player.isInCombat()) if (player.isInOlympiadMode()) you can add a check too for olympiad like if (Olympiad.getInstance().playerInStadia(player)) { return; }
  18. about that you can ask help (it isnt so hard to learn it there are many guides) . You will take faster response on how you can add a custom weapon instead of a program ;)
  19. It is better to learn to make them by yourself, than to use a program (friendly advice)
  20. Yeah tryskell told me about how remove works some posts above [GR] Ούτε γνωρίζω καλά, τουλάχιστον το παλεύουμε :P
  21. alread fixed pirama thank you :) im waiting to finish all the new things to release the update
  22. So the manager is useless - can be removed :D Since if the system will work like bookmark's i can add 2 linked texts redeem,delete and ofc the name of the coupon as linked that will show all the possible rewards :P
  23. no i edited all those things u told me about the max coupons and limits per day (this task) etc. now im trying to think other ways to do that :P if the bypass contains (GOLD)Coupon[C] for example i can just check the category and delete a random coupon with the same category. :P
  24. Sure! i'm learning by my mistakes that's obvious ... and thank you for all your suggestions. about this: A good developer is a lazy developer I do not agree :D why a good dev should be lazy? That is the best part of this thing so... (just my opinion) P.s i'm thinking to remove as you said the name and use direcly the sb but there is one problem. commands like /showcoupons or /deletecoupons or even npcs,html / alert messages etc can be used without any issue but... combobox doesn't accept spaces.. so will fucked up (Golden-Coupon-B-Grade) ? :D also there is another problem there. The bypass for the redeem is sending the name Coupon coupon = player.getCouponsByName(couponName); if the combobox will contains > 1 example Golden . how the manager can delete the coupon(based on id) ? Cant even add something with placeholder to keep these id's
  25. Tryskell, The good thing is that your ideas are awesome. The bad thing is, finally this share will belong to you xD I'm gonna listen your advice :P
×
×
  • Create New...