Jump to content

melron

Legendary Member
  • Posts

    1,403
  • Credits

  • Joined

  • Last visited

  • Days Won

    32
  • Feedback

    0%

Everything posted by melron

  1. I still believe that the template is edited by this faction mod . Also, why you dont post your error?
  2. Probably baseHpMax returns null. Debug it to be sure, Check in your custom code how the baseHpMax is getting values ( probably dB connection), if yes then you missing the line in restore case of adding the base hp.. something like that player.setBaseHpMax(reset.getInt(something));
  3. The code in RequestEnchantItem can be replaced with: (Both codes will work) ### Eclipse Workspace Patch 1.0 #P aCis_gameserver Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java =================================================================== --- java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java (revision 239) +++ java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java (working copy) @@ -127,6 +127,9 @@ } item.setEnchantLevel(item.getEnchantLevel() + 1); + + if(Config.ENABLE_ENCHANT_ANNOUNCE && (Config.ENCHANT_ANNOUNCE_LEVEL == 0 || Config.ENCHANT_ANNOUNCE_LEVEL <= item.getEnchantLevel())) + Broadcast.announceToOnlinePlayers("Congratulations to " + activeChar.getName() + "! Your " + item.getItemName() + " has been successfully enchanted to +" + item.getEnchantLevel()); + item.updateDatabase(); // If item is equipped, verify the skill obtention (+4 duals, +6 armorset).
  4. no you dont need it as static you need it instanceid ... just put the variable out of any method. if you still have problems add me in skype
  5. be sure that your variable assasins is a global variable. the code you posted seems running fine without problems
  6. this is happening because the variable firstkill is inside the kill method. Put it after assasins... generally follow this : private long firstkill = 0L; the firstkill variable must be used after the end of the switch. switch(something) { case 1: ... brake; case 2: ... break; } firstkill = System.currentTimeMillis() + (10*1000); //or instantly 10000 the only thing you have to do is to check the the current time - firstkill is > 10000 then 10 seconds are passed p.s Edited example in case 1: switch(assasins) { case 1: if (System.currentTimeMillis() - firstkill > 10000) 10 seconds passed else not passed yet break; cases X... .... .... } firstkill = System.currentTimeMillis() + (10 * 1000);
  7. for real guys what do you expect from a guy like skylord?
  8. Well a good code must be secured too, Generally avoid to create codes that uses value from html because this one can be easily bypassed from programs like andrenaline... Even in buffer case where the bypass is npc_%objectId%_buff 1204 2 can be bypassed to npc_%objectId%_buff 7029 4 and the user will get gm speed lvl 4... p.s Ofc a code like you did with all necessary checks inside can be worked too without any problem but its a huge amount of wasted time :D Ontopic: good job for your time
  9. Set the new npc type as the old one, copy html to the new one.
  10. The type is wrong . Go to your xml and change the type from default to DEFAULT
  11. if this augmentation id is standar then it should be located somewhere in this file with a unique aug id , so dont look in duel might active/passive ... I dont rly know how the augmentations working in hi5 but i believe these stats are combined because str+1 and d.might are skills (atleast in IL) and 2 skills in the same aug is not available so, if you have your own hi5 create an automatic aug system to catch it by urself
  12. seems like it needs rework... what instance is the object 'player' ? what arguments getPlayerWorld method have? also you have edit this line to: final boolean is83 = InstanceManager.getInstance().getPlayerWorld(player).getTemplateId() == TEMPLATE_ID_83; Its boolean logic. It could be even in getTemplateId() ... try this one boolean is83 = false; if (InstanceManager.getInstance().getPlayerWorld(player)!= null) { if (InstanceManager.getInstance().getPlayerWorld(player).getTemplateId() != null) // if getTemplateId() returns int then replace the null check with > 0 is83 =InstanceManager.getInstance().getPlayerWorld(player).getTemplateId() == TEMPLATE_ID_83; else System.out.println("template Id == null"); } else System.out.println("get player == null"); And check your console
  13. First of all, you are not allowed to have an opinion since you are breaking the rules and as i can see you doing it non-stop even when some ppl told you that many times. Read the rules in the request section of l2j. Do not ask for help for a thing that you can find byurself if you just search it via eclipse, the way you moving-posting makes the ppl 'offenders' because they are tired of your continuous questions. Asking for help and Asking for ready code is different things my friend. You can request a full code as there exist a section for this reason and have this concept but do not ask what ever is coming to your mind... They will not even answer.. Finally.. can you ffs do not spam in messages & skype?
  14. Gameserver/model/zone/type open your zone thay you need and then apply the buff thing.
  15. You searched for 'onEnter' word in your eclipse and you still have questions? Or you didnt even touch this tool?
  16. Give the buff you want in method onEnter in each zone you need
  17. Nobody will help you if you posting like this...
  18. Strange... I didn't see anyone to criticize my code except nightwolf that helped me, but they just said good words about of what i did.. So you are saying that my code is terrible because of the naming i'm using for the variables?
  19. You could tell us whats wrong, what i should replace with what ? as nightwolf did .. By your words i can only answer to you that all codes are terrible.
  20. i dont judge you too :P i apologize my faults and i like when someone criticizes my codes , im learning from that. About the user html i had it inside and i forgot to remove the placeholder from the code just because when the user is pressing get reward a message appearing and telling how many likes have to do before get the reward. Thanks for mentioned that. I will probly make a v2 as you said
  21. Thank you for your time, As i said i created (i can say fast) because my purpose was to test it in local way thats why as i can see there are some problems :D I forgot it xD Yes it can be done i didnt focused in my c/p comments :P i didnt focused in my c/p comments :P I should add one ... probably this one if (words.length > 2) shoukd be 4 Config.loadFacebook(); is used in method loadLinksAndToken (where it can be used in reload case) so i found it usefull if the admin wants to reload again the config if the token is changed just to avoid the manually config reload via admin panel. All in one :p by creating new config you can handle the things easier (my opinion) Thanks again
  22. Thanks mate! Thanks :D Thank you mate, Well for field names/sql keywords case doesn't matter.. Only quoted strings like 'Something Else' does case matter Even with OBJ_ID will be fine where do you think i should add action fail packets? and why? Thank you for your hints Thank you elfo, i'm glad you liked it Thank you sir, I'm not hidding the fact that i'm learning :D I'm always trying for the best i can give. Thanks for the rep, Not bad idea ;)
  23. Well i didnt test this thing but i dont think will be a problem from server side.. its just a save in db (the name) . I have to check the way that facebook sending the user name to check if the letters are corectly appearing so the server can compare . Thanks for this question
  24. Hello members, Since this section is rly dead and i always like to share things here is another one.. How is this working? First of all you have to create your personal l2 page in facebook. After that search in facebook settings to change the url-name of your page to www.facebook.com/L2Tests and not www.facebook.com/HAW#$A#@ Create your personal Access Token here It will be generated as short-lived token (means that it will expire in about an hour). change it to long-lived here (means that it will expire after 2 months ,maybe more) Download facebook api restfb-1.46.0 Add it in your sources (i will not provide how to...) Implement the code i'm giving Source / Files Source Code Htmls/Database Config Dont forget to add the new admin commands in adminCommands.xml <aCar name="admin_fbreload" accessLevel="7"/> <aCar name="admin_facebook" accessLevel="7"/> <aCar name="admin_showPosts" accessLevel="7"/> <aCar name="admin_delPost" accessLevel="7"/> <aCar name="admin_addPost" accessLevel="7"/> <aCar name="admin_turnFb" accessLevel="7"/> <aCar name="admin_clean_facebook_database" accessLevel="7"/> <aCar name="admin_fb_auto_announce" accessLevel="7"/> (these commands are used for all actions , you can use these actions direcly by writing the command with the necessary tokens) Videos Admin view User view More explaination? If you successfully passed all the above moves: Set your facebook page name in FacebookPageName in facebook.properties Set your Access Token in FacebookApiToken //facebook command will display the panel you just saw /facebook command for users You can add/remove any of the posts that are inside of your page. You can set an automatic reward: You set the number of likes you want to collect from the sum of all the pages you have set, item id, item count. When the likes will be >= the num you set, then all the online players will get the reward you set. The players have to like All the posts you added to take the reward. I am mostly using usercommand handlers , if you will too, then don't forget to add one more line in your commandname-e.dat and edit the id of the command (in FaceBook.java) to your id if you have voiced you can add it there. ================================================================================== This code is made for aCis 371 rev. Note: I havent check it in live server , i just made it in localhost so you have to give a try in my shitty code and check if any bug will appear. If anyone wants the buttons (the blue ones) you can get the utx from here (Thanks Sinister Smile) If someone finds any bug please let me know, i can help. Thank you!
×
×
  • Create New...