-
Posts
1,418 -
Joined
-
Last visited
-
Days Won
2 -
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by ^Wyatt
-
[Q]Where is Buffs Stored?
^Wyatt replied to EdenEternal's question in Request Server Development Help [L2J]
That's the function of scheme-buffers... take someone. -
It's correct... when the zone is added to L2Character: /** Zone system */ public static final byte ZONE_PVP = 0; you can check it with: if (activeChar.isInsideZone(L2Character.ZONE_PVP))
-
My mind always get f.ucked when I'm trying to create an Instance, Mob Zone, Quest... which needs specified spawn points, so I decided to create a simple code that allows me to work faster. Are you tired of using /loc to get spawn points and after that, having to write all the values? Don't get f.ucked by your scripts, use //loc and copy+paste! x'D Index: dist/game/data/scripts/handlers/admincommandhandlers/AdminLocations.java =================================================================== --- dist/game/data/scripts/handlers/admincommandhandlers/AdminLocations.java (revision 0) +++ dist/game/data/scripts/handlers/admincommandhandlers/AdminLocations.java (revision 0) @@ -0,0 +1,105 @@ +/* + * 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 handlers.admincommandhandlers; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.util.ArrayList; +import java.util.List; +import com.l2jserver.gameserver.handler.IAdminCommandHandler; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; + +/** + * + * @author Wyatt + * + */ + +public class AdminLocations implements IAdminCommandHandler +{ + private static final String[] ADMIN_COMMANDS = + { + "admin_loc", + "admin_reset_loc" + }; + + public static List<String> _locs = new ArrayList<String>(); + private int count = 0; + private int loop = 0; + + @Override + public boolean useAdminCommand(String command, L2PcInstance activeChar) + { + + if (command.equals("admin_reset_loc")) + { + _locs.clear(); + activeChar.sendMessage("Locations deleted."); + } + + else if (command.equals("admin_loc")) + { + count = 0; + _locs.add(""+activeChar.getX()); + _locs.add(""+activeChar.getY()); + _locs.add(""+activeChar.getZ()); + + String fname = "data/locations.txt"; + File file = new File(fname); + try + { + file.createNewFile(); + FileWriter fstream = new FileWriter(fname); + BufferedWriter out = new BufferedWriter(fstream); + out.write("private int [] x = {};\r\nprivate int [] y = {};\r\nprivate int [] z = {};\r\n\r\n"); + for(String loc: _locs) + { + loop++; + out.write(getCoord(loop, count, loc)); + } + out.close(); + activeChar.sendMessage("Location saved."); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + return true; + } + + @Override + public String[] getAdminCommandList() + { + return ADMIN_COMMANDS; + } + + private String getCoord(int a, int e, String o) + { + switch(a) + { + case 1: + return "x["+e+"] = "+o+";\r\n"; + case 2: + return "y["+e+"] = "+o+";\r\n"; + case 3: + count++; + loop = 0; + return "z["+e+"] = "+o+";\r\n\r\n"; + } + return null; + } +}
-
[Help] Faction Problem!
^Wyatt replied to xrulezz's question in Request Server Development Help [L2J]
Have you the source? Check Enterworld.java -
[Q] Enchant Change By Weapon Types
^Wyatt replied to EdenEternal's question in Request Server Development Help [L2J]
When hardcoding something already hardcoded... Yes it's possible to get some problems. My advice for you is to not hardcode it more, but do whatever u want. -
Could you specify, at least, the chronicle of the pack you're owning?
-
Index: java/com/l2jserver/gameserver/network/clientpackets/CharacterCreate.java =================================================================== --- java/com/l2jserver/gameserver/network/clientpackets/CharacterCreate.java (revision 167) +++ java/com/l2jserver/gameserver/network/clientpackets/CharacterCreate.java (working copy) @@ -281,6 +281,19 @@ } } + int MageItem = 57; + int MageItemQuantity = 1; + int FighterItem = 5575; + int FighterItemQuantity = 1; + if (newChar.isMageClass()) + { + newChar.getInventory().addItem("Mage Item", MageItem, MageItemQuantity, newChar, null);//Duplicate it + } + else + { + newChar.getInventory().addItem("Fighter Item", FighterItem, FighterItemQuantity, newChar, null);//Duplicate it + } + for (L2SkillLearn skill : SkillTreesData.getInstance().getAvailableSkills(newChar, newChar.getClassId(), false, true)) { newChar.addSkill(SkillTable.getInstance().getInfo(skill.getSkillId(), skill.getSkillLevel()), true); could be? ~.~
-
[question] bug on holy pomander
^Wyatt replied to Rzeszut's question in Request Server Development Help [L2J]
Did u try to do restart? If you are using L2jserver I think there was a problem with that, but if you do a restart you get it. -
[Question]Buff Slots
^Wyatt replied to EdenEternal's question in Request Server Development Help [L2J]
On L2Character Index: java/com/l2jserver/gameserver/model/actor/L2Character.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/L2Character.java (revision 209) +++ java/com/l2jserver/gameserver/model/actor/L2Character.java (working copy) @@ -2295,10 +2295,10 @@ if (((L2Playable) this).getCharmOfLuck()) //remove Lucky Charm if player have Nobless blessing buff ((L2Playable) this).stopCharmOfLuck(null); } + else if (this instanceof L2PcInstance && /*Donator*/((L2PcInstance)this).getPremiumService()==1/* Checker*/) + { + //null + } else stopAllEffectsExceptThoseThatLastThroughDeath(); -
LF Developer Which can make me 1 python code.
^Wyatt replied to manoula's topic in Marketplace [L2Packs & Files]
No, no... it CAN be done. But the point its not on being java or jython :/... -
You can do something like that for 1st (adapting it...) Index: java/com/l2jserver/gameserver/network/clientpackets/CharacterCreate.java =================================================================== --- java/com/l2jserver/gameserver/network/clientpackets/CharacterCreate.java (revision 167) +++ java/com/l2jserver/gameserver/network/clientpackets/CharacterCreate.java (working copy) @@ -301,6 +301,7 @@ if (!Config.DISABLE_TUTORIAL) startTutorialQuest(newChar); + newChar.getInventory().addItem("Initial", 57, 10000, newChar, null);//Duplicate it. 57=id, 10000=am.ount newChar.setOnlineStatus(true, false); newChar.deleteMe();
-
[Question]Buff Slots
^Wyatt replied to EdenEternal's question in Request Server Development Help [L2J]
Divine inspiration isn't an addon of the patch that I did. It's there because it was there by default. Post your l2jfrozen's getMaxBuffs() method and donator checker if you don't succeed. -
LF Developer Which can make me 1 python code.
^Wyatt replied to manoula's topic in Marketplace [L2Packs & Files]
No, sorry. With java yes, python no... Did u understand what I said? The point is not to be python or java... -
LF Developer Which can make me 1 python code.
^Wyatt replied to manoula's topic in Marketplace [L2Packs & Files]
Transferring it to jython doesn't solve that problem. -
LF Developer Which can make me 1 python code.
^Wyatt replied to manoula's topic in Marketplace [L2Packs & Files]
I know I'm not giving you any answer/option but... what's the purpose to do that? Please :P, just curiosity. -
[Question]Buff Slots
^Wyatt replied to EdenEternal's question in Request Server Development Help [L2J]
and what exactly do you not understand of what I posted? Is easy... L2Character... look for getMaxBuffCount() method, maybe is with different name dunno... add a checker for your donator system... how do you know if 1 player is donator member? if (player.isDonator())... or whatever... and then return the default value +2 (or the quantity u want for donators) -
[Question]Buff Slots
^Wyatt replied to EdenEternal's question in Request Server Development Help [L2J]
I think what I posted is the easiest way... Btw, chronicle? Pack? Source access? Do u have a VIP/Premium service added?... -
[Question]Buff Slots
^Wyatt replied to EdenEternal's question in Request Server Development Help [L2J]
Try something like that: Index: java/com/l2jserver/gameserver/model/actor/L2Character.java =================================================================== --- java/com/l2jserver/gameserver/model/actor/L2Character.java (revision 209) +++ java/com/l2jserver/gameserver/model/actor/L2Character.java (working copy) @@ -7467,6 +7467,11 @@ */ public int getMaxBuffCount() { + int vip_extra_buffs = 2; + if (getActingPlayer().getPremiumService()==1) // Your premium service checker + { + return Config.BUFFS_MAX_AMOUNT + vip_extra_buffs + Math.max(0, getSkillLevel(L2Skill.SKILL_DIVINE_INSPIRATION)); + } return Config.BUFFS_MAX_AMOUNT + Math.max(0, getSkillLevel(L2Skill.SKILL_DIVINE_INSPIRATION)); } -
Trusted and skilled member, gl.
-
I recommend you to not talk about what you don't know, number-boy. It's not a thread to discuss about that, so keep in mind that I'm not gonna answer you again, here.
-
Explain better your problem... take some pictures and show it to us... give us a clue of what u implemented... dunno... I think your explanation is poor to wait for help.
-
[HELP]Error In Custom Community Board Help ME Please
^Wyatt replied to ~~Darius~~'s question in Request Server Development Help [L2J]
try changing that line: for(L2PcInstance player: L2World.getInstance().getAllPlayers().values()) for it: for(L2PcInstance player: L2World.getInstance().getAllPlayers().values(new L2PcInstance[0])) Advice: delete the code that you uploaded... since Matim coded it... I think you aren't allowed to share it by the face -
[HELP]Error In Custom Community Board Help ME Please
^Wyatt replied to ~~Darius~~'s question in Request Server Development Help [L2J]
Since frintezza is instanced it's not in `grandboss_data` anymore, so when u're trying to get the info from frintezza... it provokes a nullpointer. Try removing that line from the code: content = content.replaceAll("%frintezza%", bossStatus(29045));
