Jump to content

Recommended Posts

Posted (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 by StaticX
  • Thanks 1
  • Upvote 1
Posted
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.

Posted (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 by Nightw0lf
Posted

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.

Posted

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]

 

 

Posted (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.

 

scu9hy.png

 

Edited by Tryskell
Posted
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

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

Posted
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

Posted

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

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

Posted (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 by StaticX
Posted (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 by Tryskell
Posted (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 by Nightw0lf

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.

×
×
  • Create New...