-
Posts
1,418 -
Joined
-
Last visited
-
Days Won
2 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by ^Wyatt
-
control + F search: a-beep-t replace with: quantity ->replace all<- click
-
[Freya NPC]Paysafe Donation Manager
^Wyatt replied to `KnipeX's topic in Marketplace [L2Packs & Files]
shared before. means that this has been coded after rizla posted his code... -
[HELP] This code can adapt in interlude ??
^Wyatt replied to GsL's question in Request Server Development Help [L2J]
public boolean isEnchanted(int enchantLevel, L2PcInstance player) { // Player don't have full set if (!containAll(player)) return false; Inventory inv = player.getInventory(); L2ItemInstance chestItem = inv.getPaperdollItem(Inventory.PAPERDOLL_CHEST); L2ItemInstance legsItem = inv.getPaperdollItem(Inventory.PAPERDOLL_LEGS); L2ItemInstance headItem = inv.getPaperdollItem(Inventory.PAPERDOLL_HEAD); L2ItemInstance glovesItem = inv.getPaperdollItem(Inventory.PAPERDOLL_GLOVES); L2ItemInstance feetItem = inv.getPaperdollItem(Inventory.PAPERDOLL_FEET); if (chestItem == null || chestItem.getEnchantLevel() < enchantLevel) return false; if (_legs != 0 && (legsItem == null || legsItem.getEnchantLevel() < enchantLevel)) return false; if (_gloves != 0 && (glovesItem == null || glovesItem.getEnchantLevel() < enchantLevel)) return false; if (_head != 0 && (headItem == null || headItem.getEnchantLevel() < enchantLevel)) return false; if (_feet != 0 && (feetItem == null || feetItem.getEnchantLevel() < enchantLevel)) return false; return true; } This code is supposed to be inside com.l2jfrozen.gameserver.model.L2ArmorSet And no red lines. -
[HELP] This code can adapt in interlude ??
^Wyatt replied to GsL's question in Request Server Development Help [L2J]
Check if the imports are fine. I'll help u in 1h, right now I'm at gym, answering with blackberry. -
[help]clan rep point item
^Wyatt replied to CraZy*™*'s question in Request Server Development Help [L2J]
How are you adding codes with navicat...? Code seems to be OK. Add here-> public void useItem(L2PlayableInstance playable, L2ItemInstance item) { +playable.sendMessage("debugging"); and test... -
[HELP] This code can adapt in interlude ??
^Wyatt replied to GsL's question in Request Server Development Help [L2J]
Yes I mean that. Your import is wrong... change it: +import com.l2jserver.gameserver.model.L2ArmorSet; //added Armor effect by Annu and mvaios for it: import com.l2jfrozen.gameserver.datatables.sql.ArmorSetsTable; -
[HELP] This code can adapt in interlude ??
^Wyatt replied to GsL's question in Request Server Development Help [L2J]
import com.l2jfrozen.gameserver.datatables.sql.ArmorSetsTable; replace it: .isEnchanted(6, this) with it: .isEnchanted6(this) -
[HELP] This code can adapt in interlude ??
^Wyatt replied to GsL's question in Request Server Development Help [L2J]
Yea... Dunno which effect it has... -
[HELP] This code can adapt in interlude ??
^Wyatt replied to GsL's question in Request Server Development Help [L2J]
AbnormalEffects are inside: com.l2jfrozen.gameserver.model.L2Character One example could be: private int abnormal = L2Character.ABNORMAL_EFFECT_REDCIRCLE; -
Maybe too much work to answer... I have it working so yes it works...
-
http://maxcheaters.com/forum/index.php?topic=249915.15 http://maxcheaters.com/forum/index.php?topic=249921.0
-
[REQUEST] Adapt /change this code
^Wyatt replied to GsL's question in Request Server Development Help [L2J]
You're welcome :) -
WTS Wts Interlude pack and website
^Wyatt replied to Security's topic in Marketplace [L2Packs & Files]
95% chance Nothing special. -
Why to not only do it? And erase the other... @Override protected void onEnter(L2Character character) { character.setInsideZone(L2Character.ZONE_NOSUMMONFRIEND, true); if (character instanceof L2PcInstance) { ((L2PcInstance) character).sendMessage("You entered in a PvP Area"); if (((L2PcInstance) character).getPvpFlag() == 0) ((L2PcInstance) character).updatePvPFlag(1); } } @Override protected void onExit(L2Character character) { character.setInsideZone(L2Character.ZONE_NOSUMMONFRIEND, false); if (character instanceof L2PcInstance) { ((L2PcInstance) character).stopPvPFlag(); ((L2PcInstance) character).sendMessage("You left from a PvP Area"); } }
-
[Freya NPC]Paysafe Donation Manager
^Wyatt replied to `KnipeX's topic in Marketplace [L2Packs & Files]
I said that I'm talking about the shared one! -.- The only thing strange is the html, but maybe is coz I tried with h5. And if it's that is so easy to put it ok. XD -
Can you explain clearly what u want to do with the code? Dunno if am I the only that didn't understand anything...
-
[REQUEST] Adapt /change this code
^Wyatt replied to GsL's question in Request Server Development Help [L2J]
Should be working, check the last one that I posted... -
[Freya NPC]Paysafe Donation Manager
^Wyatt replied to `KnipeX's topic in Marketplace [L2Packs & Files]
I was curious to see if the shared code has any bug... as both of you said... and it's working properly... Lying is not funny x'D For sure knowing that if you didn't create the folder were is gonna be placed the .txt file is your fault, not code bug... -
Hardcoding L2PcInstance is never the best option. Just create a file with a simple void--> public static void freakChecker(L2PcInstance char) and call from enterworld freakChecker(activeChar); and then put your code inside that void. You can also put the code inside enterworld... but not the best way...
-
[HELP] Manage connection!
^Wyatt replied to Andrey™'s question in Request Server Development Help [L2J]
Yes he understood you /: -
You're hardcoding L2PcInstance with no reason... btw seems that the code achieves its purpose...
-
[REQUEST] Adapt /change this code
^Wyatt replied to GsL's question in Request Server Development Help [L2J]
I thought that he only wanted to adapt the code... and I did wrong... so then my feeling was to create this (1minute code and bb topic xD) I know what you mean but... and ye the loops... it was fast coded so I didn't pay much attention on what I was doing... -
[REQUEST] Adapt /change this code
^Wyatt replied to GsL's question in Request Server Development Help [L2J]
### Eclipse Workspace Patch 1.0 #P L2jFrozen_GameServer Index: head-src/com/l2jfrozen/gameserver/datatables/PvPReward.java =================================================================== --- head-src/com/l2jfrozen/gameserver/datatables/PvPReward.java (revision 0) +++ head-src/com/l2jfrozen/gameserver/datatables/PvPReward.java (revision 0) @@ -0,0 +1,67 @@ +/* + /* + * 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 com.l2jfrozen.gameserver.model.Inventory; +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance; +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; +import com.l2jfrozen.util.random.Rnd; + + +/** + * + * @author Wyatt + * + */ + +public class PvPReward +{ + private static int [] Srew = {};//Add here + private static int [] Arew = {};//the items + private static int [] Brew = {};//that you want + private static int [] Crew = {};//specify as possible + private static int [] Drew = {};//rewards, by grade + private static int chance = 30; //set chance to get item reward + + public static void checkReward(L2PcInstance killer, L2PcInstance killed) + { + int c = Rnd.get(100); + if(c > chance) + return; + + int id = 0; + L2ItemInstance armor = killed.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST); + if (armor != null) + { + id = armor.getItem().getCrystalType(); + } + else + { + return; + } + + if(id == 0x01) + killer.addItem("PvP Reward", Drew[Rnd.get(Drew.length)], 1, killer, true); + else if(id == 0x02) + killer.addItem("PvP Reward", Crew[Rnd.get(Crew.length)], 1, killer, true); + else if(id == 0x03) + killer.addItem("PvP Reward", Brew[Rnd.get(Brew.length)], 1, killer, true); + else if(id == 0x04) + killer.addItem("PvP Reward", Arew[Rnd.get(Arew.length)], 1, killer, true); + else if(id == 0x05) + killer.addItem("PvP Reward", Srew[Rnd.get(Srew.length)], 1, killer, true); + } +} \ No newline at end of file Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 948) +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -59,6 +59,7 @@ import com.l2jfrozen.gameserver.datatables.GmListTable; import com.l2jfrozen.gameserver.datatables.HeroSkillTable; import com.l2jfrozen.gameserver.datatables.NobleSkillTable; +import com.l2jfrozen.gameserver.datatables.PvPReward; import com.l2jfrozen.gameserver.datatables.SkillTable; import com.l2jfrozen.gameserver.datatables.csv.FishTable; import com.l2jfrozen.gameserver.datatables.csv.HennaTable; @@ -7744,6 +7745,7 @@ // Check if it's pvp if(checkIfPvP(target) && targetPlayer.getPvpFlag() != 0 || isInsideZone(ZONE_PVP) && targetPlayer.isInsideZone(ZONE_PVP)) { + PvPReward.checkReward(this, targetPlayer); increasePvpKills(); } else @@ -7756,6 +7758,7 @@ if(targetPlayer.getClan().isAtWarWith(getClanId())) { // 'Both way war' -> 'PvP Kill' + PvPReward.checkReward(this, targetPlayer); increasePvpKills(); if(target instanceof L2PcInstance && Config.ANNOUNCE_PVP_KILL) { -
[REQUEST] Adapt /change this code
^Wyatt replied to GsL's question in Request Server Development Help [L2J]
Try something like that... ### Eclipse Workspace Patch 1.0 #P L2jFrozen_GameServer Index: head-src/com/l2jfrozen/gameserver/datatables/PvPReward.java =================================================================== --- head-src/com/l2jfrozen/gameserver/datatables/PvPReward.java (revision 0) +++ head-src/com/l2jfrozen/gameserver/datatables/PvPReward.java (revision 0) @@ -0,0 +1,95 @@ +/* + /* + * 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 com.l2jfrozen.gameserver.model.Inventory; +import com.l2jfrozen.gameserver.model.actor.instance.L2ItemInstance; +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; +import com.l2jfrozen.util.random.Rnd; + + +/** + * + * @author Wyatt + * + */ + +public class PvPReward +{ + private static int [] Sgrade = {};//Add here + private static int [] Agrade = {};//the items + private static int [] Bgrade = {};//that will be + private static int [] Cgrade = {};//checked to know + private static int [] Dgrade = {};//the grade (chests) + + private static int [] Srew = {};//Add here + private static int [] Arew = {};//the items + private static int [] Brew = {};//that you want + private static int [] Crew = {};//specify as possible + private static int [] Drew = {};//rewards, by grade + private static String grade = ""; + + public static void checkReward(L2PcInstance killer, L2PcInstance killed) + { + int id = 0; + L2ItemInstance armor = killed.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST); + if (armor != null) + { + id = armor.getItemId(); + } + + for(int i : Sgrade) + { + if(i == id) + grade = "S"; + } + + for(int i : Agrade) + { + if(i == id) + grade = "A"; + } + + for(int i : Bgrade) + { + if(i == id) + grade = "B"; + } + + for(int i : Cgrade) + { + if(i == id) + grade = "C"; + } + + for(int i : Dgrade) + { + if(i == id) + grade = "D"; + } + + if(grade.equals("S")) + killer.addItem("PvP Reward", Srew[Rnd.get(Srew.length)], 1, killer, true); + if(grade.equals("A")) + killer.addItem("PvP Reward", Arew[Rnd.get(Arew.length)], 1, killer, true); + if(grade.equals("B")) + killer.addItem("PvP Reward", Brew[Rnd.get(Brew.length)], 1, killer, true); + if(grade.equals("C")) + killer.addItem("PvP Reward", Crew[Rnd.get(Crew.length)], 1, killer, true); + if(grade.equals("D")) + killer.addItem("PvP Reward", Drew[Rnd.get(Drew.length)], 1, killer, true); + } +} \ No newline at end of file Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 948) +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -59,6 +59,7 @@ import com.l2jfrozen.gameserver.datatables.GmListTable; import com.l2jfrozen.gameserver.datatables.HeroSkillTable; import com.l2jfrozen.gameserver.datatables.NobleSkillTable; +import com.l2jfrozen.gameserver.datatables.PvPReward; import com.l2jfrozen.gameserver.datatables.SkillTable; import com.l2jfrozen.gameserver.datatables.csv.FishTable; import com.l2jfrozen.gameserver.datatables.csv.HennaTable; @@ -7291,6 +7292,8 @@ pk.kills.add(getName()); } + PvPReward.checkReward(pk, this); + if(_inEventTvT && pk._inEventTvT) { if(TvT.is_teleport() || TvT.is_started()) -
[REQUEST] Adapt /change this code
^Wyatt replied to GsL's question in Request Server Development Help [L2J]
Ah lol, I supposed that the code was already doing it and you only wanted to adapt it, w8 I'm checking.
