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

    • L2ETINA INTERLUDE X30 — CLIENT UPDATE We’ve prepared a major client update with improved performance, a reworked interface, and new features for a more comfortable gameplay experience. Optimization and Higher FPS Significantly optimized the client and removed unnecessary elements, improving performance and increasing FPS. Detailed Command Channel Statistics — CC The updated window helps leaders monitor their roster and evaluate each party’s and player’s contribution in PvP and boss fights. It now includes: • Total number of parties and members. • Number of players alive, dead, and nearby. • Kills, deaths, and PvP and PvE damage dealt by each party. • A separate window with detailed statistics for every member of the selected party. Convenient Auto-Set and Auto-LS Panels Added new quick-access panels that you can show or hide whenever needed. Updated ACP and Auto-Shot Settings Completely redesigned the settings window, making automatic potion and shot use easier to configure. Expanded the selection of available potions. Repeat Augmentation and Tooltips Added a convenient option to repeat augmentation, with a hover tooltip showing the Life Stone effect you rolled. Repeat Enchanting Added a repeat enchanting feature to make the process more convenient and reduce unnecessary clicks. Advanced Client Settings Added a window with a wide range of options, including performance settings and the ability to move buff icons to the debuff panel and vice versa. Stickers and Sticker Shop Introduced a new sticker system and a dedicated shop. This feature is currently in beta and needs testing during OBT. Improved Party Bar Updated the party interface with highlighting, members’ Premium status, and a green indicator for characters with a pending resurrection. You can explore these and other improvements in-game. New Mounts Expanded the selection of available mounts. New Costumes Added new looks for your character. New Agathions Expanded the collection of companions. Additional Client Languages Added support for Russian, Brazilian Portuguese, and Spanish. Interface Fixes Fixed numerous issues with window layouts and functionality, making the interface cleaner, clearer, and easier to use. Try the new features during OBT and share your feedback! If you find a bug, send us a description and a screenshot to help us fix it faster.
    • Latest Coupons   20% off GEO Canada, Edmonton UZy-keN-sAM-NeS 30% off GEO Romania, Bucharest FYj-8eK-PuJ-5ah 30% off GEO Ukraine, Odessa ZYb-4us-7Am-pAx   Get 20% off any first purchase with coupon fur-1AB-zyE-4ur
  • 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..