Jump to content

[SHARE] Disabled Attribute system


Recommended Posts

This is an update to disable the attribute system. When you use the attribute stone, crystal..., there will be a message sent to you "Attribute system is disabled"

 

Index: data/scripts/handlers/itemhandlers/EnchantAttribute.java
===================================================================
--- data/scripts/handlers/itemhandlers/EnchantAttribute.java
+++ data/scripts/handlers/itemhandlers/EnchantAttribute.java

/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
* 
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
* 
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.itemhandlers;

import com.l2jserver.gameserver.handler.IItemHandler;
import com.l2jserver.gameserver.model.L2ItemInstance;
import com.l2jserver.gameserver.model.actor.L2Playable;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;

public class EnchantAttribute implements IItemHandler
{
public void useItem(L2Playable playable, L2ItemInstance item, boolean forceUse)
{
-	         if (!(playable instanceof L2PcInstance))
-			return;

	final L2PcInstance activeChar = (L2PcInstance) playable;

-		if (activeChar.isCastingNow())
-			return;
-		
-		if (activeChar.isEnchanting())
-		{
-			activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.ENCHANTMENT_ALREADY_IN_PROGRESS));
-			return;
-		}

+		activeChar.sendMessage("Attribute system is disabled");
	return;
-		activeChar.setActiveEnchantAttrItem(item);
-		activeChar.sendPacket(new ExChooseInventoryAttributeItem(item));
}
}

[Code]

Goodluck!

[/code]

Link to comment
Share on other sites

Thanks Man about this ...! It might Work for Sure ! Gredits? Did you make this? or you take it from somewhere else?( you have to give proper gredits ;)

 

Thanks for Share

Link to comment
Share on other sites

Hey you,

Sorry my English

You do not need but maybe some other server will need it. There are many ways to disable the attribute system, but I think this will make players feel more professional your server.

 

Thank for read

Link to comment
Share on other sites

  • 4 weeks later...
  • 10 months later...

This is an update to disable the attribute system. When you use the attribute stone, crystal..., there will be a message sent to you "Attribute system is disabled"

 

Index: data/scripts/handlers/itemhandlers/EnchantAttribute.java
===================================================================
--- data/scripts/handlers/itemhandlers/EnchantAttribute.java
+++ data/scripts/handlers/itemhandlers/EnchantAttribute.java

/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
* 
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
* 
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.itemhandlers;

import com.l2jserver.gameserver.handler.IItemHandler;
import com.l2jserver.gameserver.model.L2ItemInstance;
import com.l2jserver.gameserver.model.actor.L2Playable;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;

public class EnchantAttribute implements IItemHandler
{
public void useItem(L2Playable playable, L2ItemInstance item, boolean forceUse)
{
-	         if (!(playable instanceof L2PcInstance))
-			return;

	final L2PcInstance activeChar = (L2PcInstance) playable;

-		if (activeChar.isCastingNow())
-			return;
-		
-		if (activeChar.isEnchanting())
-		{
-			activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.ENCHANTMENT_ALREADY_IN_PROGRESS));
-			return;
-		}

+		activeChar.sendMessage("Attribute system is disabled");
	return;
-		activeChar.setActiveEnchantAttrItem(item);
-		activeChar.sendPacket(new ExChooseInventoryAttributeItem(item));
}
}

[code]

Goodluck!

[/code]

you can make a config you know... but ok that was your choice...

ps: its not only this part... if you want to Disable it full you must delete the hole shit :P nice try :)

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

    • imbadon.com If u deleted me from the content, it is your problem. This 200 euro is not money at all. But you... just scammer. People should know about you. I can share the whole conversation if you want, but it will not change that you are a scammer. 
    • For upcoming changes, You should consider making those 3 tabs (or whatever more You will have with new games) more visible and standing out, because right it looks like all topics hidden under those 3 tabs.
    • While not particularly active over the years, I've been around for as long as I could remember, so here are my 2 cents too. On top of what has already been said, I'd like to touch on a few thing that might be improved upon. While it is easy to notice and say "there's lack of engagement" or "community has outgrown the ganre", I've seen numerous forums get forgotten and die while others continue to thrive to this day. The main issue, in my humble opinion, is that the sector has been commercialised to an unsustainable extent. When nobody is willing to share anything, even if it is just a rework of an open-sourced or already-shared resource, the sense of "community" gets deminished. Now back on the pressing matter. From what I've seen, the lack of engagement could be circumvented with a redesign and functionality expansion that would/could/should include: - a built-in chat functionality. - incentives for engagement/interaction, ideas of which I'll list as separate pointers, as not to limit your creativity. But just as an example, from a more user/human perspective, having an easily identifiable way to get into "the club of the cool kids on the block", figuratively speaking, is an incentive on its own. - separation of the reputation into reactions and reputation. One to be used to posts, such as up-vote and what not, while the other to be awarded as means of appreciation. - automated ranks with actual benefits/perks, not like the current ones providing nothing. - the ability to hide text for user/group of users, not just premium/no premium. - increased visibility of the HOT topics and the RECENTLY ACTIVE threads/posts. Can be also expanded to most liked posts, etc. ps.: I'll update my post when I have some free time on my hands.
    • There was no way I didn't refunded or delivered files. I don't see You on my conrtact list on Discord, can You send me a message or at least tell me for what project was this updater? I always resolve if I can't deliver on time or customer bailes.
  • Topics

×
×
  • Create New...