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

    • i'll give it a shot in a few hours and post it here
    • 🛡 GoldRush — High Five x20   A fresh High Five server focused on active progression, fair competition, and a healthy player-driven economy.   GoldRush is built for players who want a fresh spin on our beloved game that is connected to today's world via Web3 marketplace.   🌍 Server Info   Chronicle: High Five Type: Mid Rate / PvP Craft Community: International Location: Europe Time Zone: GMT+3   ⚙️ Rates   EXP: x20 SP: x20 Adena: x10 Drop: x8 Spoil: x12 Raid Boss: x3 Quest Items: x5 Quest EXP / SP: x10 Quest Adena: x5   👑 Class Progression   1st Class: Free 2nd Class: Free 3rd Class: 5,000,000 Adena   1st and 2nd class transfers reward Shadow Weapons.   ✨ Main Features   No P2W as there is no donation currency in the game Web3 Marketplace Events with real rewards Rotating accessories shop Weekly Olympiad Clean and active mid-rate progression   🧩 Community Board Features   Buffer GM Shop Gatekeeper Drop Search Rankings   🔨 Enchant Info   Max Weapon Enchant: +16 Max Armor Enchant: +12 Olympiad Max Enchant: +6   Safe Enchant: Weapons / Armor: safe to +3 Full Body Armor: safe to +4   Enchant Chance: +4 to +6: 66% +7 to +9: 60% +10 to +12: 54% +13 to +14: 48% +15 to +16: 42%   🏪 GM Shop / Gear Progression   C-grade through Dynasty gear is available through the GM Shop.   Moirai+ progression is farm, craft and raid based.   There is no admin-created endgame gear selling.   🥇 Gold Rush Economy   GoldRush includes a server-wide Adena sink system.   Players contribute Adena to the Gold Rush Collector. When the server goal is reached, limited Gold Bar stock unlocks through the Gold Merchant.   Daily Gold Rush missions also allow active players to earn Gold Bars through gameplay.   🌐 Website Player-to-Player Marketplace   GoldRush includes a website-based Web3 marketplace where players can list and trade items with each other.   Items come from real players.   The marketplace is player-to-player only.   🏛 Olympiad   Weekly Olympiad cycle. Olympiad starts at 18:00 GMT+3. Olympiad max enchant: +6.   🏰 Sieges   Castle sieges take place on Sundays at 16:00 and 20:00 GMT+3.   The first siege will happen 2 weeks after launch.   🐉 Grand Boss Respawn   Queen Ant: 24h + 2h random Core: 30h + 2h random Orfen: 48h + 2h random Baium: 120h + 3h random Antharas: 120h + 24h random Valakas: 120h + 24h random Beleth: 120h + 24h random   🎉 Events   Manual GM events with real token or gold bar rewards.   ⚔️ Fair Play   Bots are strictly forbidden and will result in a ban without warning.   Dualbox is limited to 1 box.   GoldRush is built around a healthy player-to-player economy.   🚀 What to Expect   Active farming Meaningful PvP Meaningul Farming Player-driven economy No donation currency     🔗 Join Us   Website: www.goldrushpvp.xyz Discord: https://discord.gg/kg9WXxcAY   🏁 Expected Launch: July 18 2026     If you are looking for a fresh High Five x20 server with clean structure and strong long-term potential, GoldRush is almost ready.   See you in game.
    • Collisions is from client are no way to bypass from server. Can be done from client modification need to be moded a .dll I can do the work you can contact me by DM  P.D: I already have this job done on the past
  • 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..