Jump to content

Custom starting items equip l2jaCis


StaticX

Recommended Posts

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 by StaticX
  • Thanks 1
  • Upvote 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Nightw0lf
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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]

 

 

Link to comment
Share on other sites

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.

 

scu9hy.png

 

Edited by Tryskell
Link to comment
Share on other sites

Instead of locking/deleting the topic, i have added the credits to @Tryskell.

 

Please next time, before posting, read section's rules.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 ))

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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 by StaticX
Link to comment
Share on other sites

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 by Tryskell
Link to comment
Share on other sites

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 by Nightw0lf
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • rename the l2.bin into l2.exe
    • L2LIVE.PRO- Dynamic Mid-rates Essence Seven Signs GRAND OPENING - July 5, 20:00 GMT+3 (EEST) TEST SERVER IS OPEN - COME AND CHECK IT OUT TODAY! Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu   Server description * EXP/SP: Dynamic (x1- x100 based on your level, *before* Sayha and EXP buffs * Adena: x50 / Item Drop: x10 / Fishing EXP increased / Attribute EXP increased * Simplified gameplay to stay in the loop while not spending hours and hours farming * Starter Pack containing very useful items for beginners * MP replenishing potions with auto-consumption * No overpowered donations L2LIVE shop * All spellbook coupons, pet spellbook coupons and master books are sold via Game Assistant * Additionally you can buy SP pouches, enchanted talismans, pet training guides and various other consumables for Adena and L-Coin * More items such as cloaks, more talismans, agathions, belts, pendants, enchantment scrolls of various grades, evolution stones, etc will be added! Shop server as a shortcut, and all retail-like ways of earning items are still here! L-Coins * Drops with small change and in random amounts from Lv60+ monsters  * All raidbosses drop random amount of L-Coin Pouches generating up to 420 Lcoin per unit. **Grand Olympiad and Events** * Grand Olympiad is held week day * Format is 1v1, unlimited weekly fights  * Heroes are declared weekly at Sunday * There are three automated events - TvT, CTF and Deathmatch, running at evenings * Orc Fortress, Battle with Balok, Keber Hunter, Archievements Box, Daily Gift Calendar provisional events are active too Custom user commands * .offlineplay command, your character will keep playing till death or server restart * .offlineshop command, keeps your shop sitting until all items are purchased * .apon / .apoff - enable/disable HP/MP autoconsume And lots of other small improvements are waiting for you!   Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu
  • Topics

×
×
  • Create New...