StaticX Posted November 9, 2018 Posted November 9, 2018 (edited) Hello people! Heres the code for automatic starting items equip on character 1rst login. Into java/net/sf/l2j/gameserver/network/clientpackets/CharacterCreate.java Find these lines: if (item.isEquipable()) { if (player.getActiveWeaponItem() == null || !(item.getItem().getType2() != Item.TYPE2_WEAPON)) player.getInventory().equipItemAndRecord(item); } and change them like this: if (item.isEquipable()) { if (item.isWeapon()) { if (player.getActiveWeaponItem() == null || !(item.getItem().getType2() != Item.TYPE2_WEAPON)) player.getInventory().equipItemAndRecord(item); } else player.getInventory().equipItemAndRecord(item); } The starting items are selected by the .xml files for player classes. Hope thats is usefull for someone. Cheers! Credits: @Tryskell Edited November 10, 2018 by StaticX 1 1 Quote
StinkyMadness Posted November 9, 2018 Posted November 9, 2018 if (item.isEquipable()) { if (player.getActiveWeaponItem() == null || !(item.getItem().getType2() != Item.TYPE2_WEAPON)) player.getInventory().equipItemAndRecord(item); } > if (item.isEquipable() && ((player.getActiveWeaponItem() != null || !(item.getItem().getType2() != Item.TYPE2_WEAPON)))) player.getInventory().equipItemAndRecord(item); You have to use the weapon ID as last equip item on your list. Quote
Nightw0lf Posted November 9, 2018 Posted November 9, 2018 (edited) Good try but it would be better if you did it with configs the ID and Count in a list, on/off and since its small code and the rules are not allowing it to be posted in your place i would work with the code a bit more, keep up the good work and thanks for sharing example: auto_equip = true items = item_id,item_count;item_id,item_count;item_id,item_count... Edited November 9, 2018 by Nightw0lf Quote
StaticX Posted November 9, 2018 Author Posted November 9, 2018 My share is more like a "FIX" concerning the missing feature to equip the "stock" wear items except the weapon in aCis code... Im not looking forward to add complex customs to the code xD Tnx for the tip mate. Quote
Kara Posted November 9, 2018 Posted November 9, 2018 2007 Shares -> Rank Systems [5.000 lines] 2012 Shares -> Event Engines [4.000 lines] 2015 Shares -> Phantom Systems [4.000 lines] 2018 Shares -> if (x) else (x) [3 lines] Quote
Tryskell Posted November 10, 2018 Posted November 10, 2018 (edited) I know it's 3 lines and a 1min test for me, but you could AT LEAST provide credits, since you came with a question and left with a solution... Regarding custom addition you can simply pick L2J PcItemTemplate and add it raw. Nothing special to add. Not sure why you made a public topic for such thing. Edited November 10, 2018 by Tryskell Quote
Solomun Posted November 10, 2018 Posted November 10, 2018 Instead of locking/deleting the topic, i have added the credits to @Tryskell. Please next time, before posting, read section's rules. Quote
Nightw0lf Posted November 10, 2018 Posted November 10, 2018 3 hours ago, Solomun said: Instead of locking/deleting the topic, i have added the credits to @Tryskell. Please next time, before posting, read section's rules. lol ti na diavasei to palikari einai pio palio kai apo mena edw tha eprepe na kserei oti vazoume credits kai oti ta mikra code den epitrepontai eklapsa :D Quote
Kara Posted November 10, 2018 Posted November 10, 2018 4 hours ago, Tryskell said: I know it's 3 lines and a 1min test for me, but you could AT LEAST provide credits, since you came with a question and left with a solution... Regarding custom addition you can simply pick L2J PcItemTemplate and add it raw. Nothing special to add. Not sure why you made a public topic for such thing. Give them a break, they are kids who get excited by System.out.println("hello world"); Remember back when you were a kid and you compiled your first code )) Quote
Tryskell Posted November 10, 2018 Posted November 10, 2018 42 minutes ago, Kara` said: Give them a break, they are kids who get excited by System.out.println("hello world"); Remember back when you were a kid and you compiled your first code )) That was on an AMSTRAD CPC 6128, following the tutorial book. First exemple was a game where an avion was throwing bombs on buildings to avoid to crash on them, the second was an Arsene Lupin game where dogs were hunting you (and the first time it scared me). I was 10-12 years old. And the disk reader was broken, so I couldn't save my programs. That was a one-time use program... :P Quote
StaticX Posted November 10, 2018 Author Posted November 10, 2018 Wtf is wrong with you people.. i just shared a fix on official l2jacis files , i didnt even wrote the word "I". Tryskel came up with a fix and i was happy to share it for people that may wanted a fix. DO F..ING NOT hunger for reputation on your lifes guys.. Life is simple and people should help each other w/o caring if they will be recognised. Yeah im really old in here , like @2007 but i never lied about anything regarding any shares or trying to leach anyones work.. So plz gimme a break and even remove my account.. I really dont give a penny. Cheers Quote
Nightw0lf Posted November 10, 2018 Posted November 10, 2018 52 minutes ago, StaticX said: Wtf is wrong with you people.. i just shared a fix on official l2jacis files , i didnt even wrote the word "I". Tryskel came up with a fix and i was happy to share it for people that may wanted a fix. DO F..ING NOT hunger for reputation on your lifes guys.. Life is simple and people should help each other w/o caring if they will be recognised. Yeah im really old in here , like @2007 but i never lied about anything regarding any shares or trying to leach anyones work.. So plz gimme a break and even remove my account.. I really dont give a penny. Cheers relax 2018 is like that dude chill out none is gonna hurt you, everyone just doing his buisness and think is somebody is classic this days it looks you was away alot of time i hope you can catch up with the flow. :) Quote
StaticX Posted November 10, 2018 Author Posted November 10, 2018 (edited) Well that might be my problem... i should just read posts and keep my mouth shut. People hunger for credits and to be recognised " Pr0 coder" "Great shares" " Imba developer". This shit is not for me , i constantly feed poor homeless persons in my neighbourhood but never gave them t-shirts with my logo lol. Anyway , i never had any intentions to steal someones cookie.. With regards, a motherfcker from the chrono-capsule. Edited November 10, 2018 by StaticX Quote
Tryskell Posted November 10, 2018 Posted November 10, 2018 (edited) I try to thank any helper on my changesets (being reports or bug fixes) , it is just common respect. I simply await you to do the same, notably if you found the code useful and you share it. It got nothing to do with being called "pro coder" - since 8 years of L2J coding, I don't need any validation (moreover for a 5min fix). There are exactly 512 "ty" on aCis changesets. Finally, you should better post such thing here : https://maxcheaters.com/forum/165-adapted-customs/ Edited November 10, 2018 by Tryskell Quote
Nightw0lf Posted November 10, 2018 Posted November 10, 2018 (edited) 49 minutes ago, StaticX said: Well that might be my problem... i should just read posts and keep my mouth shut. People hunger for credits and to be recognised " Pr0 coder" "Great shares" " Imba developer". This shit is not for me , i constantly feed poor homeless persons in my neighbourhood but never gave them t-shirts with my logo lol. Anyway , i never had any intentions to steal someones cookie.. With regards, a motherfcker from the chrono-capsule. not your problem just ignore the facts they want their name written in cookie, its done they can cry to a mod and then its fixed you did the share and thats all it matters and dont forget the basic principle its a cheating forum you could steal it too and nobody do shit to you xD PS: i restored your reputation that the mod removed (its no worth today its like giving a like in facebook) Edited November 10, 2018 by Nightw0lf Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.