-
Posts
1,418 -
Joined
-
Last visited
-
Days Won
2 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by ^Wyatt
-
Code Help The Noobs[Noob System,another Way]
^Wyatt replied to Fanky's topic in Server Shares & Files [L2J]
Hm... you had it correct Fanky... the first one is correct, not the second one... edit: both are incorrect. + if(command.equalsIgnoreCase("noob")) + { + if (activeChar.isNoob()) + { + + int[][] items = { {Config.ITEM_ID_1, Config.ITEM_A-beep-T_1}, {Config.ITEM_ID_2, Config.ITEM_A-beep-T_2}, { Config.ITEM_ID_3, Config.ITEM_A-beep-T_3}, { Config.ITEM_ID_4, Config.ITEM_A-beep-T_4}, { Config.ITEM_ID_5, Config.ITEM_A-beep-T_5} }; + int[] ar = items[Rnd.get(5)]; + activeChar.addItem(command, ar[0], ar[1], activeChar, true); + activeChar.sendMessage("You've recieved a random gift from server in order to help you"); + activeChar.setNoob(false); + } + else + { + activeChar.sendMessage("You can't use this command because you are not noob!"); + return false; + } + } + + return false; -
Code Help The Noobs[Noob System,another Way]
^Wyatt replied to Fanky's topic in Server Shares & Files [L2J]
+ if (this.noobdeaths == Config.HOW_MANY_DEATHS_FOR_NOOB) + { + this.sendMessage("You gain Noob status,you can press .noob for more informations"); + this.setNoob(true); + noobdeaths = 0; + } this. not needed + if (noobdeaths == Config.HOW_MANY_DEATHS_FOR_NOOB) + { + sendMessage("You gain Noob status,you can press .noob for more informations"); + setNoob(true); + noobdeaths = 0; + } + Good share. edit: dafuk elfocrash corrected all what I was posting so fast -.-... -
[problem] Problem on build workspace on Eclipse
^Wyatt replied to Rzeszut's question in Request Server Development Help [L2J]
Better to show us a screen with the error appearing in it... -
[REQUEST] Adapt /change this code
^Wyatt replied to GsL's question in Request Server Development Help [L2J]
/* /* * 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 com.l2jfrozen.gameserver.datatables; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.Map; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.util.CloseUtil; import com.l2jfrozen.util.database.L2DatabaseFactory; import com.l2jfrozen.util.random.Rnd; import javolution.util.FastMap; /** * @author hNoke * @adapted Wyatt */ public class PvPRewardsTable { private Map<Integer, PvPRewardItem> _rewards; public static PvPRewardsTable getInstance() { return SingletonHolder._instance; } public PvPRewardsTable() { load(); } public void rewardLastHit(L2PcInstance winner, L2PcInstance target) { int random = Rnd.get(100000); int amount; for(Map.Entry<Integer, PvPRewardItem> item : _rewards.entrySet()) { if(random < item.getKey() && item.getValue().checkConsecutiveShits(winner)) { amount = item.getValue().getamount(winner); if(amount > 0) winner.addItem("PvPReward", item.getValue().id, amount, null, true); } } } public class PvPRewardItem { public int id; public int minamount; public int maxamount; public int chance; public int pvpRequired; public int levelRequired; public int rewardAfter; public PvPRewardItem(int id, int minamount, int maxamount, int chance, int pvpRequired, int levelRequired, int rewardAfter) { this.id = id; this.minamount = minamount; this.maxamount = maxamount; this.chance = chance; this.pvpRequired = pvpRequired; this.levelRequired = levelRequired; this.rewardAfter = rewardAfter; } public boolean checkConsecutiveShits(L2PcInstance player) { if(rewardAfter == 0) return true; if(player.getPvpKills() != 0 && player.getPvpKills() % rewardAfter == 0) return true; return false; } public int getamount(L2PcInstance player) { if(player.getLevel() >= levelRequired && player.getPvpKills() >= pvpRequired) return Rnd.get(minamount, maxamount); return 0; } } private void load() { _rewards = new FastMap<Integer, PvPRewardItem>(); Connection con = null; try { con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement statement = con.prepareStatement("SELECT * FROM pvp_rewards"); ResultSet rset = statement.executeQuery(); while (rset.next()) { _rewards.put(rset.getInt("chance"), new PvPRewardItem(rset.getInt("id"), rset.getInt("minamount"), rset.getInt("maxamount"), rset.getInt("chance"), rset.getInt("pvpsRequired"), rset.getInt("levelRequired"), rset.getInt("rewardAfter"))); } rset.close(); statement.close(); } catch (Exception e) { e.printStackTrace(); } finally { CloseUtil.close(con); } } private static class SingletonHolder { protected static final PvPRewardsTable _instance = new PvPRewardsTable(); } } -
Np, the rest seems to be fine, good share.
-
[REQUEST] Adapt /change this code
^Wyatt replied to GsL's question in Request Server Development Help [L2J]
Adapt this code to **** chronicle? **** pack? -
Faction olympiad [SOLVED]
^Wyatt replied to xMrPwN's question in Request Server Development Help [L2J]
Where you're checking if they're from same faction, then can't attack... Just add... Example: if((player.isGod() && target.isGod()) || (player.isEvil() && target.isEvil()) && !player.isInOlympiadMode() && !target.isInOlympiadMode()){ player.sendMessage("You can't attack members of your own faction."); return false;} -
Guide Castle Manager All In One
^Wyatt replied to valanths1990's topic in Server Shares & Files [L2J]
Simple but useful for high rates servers I guess. Good share. -
if (target.getAccessLevel() > 100) Shouldn't it be if (target.getAccessLevel() != 0) ? And you should change it +if (Config.ANNOUNCE_FAMOUS_PLAYER) + Announcements.getInstance().announceToAll("Famous player "+activeChar.getName()+" is currently online"); And check if activechar is famous player, not? (inside the "if" already done) And... if (player.isFamous()) + { + player.sendMessage("This guy is already famous player"); + return; + } The message shouldn't be... "You are a famous player, you can't vote" ? Coz you're checking "player." not "target." (or change player. for target. and move it down some lines) pd: not tested
-
[SHARE]Command for buffs like .fighterbuff or .magebuff
^Wyatt replied to SkySkase's topic in Server Shares & Files [L2J]
Yes... skill.getEffect()... and you don't need any sql... I won't code it if you mean that. -
[SHARE]Command for buffs like .fighterbuff or .magebuff
^Wyatt replied to SkySkase's topic in Server Shares & Files [L2J]
Yes... skill.getEffect()... and you don't need any sql... I won't code it if you mean that. -
[SHARE]Command for buffs like .fighterbuff or .magebuff
^Wyatt replied to SkySkase's topic in Server Shares & Files [L2J]
Yes... skill.getEffect()... and you don't need any sql... I won't code it if you mean that. -
[SHARE]Command for buffs like .fighterbuff or .magebuff
^Wyatt replied to SkySkase's topic in Server Shares & Files [L2J]
I think it's to much hardcoded for such a simple thing... db side is useless... -
[SHARE]Command for buffs like .fighterbuff or .magebuff
^Wyatt replied to SkySkase's topic in Server Shares & Files [L2J]
I think it's to much hardcoded for such a simple thing... db side is useless... -
[SHARE]Command for buffs like .fighterbuff or .magebuff
^Wyatt replied to SkySkase's topic in Server Shares & Files [L2J]
I think it's to much hardcoded for such a simple thing... db side is useless... -
[Freya NPC]Paysafe Donation Manager
^Wyatt replied to `KnipeX's topic in Marketplace [L2Packs & Files]
Evading if it's shared or not... What this code is only doing is to save inside a .txt file what you specified in the html? Or I don't understand well... If it works like I said I see much problems: 1-Easy to code 2-Expensive 3-Better to send an email than save it inside a .txt file (?) -
[Freya NPC]Paysafe Donation Manager
^Wyatt replied to `KnipeX's topic in Marketplace [L2Packs & Files]
Evading if it's shared or not... What this code is only doing is to save inside a .txt file what you specified in the html? Or I don't understand well... If it works like I said I see much problems: 1-Easy to code 2-Expensive 3-Better to send an email than save it inside a .txt file (?) -
[Freya NPC]Paysafe Donation Manager
^Wyatt replied to `KnipeX's topic in Marketplace [L2Packs & Files]
Evading if it's shared or not... What this code is only doing is to save inside a .txt file what you specified in the html? Or I don't understand well... If it works like I said I see much problems: 1-Easy to code 2-Expensive 3-Better to send an email than save it inside a .txt file (?) -
advanced != hardcode
-
advanced != hardcode
-
advanced != hardcode
-
@dubluw Dunno what are you talking about but 7signs are fully working and freya also. You are not customer so stop posting shits about shared rev here right now. You can test in our test server that it's working perfectly :)
-
@dubluw Dunno what are you talking about but 7signs are fully working and freya also. You are not customer so stop posting shits about shared rev here right now. You can test in our test server that it's working perfectly :)
-
@dubluw Dunno what are you talking about but 7signs are fully working and freya also. You are not customer so stop posting shits about shared rev here right now. You can test in our test server that it's working perfectly :)
-
Update Added some missing spawnpoints in hellbound Fixed Greater Battle Heal in Events How to Purchase modified Improved pack security Fix for servitor instance shared elementals Fixed npcaidata sql Fixed some problems with CTF Fixed summons buffs in events Fixed Q10285_MeetingSirra Fixed Q10286_ReunionWithSirra Fixed Resist Earth skill Erased Siege Reward for Offline members (remains for Online members) Fixed a Pk issue Fixed an Abort Cast issue Fixed Throwing Dagger skill Fixed Final Imperial Tomb script Fixed Heroic Berserker skill Fixed Dimensional Rift "Go back to my world" when got client crash or relog inside Event Engine Update: Interface Reworked, players in event can't chat via chat_all, chat_trade, chat_shout and chat_hero Fixed CB problem Event Engine Update: Players in event have no clan, no ally, no clan_crest, no ally_crest, no name, different sex, different race and no hero_aura. Added Email Controller application for Vip Customers Html fixs for Q00638_SeekersOfTheHolyGrail Added exchange panel to Mathias Modified Premium Buffer sql to make much skills +15/+30 by default Added SlotMachine event for Vip Customers SlotMachine event ->
