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

I made this patch manually, thanks for reporting..

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

    • Thnx for share, i can't pm u for password  
    • I'm looking for the best current files that are up to date for the year 2025, not files that are stuck in 2020.
    • EXOPLANET 2.0     GRAND OPENING 09.05.2025 We are thrilled to announce the upcoming launch of a brand new server. This isn’t just a copy of the previous server – it’s the next step in the development of Exoplanet. Based on our past experience, we’re bringing you a server that is faster, more stable, and more fun than ever before.     GRAND OPENING:  09.05.2025 at 20:00 GMT+1 BETA TEST:   04.05.2025    Client: High Five Rates: x10   Website: https://l2exoplanet.net Facebook: https://www.facebook.com/L2-Exoplanet-106811564103836 Discord: https://discord.gg/4fzhW7ZSPc         Game Rates    Experience: x10  Skill Points: x10  Adena: x8  Drop: x8  Spoil: x8  Quest: x5  Raid Boss Drop: x5  Fame: x2  Epaulette: x8  Manor: x8      Safe Enchant: +3  Maximum Enchant: +16  Normal Scroll Chance: 60%  Blessed Scroll Chance: 63%  Attribute Stone Chance: 50%  Attribute Crystal Chance: 30%      Game Settings    Multibox - 3 game clients per HWID  Autoloot  Autolearn Skills Auto Farm  NPC Buffer   Buff Slots (24+4/12)  Buff Duration (2h)  Olympiad Period 7days (new heroes appear every monday)  Seven Signs Period  Class Transfer for Adena  Max Sub-Class 3  Sub-Class Max Level 85  Essence Interface  Champions System  Vote Reward System  Dayli Reward System  PC Points Reward (500PC = 1 Donate Coin)      Epic Bosses Respawn Times     Queen Ant:  24 Hours +/- 4 Hours   Beleth: 3 Days +/- 8 Hours   Baium: 3 Days +/- 8 Hours   Antharas: 4 Days +/- 8 Hours   Valakas:  5 Days +/- 8 Hours     Instance Info     Normal Freya = 6 Players   Hard Freya = 12 Players   Frintezza = 6 Players   Zaken 83 Day = 6 Players   Zaken 60 Day = 6 Players   Zaken Nightly = 9 Players   Tiat = 6 Players   Beleth = 12 Players
    • EXOPLANET 2.0     GRAND OPENING 09.05.2025 We are thrilled to announce the upcoming launch of a brand new server. This isn’t just a copy of the previous server – it’s the next step in the development of Exoplanet. Based on our past experience, we’re bringing you a server that is faster, more stable, and more fun than ever before.     GRAND OPENING:  09.05.2025 at 20:00 GMT+1 BETA TEST:   04.05.2025    Client: High Five Rates: x10   Website: https://l2exoplanet.net Facebook: https://www.facebook.com/L2-Exoplanet-106811564103836 Discord: https://discord.gg/4fzhW7ZSPc         Game Rates    Experience: x10  Skill Points: x10  Adena: x8  Drop: x8  Spoil: x8  Quest: x5  Raid Boss Drop: x5  Fame: x2  Epaulette: x8  Manor: x8      Safe Enchant: +3  Maximum Enchant: +16  Normal Scroll Chance: 60%  Blessed Scroll Chance: 63%  Attribute Stone Chance: 50%  Attribute Crystal Chance: 30%      Game Settings    Multibox - 3 game clients per HWID  Autoloot  Autolearn Skills Auto Farm  NPC Buffer   Buff Slots (24+4/12)  Buff Duration (2h)  Olympiad Period 7days (new heroes appear every monday)  Seven Signs Period  Class Transfer for Adena  Max Sub-Class 3  Sub-Class Max Level 85  Essence Interface  Champions System  Vote Reward System  Dayli Reward System  PC Points Reward (500PC = 1 Donate Coin)      Epic Bosses Respawn Times     Queen Ant:  24 Hours +/- 4 Hours   Beleth: 3 Days +/- 8 Hours   Baium: 3 Days +/- 8 Hours   Antharas: 4 Days +/- 8 Hours   Valakas:  5 Days +/- 8 Hours     Instance Info     Normal Freya = 6 Players   Hard Freya = 12 Players   Frintezza = 6 Players   Zaken 83 Day = 6 Players   Zaken 60 Day = 6 Players   Zaken Nightly = 9 Players   Tiat = 6 Players   Beleth = 12 Players      
  • Topics

×
×
  • Create New...