- 0
[Help] pvppoints system
-
Posts
-
新产品!快来抢购独家新品,以最优价格购买! ➡带文件验证的 Facebook Business Manager (BM) | 绑定到已激活的 Business Manager 账户 | 限额 $50(第一天)+ $250(后续天数)| 价格从 $25 起 ➡在 Fragment.com 上验证的 Telegram 资料 | 账户通过真实文件验证 | 包含 Telegram 账户格式:TDATA + SESSION + JSON + 2FA + 密码 | 地区:MIX | 价格从 $30 起 ➡Telegram 哈萨克斯坦 +7 | 格式:TDATA + SESSION + JSON | 无垃圾邮件限制 | 2FA 启用 | 账户年龄:从 3 天起 | 价格从 $2.5 起 ➡Adobe Creative Cloud 订阅 7 天 / 30 天 / 3 个月 / 1 年(任选时长)| 所有应用和所有语言可用 | AI 功能 1000+ 积分 | 个人账户 | 价格从 $5 起 可通过网站或 Bot 在我们的商店购买! 有效链接: 数字商品商店(网站):进入 商店 Telegram Bot:进入 – 通过 Telegram 方便访问商店。 其他服务: Telegram Stars 购买 Bot:进入 – 快速且划算地购买 Telegram Stars。 SMM 面板:进入 – 推广您的社交媒体账户。 我们为您呈现当前购买我们产品和服务的促销和特别优惠列表: 1. 九月在我们的商店(网站、Bot)购买可使用优惠码 OCTOBER2025(8% 折扣)!首次购买也可使用优惠码:SOCNET(15% 折扣) 2. 获取 $1 商店余额或 10–20% 折扣 — 注册后按照格式发布用户名:“SEND ME BONUS, MY USERNAME IS…” — 发布在我们的论坛帖中! 3. 第一次 SMM 面板试用可获得 $1 — 只需在我们网站(Support)打开主题为 “Get Trial Bonus” 的工单。 4. 每周在我们的 Telegram 频道和 Stars 购买 Bot 中赠送 Telegram Stars! 新闻: ➡ Telegram 频道:https://t.me/accsforyou_shop ➡ WhatsApp 频道:https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器:https://discord.gg/y9AStFFsrh 联系方式与支持: ➡ Telegram:https://t.me/socnet_support ➡ WhatsApp:https://wa.me/79051904467 ➡ Discord:socnet_support ➡ ✉ 邮箱:solomonbog@socnet.store
-
新产品!快来抢购独家新品,以最优价格购买! ➡带文件验证的 Facebook Business Manager (BM) | 绑定到已激活的 Business Manager 账户 | 限额 $50(第一天)+ $250(后续天数)| 价格从 $25 起 ➡在 Fragment.com 上验证的 Telegram 资料 | 账户通过真实文件验证 | 包含 Telegram 账户格式:TDATA + SESSION + JSON + 2FA + 密码 | 地区:MIX | 价格从 $30 起 ➡Telegram 哈萨克斯坦 +7 | 格式:TDATA + SESSION + JSON | 无垃圾邮件限制 | 2FA 启用 | 账户年龄:从 3 天起 | 价格从 $2.5 起 ➡Adobe Creative Cloud 订阅 7 天 / 30 天 / 3 个月 / 1 年(任选时长)| 所有应用和所有语言可用 | AI 功能 1000+ 积分 | 个人账户 | 价格从 $5 起 可通过网站或 Bot 在我们的商店购买! 有效链接: 数字商品商店(网站):进入 商店 Telegram Bot:进入 – 通过 Telegram 方便访问商店。 其他服务: Telegram Stars 购买 Bot:进入 – 快速且划算地购买 Telegram Stars。 SMM 面板:进入 – 推广您的社交媒体账户。 我们为您呈现当前购买我们产品和服务的促销和特别优惠列表: 1. 九月在我们的商店(网站、Bot)购买可使用优惠码 OCTOBER2025(8% 折扣)!首次购买也可使用优惠码:SOCNET(15% 折扣) 2. 获取 $1 商店余额或 10–20% 折扣 — 注册后按照格式发布用户名:“SEND ME BONUS, MY USERNAME IS…” — 发布在我们的论坛帖中! 3. 第一次 SMM 面板试用可获得 $1 — 只需在我们网站(Support)打开主题为 “Get Trial Bonus” 的工单。 4. 每周在我们的 Telegram 频道和 Stars 购买 Bot 中赠送 Telegram Stars! 新闻: ➡ Telegram 频道:https://t.me/accsforyou_shop ➡ WhatsApp 频道:https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器:https://discord.gg/y9AStFFsrh 联系方式与支持: ➡ Telegram:https://t.me/socnet_support ➡ WhatsApp:https://wa.me/79051904467 ➡ Discord:socnet_support ➡ ✉ 邮箱:solomonbog@socnet.store
-
New Products! Hurry up and buy exclusive new arrivals at the best prices. ➡ Verified Facebook Business Manager (BM) with documents | Linked to an account with an active Business Manager | Limit $50 (first day) + $250 (next days) | Price from: $25 ➡ Verified Telegram profile on Fragment.com | Account verified with real documents | Includes Telegram account in TDATA + SESSION + JSON + 2FA + password format | GEO: MIX | Price from: $30 ➡ Telegram Kazakhstan +7 | Format: TDATA + SESSION + JSON | No spam-block | 2FA enabled | Age: from 3 days | Price from: $2.5 ➡ Adobe Creative Cloud subscription for 7 days / 30 days / 3 months / 1 year (duration of your choice) | All apps and all languages available | 1000+ credits for AI features | Personal account | Price from: $5 Buy in our store via website or bot! Active Links: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. Other Services: Telegram Bot for purchasing Telegram Stars: Go – fast and profitable purchase of Telegram Stars. SMM Panel: Go – promote your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing our products and services: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) in September! You can also use the first-purchase promo code: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply write your username after registration on our website using the following format: “SEND ME BONUS, MY USERNAME IS…” — post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
-
New Products! Hurry up and buy exclusive new arrivals at the best prices. ➡ Verified Facebook Business Manager (BM) with documents | Linked to an account with an active Business Manager | Limit $50 (first day) + $250 (next days) | Price from: $25 ➡ Verified Telegram profile on Fragment.com | Account verified with real documents | Includes Telegram account in TDATA + SESSION + JSON + 2FA + password format | GEO: MIX | Price from: $30 ➡ Telegram Kazakhstan +7 | Format: TDATA + SESSION + JSON | No spam-block | 2FA enabled | Age: from 3 days | Price from: $2.5 ➡ Adobe Creative Cloud subscription for 7 days / 30 days / 3 months / 1 year (duration of your choice) | All apps and all languages available | 1000+ credits for AI features | Personal account | Price from: $5 Buy in our store via website or bot! Active Links: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. Other Services: Telegram Bot for purchasing Telegram Stars: Go – fast and profitable purchase of Telegram Stars. SMM Panel: Go – promote your social media accounts. We would like to present to you the current list of promotions and special offers for purchasing our products and services: 1. Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, Bot) in September! You can also use the first-purchase promo code: SOCNET (15% discount) 2. Get $1 credited to your store balance or a 10–20% discount — simply write your username after registration on our website using the following format: “SEND ME BONUS, MY USERNAME IS…” — post it in our forum thread! 3. Get $1 for your first SMM Panel trial — just open a ticket titled “Get Trial Bonus” on our website (Support). 4. Weekly Telegram Stars giveaways in our Telegram channel and in our Stars purchasing bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts & Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
-
By Constellation · Posted
State-of-the-art сryptocurrency mixer 💰 Our service does not "mix transactions," but immediately issues CLEAN cryptocurrency with low AML. The principle is simple: you give us your coins, we return our clean coins to you, without any traces or unnecessary procedures. ✔ Complete confidentiality. No "pseudo-mixers" — at the exit, a transaction without traces. ✔ Flexible commission. From 2% to 6%, depending on the destination and amount. ✔ Popular currencies: LTC, BTC, ETH, USDT, BNB, XRP, XMR, TRX. Others available upon request. ✔ Ready accounts ✔ Business accounts ✅ Account Qonto Business 🗂️ 2 in stock ✅ Account Finom Business 🗂️ 1 in stock ✅ Account PayPal Business 🗂️ 1 in stock ✅ Account Wallester Business 🗂️ 1 in stock ✅ Account Stripe Business 🗂️ 1 in stock ✅ Account Wittix Business 🗂️ 2 in stock ✅ Account Ebay com Seller US|EU, new 🗂️ 2 in stock ✅ Account Blackcatcard Business 🗂️ 2 in stock ✅ Account Mistertango Business 🗂️ 1 in stock ✅ Account Payset Business 🗂️ 1 in stock ✅ Account Wise Business 🗂️ 1 in stock ✅ Account Revolut Business 🗂️ 2 in stock Payments-system / Crypto-Exchange ✅ Account AlchemyPay 🗂️ 1 in stock ✅ Account Astropay 🗂️ 1 in stock ✅ Account 4x4 io 🗂️ 1 in stock ✅ Account Bunq 🗂️ 2 in stock ✅ Account Bilderlings 🗂️ 1 in stock ✅ Account BitPay 🗂️ 1 in stock ✅ Account Bitinvestor / swapped 🗂️ 1 in stock ✅ Account Bitmex 🗂️ 1 in stock ✅ Account Bitsa 🗂️ 3 in stock ✅ Account Blackcatcard 🗂️ 1 in stock ✅ Account Btcdirect 🗂️ 1 in stock ✅ Account BBVA 🗂️ 1 in stock ✅ Account Binance 🗂️ 2 in stock ✅ Account Bitget 🗂️ 1 in stock ✅ Account Blackwell Global 🗂️ 1 in stock ✅ Account Brighty app 🗂️ 4 in stock ✅ Account Bankera 🗂️ 1 in stock ✅ Account Coinbase card 🗂️ 1 in stock ✅ Account Coinfinity 🗂️ 1 in stock ✅ Account Capitalist 🗂️ 2 in stock ✅ Account CoinW 🗂️ 1 in stock ✅ Account Coinmetro 🗂️ 1 in stock ✅ Account Coinpayments 🗂️ 1 in stock ✅ Account Cryptomus 🗂️ 1 in stock ✅ Account Curve 🗂️ 3 in stock ✅ Account Cryptopay 🗂️ 1 in stock ✅ Account Egera 🗂️ 1 in stock ✅ Account e PN 🗂️ 1 in stock ✅ Account FasterPay 🗂️ 1 in stock ✅ Account Finci 🗂️ 1 in stock ✅ Account fillit eu 🗂️ 1 in stock ✅ Account Gate 🗂️ 3 in stock ✅ Account Grey 🗂️ 1 in stock ✅ Account HTX (Huobi) 🗂️ 1 in stock ✅ Account IN1 🗂️ 1 in stock ✅ Account Imagenpay 🗂️ 1 in stock ✅ Account ICard 🗂️ 1 in stock ✅ Account IPRoyal 🗂️ 1 in stock ✅ Account Kraken 🗂️ 3 in stock ✅ Account Kucoin 🗂️ 1 in stock ✅ Account Kauri Finance 🗂️ 1 in stock ✅ Account Kriptomat 🗂️ 1 in stock ✅ Account Luno 🗂️ 1 in stock ✅ Account LuxonPay 🗂️ 1 in stock ✅ Account MEXC 🗂️ 1 in stock ✅ Account MyBrocard 🗂️ 1 in stock ✅ Account Moonpay 🗂️ 2 in stock ✅ Account Monzo 🗂️ 1 in stock ✅ Account moneyjar world 🗂️ 1 in stock ✅ Account Naga Pay 🗂️ 1 in stock ✅ Account Nash 🗂️ 1 in stock ✅ Account Nebeus 🗂️ 1 in stock ✅ Account Nexo 🗂️ 1 in stock ✅ Account Nearpay 🗂️ 2 in stock ✅ Account Neteller 🗂️ 1 in stock ✅ Account N26 🗂️ 1 in stock ✅ Account OKX 🗂️ 1 in stock ✅ Account PayDo 🗂️ 1 in stock ✅ Account Paypal 🗂️ 3 in stock ✅ Account Paysera 🗂️ 1 in stock ✅ Account PST 🗂️ 1 in stock ✅ Account Paybis 🗂️ 1 in stock ✅ Account Payoneer 🗂️ 1 in stock ✅ Account Paysafecard 🗂️ 2 in stock ✅ Account Paytend 🗂️ 1 in stock ✅ Account Quppy 🗂️ 1 in stock ✅ Account RedotPay 🗂️ 1 in stock ✅ Account Ramp 🗂️ 1 in stock ✅ Account Revolut 🗂️ 1 in stock ✅ Account Santander 🗂️ 1 in stock ✅ Account Spendl 🗂️ 1 in stock ✅ Account Skrill 🗂️ 1 in stock ✅ Account Swapin 🗂️ 3 in stock ✅ Account Trustee Plus 🗂️ 1 in stock ✅ Account Valora 🗂️ 1 in stock ✅ Account Volet 🗂️ 1 in stock ✅ Account W1TTY 🗂️ 1 in stock ✅ Account Wallet Telegram 🗂️ 1 in stock ✅ Account Weststein 🗂️ 1 in stock ✅ Account Wirex 🗂️ 1 in stock ✅ Account Wise 🗂️ 4 in stock ✅ Account Whitebit 🗂️ 1 in stock ✅ Account Wittix 🗂️ 1 in stock ✅ Account XGo 🗂️ 1 in stock
-
-
Topics

Question
dymek1984
Hello i make pvp points system but some is wrong with the code can some one check it and tell me where im fail ^^
This works so that if he kills a player to give me 5% of its fame, and add as many sp and pvppoints.
Everything works fine except the pvppoints. does not add points in the DB shows such as 23 pvppoints and How do I get 40 should be 63 and is 40 ;/
Index: java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (revision 5547) +++ java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -286,9 +286,9 @@ private static final String DELETE_SKILL_SAVE = "DELETE FROM character_skills_save WHERE charId=? AND class_index=?"; // Character Character SQL String Definitions: - private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,fame,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,title_color,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,newbie,nobless,power_grade,createTime) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; - private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,language=? WHERE charId=?"; - private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, title_color, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createTime,language FROM characters WHERE charId=?"; + private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,fame,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,title_color,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,newbie,nobless,power_grade,createTime,pvpPoints) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; + private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,punish_level=?,punish_timer=?,newbie=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,varka_ketra_ally=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,language=?,pvpPoints=?,rank=? WHERE charId=?"; + private static final String RESTORE_CHARACTER = "SELECT account_name, charId, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, face, hairStyle, hairColor, sex, heading, x, y, z, exp, expBeforeDeath, sp, karma, fame, pvpkills, pkkills, clanid, race, classid, deletetime, cancraft, title, title_color, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, punish_level, punish_timer, newbie, nobless, power_grade, subpledge, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,bookmarkslot,vitality_points,createTime,language,pvpPoints,rank FROM characters WHERE charId=?"; // Character Teleport Bookmark: private static final String INSERT_TP_BOOKMARK = "INSERT INTO character_tpbookmark (charId,Id,x,y,z,icon,tag,name) values (?,?,?,?,?,?,?,?)"; @@ -413,6 +413,10 @@ /** The PK counter of the L2PcInstance (= Number of non PvP Flagged player killed) */ private int _pkKills; + private int _pvpPoints; + + private int _rank; + /** The PvP Flag state of the L2PcInstance (0=White, 1=Purple) */ private byte _pvpFlag; @@ -4343,7 +4347,67 @@ DuelManager.getInstance().broadcastToOppositTeam(this, update); } } - + public void updateRank(int pvpPoints) + { + if (Config.PVP_RANK_SYSTEM_ENABLED) + { + //Check if the character has GM access + if (isGM()) + return; + { + if ((pvpPoints >= (Config.PVP_LVL1)) && (pvpPoints <= (Config.PVP_LVL1))) + { + getActingPlayer().setRank(1); + getAppearance().setNameColor(Config.NAME_COLOR_FOR_RANK1); + } + else if ((pvpPoints >= (Config.PVP_LVL2)) && (pvpPoints <= (Config.PVP_LVL2))) + { + getActingPlayer().setRank(2); + getAppearance().setNameColor(Config.NAME_COLOR_FOR_RANK2); + } + else if ((pvpPoints >= (Config.PVP_LVL3)) && (pvpPoints <= (Config.PVP_LVL3))) + { + getActingPlayer().setRank(3); + getAppearance().setNameColor(Config.NAME_COLOR_FOR_RANK3); + } + else if ((pvpPoints >= (Config.PVP_LVL4)) && (pvpPoints <= (Config.PVP_LVL4))) + { + getActingPlayer().setRank(4); + getAppearance().setNameColor(Config.NAME_COLOR_FOR_RANK4); + } + else if ((pvpPoints >= (Config.PVP_LVL5)) && (pvpPoints <= (Config.PVP_LVL5))) + { + getActingPlayer().setRank(5); + getAppearance().setNameColor(Config.NAME_COLOR_FOR_RANK5); + } + else if ((pvpPoints >= (Config.PVP_LVL6)) && (pvpPoints <= (Config.PVP_LVL6))) + { + getActingPlayer().setRank(6); + getAppearance().setNameColor(Config.NAME_COLOR_FOR_RANK6); + } + else if ((pvpPoints >= (Config.PVP_LVL7)) && (pvpPoints <= (Config.PVP_LVL7))) + { + getActingPlayer().setRank(7); + getAppearance().setNameColor(Config.NAME_COLOR_FOR_RANK7); + } + else if ((pvpPoints >= (Config.PVP_LVL8)) && (pvpPoints <= (Config.PVP_LVL8))) + { + getActingPlayer().setRank(8); + getAppearance().setNameColor(Config.NAME_COLOR_FOR_RANK8); + } + else if ((pvpPoints >= (Config.PVP_LVL9)) && (pvpPoints <= (Config.PVP_LVL9))) + { + getActingPlayer().setRank(9); + getAppearance().setNameColor(Config.NAME_COLOR_FOR_RANK9); + } + else if (pvpPoints >= (Config.PVP_LVL10)) + { + getActingPlayer().setRank(10); + getAppearance().setNameColor(Config.NAME_COLOR_FOR_RANK10); + } + } + } + } /** * Send a Server->Client packet UserInfo to this L2PcInstance and CharInfo to all L2PcInstance in its _KnownPlayers.<BR><BR> * @@ -5337,6 +5401,50 @@ if (killer != null) { + if (killer instanceof L2PcInstance && getPvpFlag() > 0) + { + L2Party party = killer.getParty(); + L2PcInstance kill = (L2PcInstance) killer; + int pointsToAdd; + if (party == null) + { + pointsToAdd = (int) (_fame*0.05); + } + else + { + pointsToAdd = (int) (_fame*0.05/party.getMemberCount()); + } + int pointsToRemove = _fame - pointsToAdd < 0 ? 0 : _fame - pointsToAdd; + kill.setFame(kill.getFame() + pointsToAdd); + kill.setSp(kill.getSp() + pointsToAdd); + kill.setPvpPoints(kill.getPvpPoints() + pointsToAdd); + setFame(pointsToRemove); + killer.sendMessage("You have earned " + pointsToAdd + " Fame Points from " + getName() + ""); + killer.broadcastPacket(new MagicSkillUse(killer, 23021, 1, 0, 0)); + { + if(killer instanceof L2PcInstance && getPvpFlag() > 0) + { + if (party != null) + { + for(L2PcInstance PartyMember : party.getPartyMembers()) + { + if(PartyMember.isInsideRadius(this, 1600, true, false) && PartyMember != killer) + { + int numberToAdd = (int) (_fame*0.05/party.getMemberCount()); + PartyMember.setFame(PartyMember.getFame() + numberToAdd); + PartyMember.setSp(PartyMember.getSp() + numberToAdd); + PartyMember.setPvpPoints(kill.getPvpPoints() + numberToAdd); + int pointsToRemove1 = _fame - numberToAdd < 0 ? 0 : _fame - numberToAdd; + setFame(pointsToRemove1); + PartyMember.setPvpKills(PartyMember.getPvpKills() + 1); + PartyMember.sendMessage("You have earned " + numberToAdd + " Fame Points from " + getName() + ""); + PartyMember.broadcastPacket(new MagicSkillUse(PartyMember, 23021, 1, 0, 0)); + } + } + } + } + } + } L2PcInstance pk = killer.getActingPlayer(); TvTEvent.onKill(killer, this); @@ -5683,7 +5791,8 @@ { // Add karma to attacker and increase its PK counter setPvpKills(getPvpKills() + 1); - + updateRank(getPvpPoints()); + broadcastUserInfo(); // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter sendPacket(new UserInfo(this)); sendPacket(new ExBrExtraUserInfo(this)); @@ -7026,7 +7135,11 @@ statement.setInt(35, isNoble() ? 1 :0); statement.setLong(36, 0); statement.setLong(37,getCreateTime()); + statement.setLong(38, 0); + + + statement.executeUpdate(); statement.close(); } @@ -7098,6 +7211,8 @@ player.setFame(rset.getInt("fame")); player.setPvpKills(rset.getInt("pvpkills")); player.setPkKills(rset.getInt("pkkills")); + player.setPvpPoints(rset.getInt("pvpPoints")); + player.setPvpPoints(rset.getInt("rank")); player.setOnlineTime(rset.getLong("onlinetime")); player.setNewbie(rset.getInt("newbie")); player.setNoble(rset.getInt("nobless")==1); @@ -7224,6 +7339,8 @@ // Language player.setLang(rset.getString("language")); + + // Retrieve the name and ID of the other characters assigned to this account. PreparedStatement stmt = con.prepareStatement("SELECT charId, char_name FROM characters WHERE account_name=? AND charId<>?"); stmt.setString(1, player._accountName); @@ -7665,7 +7782,9 @@ statement.setInt(50, getBookMarkSlot()); statement.setInt(51, getVitalityPoints()); statement.setString(52, getLang()); - statement.setInt(53, getObjectId()); + statement.setLong(53, getPvpPoints()); + statement.setLong(54, getRank()); + statement.setInt(55, getObjectId()); statement.execute(); statement.close(); @@ -14475,7 +14594,25 @@ L2DatabaseFactory.close(con); } } + public void setPvpPoints(int points) + { + _pvpPoints = points; + } + public int getPvpPoints() + { + return _pvpPoints; + } + public void setRank(int points1) + { + _rank = points1; + } + + public int getRank() + { + return _rank; + } + public double getCollisionRadius() { if (getAppearance().getSex()) Index: java/com/l2jserver/Config.java =================================================================== --- java/com/l2jserver/Config.java (revision 5547) +++ java/com/l2jserver/Config.java (working copy) @@ -725,7 +725,27 @@ public static int L2JMOD_DUALBOX_CHECK_MAX_PLAYERS_PER_IP; public static int L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP; public static TIntIntHashMap L2JMOD_DUALBOX_CHECK_WHITELIST; - + public static boolean PVP_RANK_SYSTEM_ENABLED; + public static int PVP_LVL1; + public static int PVP_LVL2; + public static int PVP_LVL3; + public static int PVP_LVL4; + public static int PVP_LVL5; + public static int PVP_LVL6; + public static int PVP_LVL7; + public static int PVP_LVL8; + public static int PVP_LVL9; + public static int PVP_LVL10; + public static int NAME_COLOR_FOR_RANK1; + public static int NAME_COLOR_FOR_RANK2; + public static int NAME_COLOR_FOR_RANK3; + public static int NAME_COLOR_FOR_RANK4; + public static int NAME_COLOR_FOR_RANK5; + public static int NAME_COLOR_FOR_RANK6; + public static int NAME_COLOR_FOR_RANK7; + public static int NAME_COLOR_FOR_RANK8; + public static int NAME_COLOR_FOR_RANK9; + public static int NAME_COLOR_FOR_RANK10; //-------------------------------------------------- // NPC Settings //-------------------------------------------------- @@ -2421,7 +2441,27 @@ } } } - + PVP_RANK_SYSTEM_ENABLED = Boolean.parseBoolean(L2JModSettings.getProperty("EnableRankSystem", "false")); + PVP_LVL1 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl1", "25000")); + PVP_LVL2 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl2", "50000")); + PVP_LVL3 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl3", "75000")); + PVP_LVL4 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl4", "100000")); + PVP_LVL5 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl5", "150000")); + PVP_LVL6 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl6", "200000")); + PVP_LVL7 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl7", "300000")); + PVP_LVL8 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl8", "400000")); + PVP_LVL9 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl9", "500000")); + PVP_LVL10 = Integer.parseInt(L2JModSettings.getProperty("PvpLvl10", "700000")); + NAME_COLOR_FOR_RANK1 = Integer.decode("0x" + L2JModSettings.getProperty("ColorForRank1", "00FF00")); + NAME_COLOR_FOR_RANK2 = Integer.decode("0x" + L2JModSettings.getProperty("ColorForRank2", "00FF00")); + NAME_COLOR_FOR_RANK3 = Integer.decode("0x" + L2JModSettings.getProperty("ColorForRank3", "00FF00")); + NAME_COLOR_FOR_RANK4 = Integer.decode("0x" + L2JModSettings.getProperty("ColorForRank4", "00FF00")); + NAME_COLOR_FOR_RANK5 = Integer.decode("0x" + L2JModSettings.getProperty("ColorForRank5", "00FF00")); + NAME_COLOR_FOR_RANK6 = Integer.decode("0x" + L2JModSettings.getProperty("ColorForRank6", "00FF00")); + NAME_COLOR_FOR_RANK7 = Integer.decode("0x" + L2JModSettings.getProperty("ColorForRank7", "00FF00")); + NAME_COLOR_FOR_RANK8 = Integer.decode("0x" + L2JModSettings.getProperty("ColorForRank8", "00FF00")); + NAME_COLOR_FOR_RANK9 = Integer.decode("0x" + L2JModSettings.getProperty("ColorForRank9", "00FF00")); + NAME_COLOR_FOR_RANK10 = Integer.decode("0x" + L2JModSettings.getProperty("ColorForRank10", "00FF00")); BANKING_SYSTEM_ENABLED = Boolean.parseBoolean(L2JModSettings.getProperty("BankingEnabled", "false")); BANKING_SYSTEM_GOLDBARS = Integer.parseInt(L2JModSettings.getProperty("BankingGoldbarCount", "1")); BANKING_SYSTEM_ADENA = Integer.parseInt(L2JModSettings.getProperty("BankingAdenaCount", "500000000")); Index: .settings/org.eclipse.jdt.ui.prefs =================================================================== --- .settings/org.eclipse.jdt.ui.prefs (revision 5547) +++ .settings/org.eclipse.jdt.ui.prefs (working copy) @@ -1,4 +1,3 @@ -#Tue Aug 30 12:22:24 CLST 2011 cleanup.add_default_serial_version_id=true cleanup.add_generated_serial_version_id=false cleanup.add_missing_annotations=truehttp://pastebin.com/Ub427XYF
23 answers to this question
Recommended Posts