Jump to content

Recommended Posts

Posted

Shot00008-1.jpg

 

Index: net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.java

===================================================================

@@Fame system

 

private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,str=?,con=?,dex=?,_int=?,men=?,wit=?,face=?,hairStyle=?,hairColor=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,killingSpree=?,rec_have=?,rec_left=?,clanid=?,maxload=?,race=?,classid=?,deletetime=?,title=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,last_recom_date=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,chat_filter_count=?,specialTitle=? WHERE obj_id=?";

private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, killingSpree, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,chat_filter_count,hero,premium,platinum,schemebuffs,specialTitle FROM characters WHERE obj_id=?";

@@

setPvpKills(getPvpKills() + 1);

+  setFame(getFame() + 1);

 

@@

private boolean createDb()

{

java.sql.Connection con = null;

try

{

con = L2DatabaseFactory.getInstance().getConnection();

PreparedStatement statement;

statement = con.prepareStatement("INSERT INTO characters "

+ "(account_name,obj_Id,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,"

+ "acc,crit,evasion,mAtk,mDef,mSpd,pAtk,pDef,pSpd,runSpd,walkSpd,"

+ "str,con,dex,_int,men,wit,face,hairStyle,hairColor,sex,"

+ "movement_multiplier,attack_speed_multiplier,colRad,colHeight,"

+ "exp,sp,karma,fame,pvpkills,pkkills,killingSpree,clanid,maxload,race,classid,deletetime,"

+ "cancraft,title,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,"

+ "base_class,newbie,nobless,power_grade,last_recom_date,specialTitle) "

+ "values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");

@@

statement.setLong(36, getExp());

statement.setInt(37, getSp());

statement.setInt(38, getKarma());

+ statement.setInt(39, 0);

statement.setInt(40, getPvpKills());

statement.setInt(41, getPkKills());

 

@@

player.setHeading(rset.getInt("heading"));

player.setKarma(rset.getInt("karma"));

+ player.setFame(rset.getInt("fame"));

 

@@

statement.setInt(24, getKarma());

+ statement.setInt(25, getFame());

statement.setInt(26, getPvpKills());

statement.setInt(27, getPkKills());

@@

public void sendMessage(String message)

{

sendPacket(SystemMessage.sendString(message));

}

+ /**

+ *CUSTOM

+ */

+ public int _fame = 0;

+ public void setFame(int fame)

+ {

+ if (fame > Config.MAX_PERSONAL_FAME_POINTS)

+ _fame = Config.MAX_PERSONAL_FAME_POINTS;

+ else

+ _fame = fame;

+ }

+ public int getFame()

+ {

+ return _fame;

+ }

and for table http://i461.photobucket.com/albums/qq331/xaddytzu/asd123.png




 

 

SQL:

INSERT INTO `npc` VALUES ('90011', '31744', 'Ogmar', '1', 'iPlay', '1', 'NPC.a_traderB_MHuman', '8.00', '26.00', '70', 'male', 'L2FameManager', '55', '6666', '6666', '11.00', '11.00', '55', '55', '55', '55', '55', '55', '0', '0', '1314', '1342', '1421', '4123', '1', '0', '0', '0', '0', '0', '0', '0', null, '0', '0', '0', 'LAST_HIT');

 

Index: net.sf.l2j.gameserver.model.actor.instance.L2FameManagerInstance.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 net.sf.l2j.gameserver.model.actor.instance;
+
+import javolution.text.TextBuilder;
+import net.sf.l2j.Config;
+import net.sf.l2j.gameserver.ai.CtrlIntention;
+import net.sf.l2j.gameserver.serverpackets.ActionFailed;
+import net.sf.l2j.gameserver.serverpackets.MyTargetSelected;
+import net.sf.l2j.gameserver.serverpackets.NpcHtmlMessage;
+import net.sf.l2j.gameserver.serverpackets.ValidateLocation;
+import net.sf.l2j.gameserver.templates.L2NpcTemplate;
+
+/**
+ * @author xAddytzu
+ */
+public class L2FameManagerInstance extends L2NpcInstance
+{
+	public L2FameManagerInstance(int objectId, L2NpcTemplate template)
+	{
+		super(objectId, template);
+	}
+	
+	@Override
+	public void onAction(L2PcInstance player)
+	{
+		if (!canTarget(player))
+			return;
+		
+		if (this != player.getTarget())
+		{
+			player.setTarget(this);
+			MyTargetSelected my = new MyTargetSelected(getObjectId(), 0);
+			player.sendPacket(my);
+			player.sendPacket(new ValidateLocation(this));
+		}
+		else
+		{
+			if (!canInteract(player))
+				player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);
+			else
+				showChatWindow(player);
+		}
+		player.sendPacket(new ActionFailed());
+	}
+	@Override
+	public void showChatWindow(L2PcInstance player, int val) 
+	{
+		NpcHtmlMessage msg = new NpcHtmlMessage(this.getObjectId());
+		msg.setHtml(rbWindow(player));
+		msg.replace("%objectId%", String.valueOf(this.getObjectId()));
+		player.sendPacket(msg);
+	}
+	private String rbWindow(L2PcInstance player) 
+	{
+		TextBuilder tb = new TextBuilder();
+		tb.append("<html><title>L2 Fame Manager</title><body>");
+		tb.append("<center>");
+		tb.append("<br>");
+		tb.append("<font color=\"999999\">Fame Manager</font><br>");
+		tb.append("<img src=\"L2UI.SquareGray\" width=\"200\" height=\"1\"><br>");
+		tb.append("Welcome "+player.getName()+"<br>");
+		tb.append("<table width=\"85%\"><tr><td>Many of you, asked how to obtain fame points</td></tr></table><br1");
+		tb.append("<table width=\"85%\"><tr><td><font color=\"00FF00\">You must do consecutive pvp kills to be in a killing spree</font></td></tr></table><b1>");
+		tb.append("<table width=\"85%\"><tr><td><font color=\"00FF00\">You can fight in the arena but you earn less points</font></td></tr></table><b1>");
+		tb.append("<img src=\"L2UI.SquareGray\" width=\"280\" height=\"1\"></center><br>");
+
+		tb.append("<a action=\"bypass -h npc_%objectId%_Color_red\">Color Name(Red) ("+Config.FAMECOLORS+ "Fame)</a><br1>");
+		tb.append("<a action=\"bypass -h npc_%objectId%_Color_purple\">Color Name(Purple) ("+Config.FAMECOLORS+ "Fame)</a><br1>");
+		tb.append("<a action=\"bypass -h npc_%objectId%_Color_pink\">Color Name(Pink) ("+Config.FAMECOLORS+ "Fame)</a><br1>");
+		tb.append("<a action=\"bypass -h npc_%objectId%_Color_blue\">Color Name(Blue) ("+Config.FAMECOLORS+ "Fame)</a><br1>");
+		
+		tb.append("<a action=\"bypass -h npc_%objectId%_PK_Count\">Decrease PK count by 1 ("+Config.FAMEPKS+ "Fame)</a><br1>");
+		tb.append("<img src=\"L2UI.SquareGray\" width=\"200\" height=\"1\">");
+
+		tb.append("<center><img src=\"L2UI.SquareGray\" width=\"280\" height=\"1\"></center>");
+		tb.append("</body></html>");
+		return tb.toString();
+	}
+}
@@
Index: net.sf.l2j.gameserver.model.scripts.L2FameManager
===================================================================
+/*
+ * 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 net.sf.l2j.gameserver.model.scripts;
+
+import net.sf.l2j.Config;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.serverpackets.UserInfo;
+
+/**
+ * @author xAddytzu
+ *
+ */
+public class L2FameManager
+{
+	public static void PK_Count(L2PcInstance player)
+	{
+		if (player.getFame() >= Config.FAMEPKS && player.getClassId().level() >= 2)
+		{
+			if (player.getPkKills() > 0)
+			{
+				player.setFame(player.getFame() - Config.FAMEPKS);
+				player.setPkKills(player.getPkKills() - 1);
+				player.sendPacket(new UserInfo(player));
+				player.sendMessage("Your PK count was reduced");
+			}
+			else player.sendMessage("You dont have enough PK");
+		}
+		else player.sendMessage("You have not yet met the qualifications");
+	}
+	public static void Red_color(L2PcInstance player)
+	{
+		if (player.getFame() >= Config.FAMECOLORS)
+		{
+			player.setFame(player.getFame() - Config.FAMECOLORS);
+			player.getAppearance().setNameColor(0x0000FF);
+			player.broadcastUserInfo();
+		}
+		else player.sendMessage("You have not yet met the qualifications");
+	}
+	public static void Purple_color(L2PcInstance player)
+	{
+		if (player.getFame() >= Config.FAMECOLORS)
+		{
+			player.setFame(player.getFame() - Config.FAMECOLORS);
+			player.getAppearance().setNameColor(0xFF0080);
+			player.broadcastUserInfo();
+		}
+		else player.sendMessage("You have not yet met the qualifications");
+	}
+	public static void Pink_color(L2PcInstance player)
+	{
+		if (player.getFame() >= Config.FAMECOLORS)
+		{
+			player.setFame(player.getFame() - Config.FAMECOLORS);
+			player.getAppearance().setNameColor(0xFF99FF);
+			player.broadcastUserInfo();
+		}
+		else player.sendMessage("You have not yet met the qualifications");
+	}
+	public static void Blue_color(L2PcInstance player)
+	{
+		if (player.getFame() >= Config.FAMECOLORS)
+		{
+			player.setFame(player.getFame() - Config.FAMECOLORS);
+			player.getAppearance().setNameColor(0xFF8040);
+			player.broadcastUserInfo();
+		}
+		else player.sendMessage("You have not yet met the qualifications");
+	}
+}
@@
Index: net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance.java
===================================================================

else if (command.startsWith("ExitRift"))
{
	if(player.isInParty() && player.getParty().isInDimensionalRift())
	{
		player.getParty().getDimensionalRift().manualExitRift(player, this);
	}
	else
	{
		DimensionalRiftManager.getInstance().handleCheat(player, this);
	}
}
+	//Custom
+	else if (command.startsWith("PK_Count"))
+	{
+		L2FameManager.PK_Count(player);
+	}
+	else if (command.startsWith("Color_"))
+	{
+		int endOfId = command.indexOf('_', 5);
+		String id;
+		if (endOfId > 0)
+			id = command.substring(4, endOfId);
+		else
+			id = command.substring(4);
+		try
+		{
+			if (command.substring(endOfId+1).startsWith("red"))
+				L2FameManager.Red_color(player);
+			else if (command.substring(endOfId+1).startsWith("purple"))
+				L2FameManager.Purple_color(player);
+			else if (command.substring(endOfId+1).startsWith("pink"))
+				L2FameManager.Pink_color(player);
+			else if (command.substring(endOfId+1).startsWith("blue"))
+				L2FameManager.Blue_color(player);
+		}
+		catch (NumberFormatException nfe) {}
+	}
@@
Index: net.sf.l2j.Config.java
===================================================================
+    public static int FAMECOLORS;
+    public static int FAMEPKS;
+				FAMECOLORS = Integer.parseInt(otherSettings.getProperty("FameForColors", "1"));
+				FAMEPKS = Integer.parseInt(otherSettings.getProperty("FameForPks", "1"));

Posted

gr: φήμη

alb: famë

rus : слава

jap : 名声

 

Next time you spam, you earn -1.

 

What is the fame ? :O

 

It's a kind of characteristic, awarded by spending time on sieges or so.

Posted

Next time you spam, you earn -1.

 

It's a kind of characteristic, awarded by spending time on sieges or so.

 

I think that you confused him even more :X

On topic : Looks good, i will try it when i have time.

Posted

I think that you confused him even more :X

On topic : Looks good, i will try it when i have time.

 

Well, can't find a better way to explain it..

He can just test it by hiself, by playing..

Posted

WTF same path?

 

Index: net.sf.l2j.gameserver.model.actor.instance.L2FameManagerInstance.java

Index: net.sf.l2j.gameserver.model.actor.instance.L2FameManagerInstance.java

Posted

WTF same path?

 

Index: net.sf.l2j.gameserver.model.actor.instance.L2FameManagerInstance.java

Index: net.sf.l2j.gameserver.model.actor.instance.L2FameManagerInstance.java

I made this patch manually, thanks for reporting..

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • Posts

    • Let's be clear about what's happening here. You came to this thread as a provocateur, having already created a coordinated thread on MMO-Dev and invited people who have never been our clients and never will be — because their entire approach to this industry is based on free downloads and reverse engineering other people's work. Not a single person who wrote negatively about us on MMO-Dev has ever been our customer. Not one. Meanwhile, real clients wrote there too — but you conveniently ignore those. Your goal was never objectivity. It was a deliberate smear campaign, and the pattern is transparent to anyone reading this thread. As for MMO-Dev — platforms built on facilitating hatred and settling personal scores don't tend to last. We've seen it before with Zonegame. Communities that exist to tear others down eventually turn on themselves. In the meantime, our clients are running successful projects — the kind that generate real revenue, real growth, real results. That's where our focus is and will remain. While you wait for the 58th reopening of your server, we'll be here doing what we've been doing for 20 years — working.     Haha, well, the math is flattering — thank you for doing it for us! 😄 On the AI point — you might actually be right, and we're not afraid of that. We've been adapting for 20 years already. When new tools arrive, experienced developers use them better than anyone else. AI helps us work faster, not replace us — at least for now. And when the day comes that AI can fully build, maintain, and support a complex private L2 server end-to-end — we'll be the first to embrace it. Until then, our developers are doing just fine. 😉
    • The core strength of Novproxy Perfectly unlock overseas AI large models: 100% pure residential IP, perfectly bypassing various strict risk controls such as ChatGPT, Claude, Midjourney, etc. This is an essential tool for parents to train AI on weekends and during work! Available in 195+ countries/regions worldwide: covering an extremely wide range. Whether it's setting up accounts for cross-border e-commerce, conducting overseas web crawling, or conducting network gray-scale tests, it can all be handled easily. Ultra-fast concurrency: Real residential network, stable and non-blocking, high-concurrency business can also run at full capacity.
    • You charge 10,000 - 15,000 USD for Java files and your site shows 370 projects and 786 customers. you're not just a millionaire, you're a multimillionaire bro 😂 and enjoy it while it lasts. Ai is coming in hot and your 18 developers better start updating their CVs. soon everyone will build whatever they need for free. The 15k Java files era is over 😄  
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..