
کpooKNοF®
Members-
Posts
279 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by کpooKNοF®
-
eipes oti exeis gracia server? kai oxi il?
-
pes m ti ekanes apo tin arxi gt den exo katalabi ti exei ginei gia na sou pw..
-
Problem with my shop
کpooKNοF® replied to WebM0nst3r's question in Request Server Development Help [L2J]
this is a problem of a custom weapon in il make merchant_buylists :d -
[share] VoiceCommandHandler for Mammon spawn
کpooKNοF® replied to کpooKNοF®'s topic in Server Shares & Files [L2J]
pios apo olous pou dinei ena source code apo allo site dinei kai credits? prwti fora to akouw auto.. -
[share] VoiceCommandHandler for Mammon spawn
کpooKNοF® replied to کpooKNοF®'s topic in Server Shares & Files [L2J]
no i dint but i share them. gr oxi den to ekana create ego kai den mporo na doso credits gt den einai apo edw kanenas.. to 8ema einai oti prepei na dinoume oti briskoume opote.. -
ndex: L2PcInstance.java =================================================================== --- L2PcInstance.java (revision 3765) +++ L2PcInstance.java (working copy) @@ -2251,7 +2251,16 @@ if (_log.isDebugEnabled() && skill != null) _log.debug("removed skill 'Lucky' from " + getName()); } - + if(isCharViP()) + { + L2Skill vipskill = SkillTable.getInstance().getInfo(id, lvl); + addSkill(vipskill); // not saved to DB + } + if (!isCharViP()) + { + L2Skill vipskill = SkillTable.getInstance().getInfo(id, lvl); + removeSkill(vipskill); + } // Calculate the current higher Expertise of the L2PcInstance for (int i = 0; i < EXPERTISE_LEVELS.length; i++) {
-
[share] VoiceCommandHandler for Mammon spawn
کpooKNοF® posted a topic in Server Shares & Files [L2J]
### Eclipse Workspace Patch 1.0 #P L2jfreecore_trunk Index: src/main/java/com/l2jfree/Config.java =================================================================== --- src/main/java/com/l2jfree/Config.java (revision 4957) +++ src/main/java/com/l2jfree/Config.java (working copy) @@ -986,6 +986,7 @@ public static boolean DEVELOPER; // Enable/disable DEVELOPER TREATMENT public static boolean TEST_KNOWNLIST = false; // Internal properties for developers tests only public static boolean ALLOW_WEDDING; + public static boolean ALLOW_MAMMON_VOICE; public static boolean SERVER_LIST_BRACKET; // Displays [] in front of server name ? public static boolean SERVER_LIST_CLOCK; // Displays a clock next to the server name ? public static boolean SERVER_LIST_TESTSERVER; // Display test server in the list of servers ? @@ -1180,6 +1181,7 @@ ALLOW_PET_WALKERS = Boolean.parseBoolean(optionsSettings.getProperty("AllowPetWalkers", "False")); ALLOW_CURSED_WEAPONS = Boolean.parseBoolean(optionsSettings.getProperty("AllowCursedWeapons", "False")); ALLOW_WEDDING = Boolean.parseBoolean(optionsSettings.getProperty("AllowWedding", "False")); + ALLOW_MAMMON_VOICE = Boolean.parseBoolean(optionsSettings.getProperty("AllowMammonVoice", "False")); ALLOW_GUARDS = Boolean.parseBoolean(optionsSettings.getProperty("AllowGuards", "False")); DEFAULT_GLOBAL_CHAT = ChatMode.valueOf(optionsSettings.getProperty("GlobalChat", "REGION").toUpperCase()); Index: src/main/java/com/l2jfree/gameserver/handler/VoicedCommandHandler.java =================================================================== --- src/main/java/com/l2jfree/gameserver/handler/VoicedCommandHandler.java (revision 4861) +++ src/main/java/com/l2jfree/gameserver/handler/VoicedCommandHandler.java (working copy) @@ -48,6 +48,10 @@ registerVoicedCommandHandler(new CastleDoors()); registerVoicedCommandHandler(new Hellbound()); registerVoicedCommandHandler(new VersionInfo()); + if (Config.ALLOW_MAMMON_VOICE) + { + registerVoicedCommandHandler(new Mammon()); + } if (Config.ALLOW_WEDDING) { registerVoicedCommandHandler(new Wedding()); Index: src/main/java/com/l2jfree/gameserver/handler/voicedcommandhandlers/Mammon.java =================================================================== --- src/main/java/com/l2jfree/gameserver/handler/voicedcommandhandlers/Mammon.java (revision 0) +++ src/main/java/com/l2jfree/gameserver/handler/voicedcommandhandlers/Mammon.java (revision 0) @@ -0,0 +1,107 @@ +/* + * 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.l2jfree.gameserver.handler.voicedcommandhandlers; + +import com.l2jfree.gameserver.SevenSigns; +import com.l2jfree.gameserver.datatables.SpawnTable; +import com.l2jfree.gameserver.handler.IVoicedCommandHandler; +import com.l2jfree.gameserver.instancemanager.TownManager; +import com.l2jfree.gameserver.model.actor.instance.L2PcInstance; +import com.l2jfree.gameserver.model.entity.Town; +import com.l2jfree.gameserver.model.L2Spawn; + + +/* + * @author EverDreaM,Ph@t3 + */ + +public class Mammon implements IVoicedCommandHandler +{ + private static String[] _voicedCommands = { "mammon", "mmammon", "bmammon" }; + private String mnearestTown, bnearestTown; + private SpawnTable s = SpawnTable.getInstance(); + + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) + { + if(command.startsWith("mammon")) + return MammonInfo(activeChar); + else if(command.startsWith("mmammon")) + return MMammonInfo(activeChar); + else if(command.startsWith("bmammon")) + return BMammonInfo(activeChar); + return false; + } + + public boolean initMammon(L2PcInstance activeChar) + { + if (!SevenSigns.getInstance().isSealValidationPeriod()) + { + activeChar.sendMessage("The competition period is currently in effect."); + return false; + } + else + { + mnearestTown = findNPCLocTown(SevenSigns.MAMMON_MERCHANT_ID); + bnearestTown = findNPCLocTown(SevenSigns.MAMMON_BLACKSMITH_ID); + return true; + } + } + + public String findNPCLocTown(int npcId) + { + String nearestTown = ""; + for (L2Spawn spawn : s.getSpawnTable().values()) + if (npcId == spawn.getNpcid()) { + Town town = TownManager.getInstance().getClosestTown(spawn.getLocx(), spawn.getLocy(), spawn.getLocz()); + if (town != null) + nearestTown = TownManager.getInstance().getTownName(town.getTownId()); + else + nearestTown = "None"; + } + return nearestTown; + + } + + public boolean MammonInfo(L2PcInstance activeChar) + { + if (initMammon(activeChar)) + { + activeChar.sendMessage("The Merchant of Mammon is near " + mnearestTown); + activeChar.sendMessage("The Blacksmith of Mammon is near " + bnearestTown); + } + return true; + } + public boolean MMammonInfo(L2PcInstance activeChar) + { + if (initMammon(activeChar)) + { + activeChar.sendMessage("The Merchant of Mammon is near " + mnearestTown); + } + return true; + } + public boolean BMammonInfo(L2PcInstance activeChar) + { + if (initMammon(activeChar)) + { + activeChar.sendMessage("The Blacksmith of Mammon is near " + bnearestTown); + } + return true; + } + + public String[] getVoicedCommandList() + { + return _voicedCommands; + } +} Index: config/options.properties =================================================================== --- config/options.properties (revision 4957) +++ config/options.properties (working copy) @@ -330,4 +330,7 @@ EnableJythonShell = False # Interval in ms to check for deadlocks, 0 to disable -DeadLockCheck = 10000 \ No newline at end of file +DeadLockCheck = 10000 + +#Allow Voice Command Handler for Mammons spawn location +AllowMammonVoice = False \ No newline at end of file -
[SHARE]clear inventory java code
کpooKNοF® replied to کpooKNοF®'s topic in Server Shares & Files [L2J]
soz :S thx mafia :) -
ok paidia autos edw o code einai gia na kanei o admin delete to internoty kapiou mesa apo to game gia na min psaxnoume p.x char id ktlp ktlp pame sto handelr/admincommandhandlers/AdminDelete.java kai ekei mesa bazoume auto.. /* * 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.l2jfree.gameserver.handler.admincommandhandlers; import com.l2jfree.Config; import com.l2jfree.gameserver.datatables.SpawnTable; import com.l2jfree.gameserver.handler.IAdminCommandHandler; import com.l2jfree.gameserver.instancemanager.GrandBossSpawnManager; import com.l2jfree.gameserver.instancemanager.RaidBossSpawnManager; import com.l2jfree.gameserver.model.L2Object; import com.l2jfree.gameserver.model.L2ItemInstance; import com.l2jfree.gameserver.model.L2Spawn; import com.l2jfree.gameserver.model.actor.instance.L2NpcInstance; import com.l2jfree.gameserver.model.actor.instance.L2PcInstance; import com.l2jfree.gameserver.network.SystemMessageId; /** * This class handles following admin commands: - delete = deletes target * * @version $Revision: 1.2.2.1.2.4 $ $Date: 2005/04/11 10:05:56 $ */ public class AdminDelete implements IAdminCommandHandler { //private final static Log _log = LogFactory.getLog(AdminDelete.class.getName()); private static final String[] ADMIN_COMMANDS = {"admin_delete" , "admin_clean_inventory"}; private static final int REQUIRED_LEVEL = Config.GM_NPC_EDIT; public boolean useAdminCommand(String command, L2PcInstance activeChar) { if (!Config.ALT_PRIVILEGES_ADMIN) { if (!(checkLevel(activeChar.getAccessLevel()) && activeChar.isGM())) return false; } if (command.equals("admin_delete")) handleDelete(activeChar); else if (command.equals("admin_clean_inventory")) { try { for (L2ItemInstance item : activeChar.getInventory().getItems()) { if (item == null) { activeChar.getInventory().destroyItem("admin cleans inventory", item, activeChar, activeChar); } else if (item.isEquipped() || item.getItemId() == 57 || item.getItemId() == 5575) { continue; } else if (item.isStackable()) { int itemCount = activeChar.getInventory().getInventoryItemCount(item.getItemId(), -1); activeChar.getInventory().destroyItemByItemId("admin cleans inventory", item.getItemId(), itemCount, activeChar, activeChar); } else { activeChar.getInventory().destroyItem("admin cleans inventory", item, activeChar, activeChar); } continue; } } catch (Throwable t) { activeChar.sendMessage("Error: Could not clean inventory."); return true; } public String[] getAdminCommandList() { return ADMIN_COMMANDS; } private boolean checkLevel(int level) { return (level >= REQUIRED_LEVEL); } private void handleDelete(L2PcInstance activeChar) { L2Object obj = activeChar.getTarget(); if ((obj != null) && (obj instanceof L2NpcInstance)) { L2NpcInstance target = (L2NpcInstance) obj; target.deleteMe(); L2Spawn spawn = target.getSpawn(); if (spawn != null) { spawn.stopRespawn(); if (RaidBossSpawnManager.getInstance().isDefined(spawn.getNpcId())) RaidBossSpawnManager.getInstance().deleteSpawn(spawn, true); else if (GrandBossSpawnManager.getInstance().isDefined(spawn.getNpcId())) GrandBossSpawnManager.getInstance().deleteSpawn(spawn, true); else SpawnTable.getInstance().deleteSpawn(spawn, true); } activeChar.sendMessage("Deleted " + target.getName() + " from " + target.getObjectId() + "."); } else { activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); } } } kai meta eimaste gg :D
-
ego beeep ton fogo :P
-
[Share] Announcer Npc :)
کpooKNοF® replied to Fogotendx20's topic in Server Development Discussion [Greek]
perfect work :D +1 for your job -
katarxas zitas boi8eia..8es na se boi8isoume omws esi den boi8as emas re paidi mou gia na ta katalaboume ti server exeis 8es na sou poume pws ba ta balis.. den mas les ti server exeis esi mpori na exeis gracia partii kai na piges kai na mou pires gia interlude custom items WX gt den mpenoune.. prota 8a kaneis swsta tis erwtisis kai meta 8a zitas help..
-
min balis tpt mexri na sou stilo kati pou mpeni me compile kai skaei chat ban den exei kamia sxesi me floofprortector mpeni sto say2..
-
interlude einai?
-
KAPOIOSSSSSSSSSS!
کpooKNοF® replied to olataolata's question in Request Server Development Help [Greek]
esi re akire ti petaxtikes? :P EINAI FILOS MOU ...KAI MILAW ETC.. MIN PAREXIGISOUME -
hmmmm.. auto einai kapos diskolo na to fix alla exo kati ;)
-
KAPOIOSSSSSSSSSS!
کpooKNοF® replied to olataolata's question in Request Server Development Help [Greek]
katarxas 8a ma8is na zitas me tropous.... 1st worng opios to exei 8a to dosi.. -
[HELP]gia ena kalo name gia l2server..
کpooKNοF® replied to ALEXIS THE HOLE's question in Request Server Development Help [Greek]
L2Hole :D L2TheHole :D -
Prob me To SubClass Exploits :S
کpooKNοF® replied to ZeRo*'s question in Request Server Development Help [Greek]
hehe to eixa piraxi na sou pw na to kano lock eisai ok? *********Topic Locked. -
Prob me To SubClass Exploits :S
کpooKNοF® replied to ZeRo*'s question in Request Server Development Help [Greek]
xero xero respect :D to 8ema einai an litourgi work? -
Prob me To SubClass Exploits :S
کpooKNοF® replied to ZeRo*'s question in Request Server Development Help [Greek]
to 8ema einai oti to sub exploits den mpeni mono mesa sto flood alla kai se ena allo sta exo etoima.. kanta download compile kai pes m.. -
Prob me To SubClass Exploits :S
کpooKNοF® replied to ZeRo*'s question in Request Server Development Help [Greek]
epidi ta exo etoima einai gia l2jfree interlude KANTA COPYS PASTE OLA MESA.. KAI 8A EISAI OK http://rapidshare.com/files/207211817/Subclass_exploit_L2jfree_IL_Files_Interlude.rar.html kanta download einai idi etoima.. apla alaxe ta mesa apo to eclipse kane compile kai pes m.. -
many of the sites dosent work :/