Jump to content
  • 0

[Help]//Sethero prob


Question

Posted

Pedia Xrisimopiw L2jserver rev 4299 kai to command //sethero den douleui Pite mou Pws na to Fix na to dikom AdminAdmin.java

 

/*

* 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 2, 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, write to the Free Software

* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA

* 02111-1307, USA.

*

* http://www.gnu.org/copyleft/gpl.html

*/

package net.sf.l2j.gameserver.handler.admincommandhandlers;

 

import java.util.StringTokenizer;

 

import net.sf.l2j.Config;

import net.sf.l2j.gameserver.GmListTable;

import net.sf.l2j.gameserver.Olympiad;

import net.sf.l2j.gameserver.cache.HtmCache;

import net.sf.l2j.gameserver.datatables.ItemTable;

import net.sf.l2j.gameserver.datatables.NpcTable;

import net.sf.l2j.gameserver.datatables.NpcWalkerRoutesTable;

import net.sf.l2j.gameserver.datatables.SkillTable;

import net.sf.l2j.gameserver.datatables.TeleportLocationTable;

import net.sf.l2j.gameserver.handler.IAdminCommandHandler;

import net.sf.l2j.gameserver.instancemanager.Manager;

import net.sf.l2j.gameserver.model.GMAudit;

import net.sf.l2j.gameserver.model.L2Multisell;

import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;

import net.sf.l2j.gameserver.network.SystemMessageId;

import net.sf.l2j.gameserver.serverpackets.SystemMessage;

 

/**

* This class handles following admin commands:

* - admin|admin1/admin2/admin3/admin4/admin5 = slots for the 5 starting admin menus

* - gmliston/gmlistoff = includes/excludes active character from /gmlist results

* - silence = toggles private messages acceptance mode

* - diet = toggles weight penalty mode

* - tradeoff = toggles trade acceptance mode

* - reload = reloads specified component from multisell|skill|npc|htm|item|instancemanager

* - set/set_menu/set_mod = alters specified server setting

* - saveolymp = saves olympiad state manually

* - manualhero = cycles olympiad and calculate new heroes.

* @version $Revision: 1.3.2.1.2.4 $ $Date: 2007/07/28 10:06:06 $

*/

public class AdminAdmin implements IAdminCommandHandler {

 

private static final String[] ADMIN_COMMANDS = {"admin_admin", "admin_admin1", "admin_admin2", "admin_admin3", "admin_admin4", "admin_admin5",

"admin_gmliston", "admin_gmlistoff", "admin_silence", "admin_diet", "admin_tradeoff", "admin_reload", "admin_set", "admin_set_menu", "admin_set_mod",

"admin_saveolymp", "admin_manualhero"};

 

private static final int REQUIRED_LEVEL = Config.GM_MENU;

 

public boolean useAdminCommand(String command, L2PcInstance activeChar) {

 

if (!Config.ALT_PRIVILEGES_ADMIN)

if (!(checkLevel(activeChar.getAccessLevel()) && activeChar.isGM()))

return false;

 

GMAudit.auditGMAction(activeChar.getName(), command, (activeChar.getTarget() != null?activeChar.getTarget().getName():"no-target"), "");

 

if (command.startsWith("admin_admin"))

{

showMainPage(activeChar,command);

}

else if(command.startsWith("admin_gmliston"))

{

GmListTable.getInstance().showGm(activeChar);

activeChar.sendMessage("Registerd into gm list");

}

else if(command.startsWith("admin_gmlistoff"))

{

GmListTable.getInstance().hideGm(activeChar);

activeChar.sendMessage("Removed from gm list");

}

else if(command.startsWith("admin_silence"))

{

if (activeChar.getMessageRefusal()) // already in message refusal mode

{

activeChar.setMessageRefusal(false);

activeChar.sendPacket(new SystemMessage(SystemMessageId.MESSAGE_ACCEPTANCE_MODE));

}

else

{

activeChar.setMessageRefusal(true);

activeChar.sendPacket(new SystemMessage(SystemMessageId.MESSAGE_REFUSAL_MODE));

}

}

else if(command.startsWith("admin_saveolymp"))

{

try

{

Olympiad.getInstance().save();

}

catch(Exception e){e.printStackTrace();}

activeChar.sendMessage("olympiad stuff saved!!");

}

else if(command.startsWith("admin_manualhero"))

{

try

{

Olympiad.getInstance().manualSelectHeroes();

}

catch(Exception e){e.printStackTrace();}

activeChar.sendMessage("Heroes formed");

}

else if(command.startsWith("admin_diet"))

{

try

{

StringTokenizer st = new StringTokenizer(command);

st.nextToken();

if(st.nextToken().equalsIgnoreCase("on"))

{

activeChar.setDietMode(true);

activeChar.sendMessage("Diet mode on");

}

else if(st.nextToken().equalsIgnoreCase("off"))

{

activeChar.setDietMode(false);

activeChar.sendMessage("Diet mode off");

}

}

catch(Exception ex)

{

if(activeChar.getDietMode())

{

activeChar.setDietMode(false);

activeChar.sendMessage("Diet mode off");

}

else

{

activeChar.setDietMode(true);

activeChar.sendMessage("Diet mode on");

}

}

finally

{

activeChar.refreshOverloaded();

}

}

else if(command.startsWith("admin_tradeoff"))

{

try

{

String mode = command.substring(15);

if (mode.equalsIgnoreCase("on"))

{

activeChar.setTradeRefusal(true);

activeChar.sendMessage("Trade refusal enabled");

}

else if (mode.equalsIgnoreCase("off"))

{

activeChar.setTradeRefusal(false);

activeChar.sendMessage("Trade refusal disabled");

}

}

catch(Exception ex)

{

if(activeChar.getTradeRefusal())

{

activeChar.setTradeRefusal(false);

activeChar.sendMessage("Trade refusal disabled");

}

else

{

activeChar.setTradeRefusal(true);

activeChar.sendMessage("Trade refusal enabled");

}

}

}

else if(command.startsWith("admin_reload"))

{

StringTokenizer st = new StringTokenizer(command);

st.nextToken();

try

{

String type = st.nextToken();

if(type.equals("multisell"))

{

L2Multisell.getInstance().reload();

activeChar.sendMessage("multisell reloaded");

}

else if(type.startsWith("teleport"))

{

TeleportLocationTable.getInstance().reloadAll();

activeChar.sendMessage("teleport location table reloaded");

}

else if(type.startsWith("skill"))

{

SkillTable.getInstance().reload();

activeChar.sendMessage("skills reloaded");

}

else if(type.equals("npc"))

{

NpcTable.getInstance().reloadAllNpc();

activeChar.sendMessage("npcs reloaded");

}

else if(type.startsWith("htm"))

{

HtmCache.getInstance().reload();

activeChar.sendMessage("Cache

: " + HtmCache.getInstance().getMemoryUsage()  + " megabytes on " + HtmCache.getInstance().getLoadedFiles() + " files loaded");

}

else if(type.startsWith("item"))

{

ItemTable.getInstance().reload();

activeChar.sendMessage("Item templates reloaded");

}

else if(type.startsWith("instancemanager"))

{

Manager.reloadAll();

activeChar.sendMessage("All instance manager has been reloaded");

}

else if(type.startsWith("npcwalkers"))

{

NpcWalkerRoutesTable.getInstance().load();

activeChar.sendMessage("All NPC walker routes have been reloaded");

 

}

 

}

catch(Exception e)

{

activeChar.sendMessage("Usage:  //reload <multisell|skill|npc|htm|item|instancemanager>");

}

}

 

else if(command.startsWith("admin_set"))

{

StringTokenizer st = new StringTokenizer(command);

String[] cmd=st.nextToken().split("_");

try

{

String[] parameter = st.nextToken().split("=");

String pName = parameter[0].trim();

String pValue = parameter[1].trim();

if (Config.setParameterValue(pName, pValue))

activeChar.sendMessage("parameter "+pName+" succesfully set to "+pValue);

else

activeChar.sendMessage("Invalid parameter!");

}

catch(Exception e)

{

if (cmd.length==2)

activeChar.sendMessage("Usage: //set parameter=vaue");

}

finally

{

if (cmd.length==3)

{

if (cmd[2].equalsIgnoreCase("menu"))

AdminHelpPage.showHelpPage(activeChar, "settings.htm");

else if (cmd[2].equalsIgnoreCase("mod"))

AdminHelpPage.showHelpPage(activeChar, "mods_menu.htm");

}

}

}

return true;

}

 

public String[] getAdminCommandList()

{

return ADMIN_COMMANDS;

}

 

private boolean checkLevel(int level)

{

return (level >= REQUIRED_LEVEL);

}

 

private void showMainPage(L2PcInstance activeChar, String command)

{

int mode = 0;

String filename=null;

try

{

mode = Integer.parseInt(command.substring(11));

}

catch (Exception e) {}

switch (mode)

{

case 1:

filename="main";

break;

case 2:

filename="game";

break;

case 3:

filename="effects";

break;

case 4:

filename="server";

break;

case 5:

filename="mods";

break;

default:

if (Config.GM_ADMIN_MENU_STYLE.equals("modern"))

filename="main";

else

filename="classic";

break;

}

AdminHelpPage.showHelpPage(activeChar, filename+"_menu.htm");

}

}

Recommended Posts

  • 0
Posted

Mporei na min ginete me //sethero.... ka8e pack exei diko tou command.... gia l2j den 3erw....

 

px dokimase //hero h //set_hero... h .sethero... genika dokimase diafora..

 

Auto to code pou mas edwses einai gia manual hero an den kanw la8os...

  • 0
Posted

δίκιο έχει ο kr1nos αυτο το code είναι για manul hero,

jimi έχεις δίκιο και εσύ γιατι όντως η L2J δεν έχει το //set_hero(γιατί το είχα και εγώ)

λοιπόν άνοιξε το eclipse και πήγαινε L2PcInstance ή enterworld.java δεν θυμάμαι ακριβως που είναι κάπου λέει

private boolean //sethero (false) κάντω true

η τέλος πάντων κάπως έτσι

  • 0
Posted

Mporei na min ginete me //sethero.... ka8e pack exei diko tou command.... gia l2j den 3erw....

 

px dokimase //hero h //set_hero... h .sethero... genika dokimase diafora..

 

Auto to code pou mas edwses einai gia manual hero an den kanw la8os...

Egw lew pws den iparxei etc to code (dld //sethero)

 

des edw:

* - set/set_menu/set_mod = alters specified server setting

 

Mpes mesa sto l2 kai pata //set_menu kai 8a s bhalei ola ta customs codes... (logika)

  • 0
Posted

δίκιο έχει ο kr1nos αυτο το code είναι για manul hero,

jimi έχεις δίκιο και εσύ γιατι όντως η L2J δεν έχει το //set_hero(γιατί το είχα και εγώ)

λοιπόν άνοιξε το eclipse και πήγαινε L2PcInstance ή enterworld.java δεν θυμάμαι ακριβως που είναι κάπου λέει

private boolean //sethero (false) κάντω true

η τέλος πάντων κάπως έτσι

 

to evala true pisteuo na piasi tha kanw Edit:

 

EDIT: Tipota Will den epiase

  • 0
Posted

πφφφ,

άμα σόνι και καλά θες το sethero άλλαξε pack,απο όσο έχω δεί όλα τα άλλα το έχουνε,η πέρνα μόνο σου το code για το //sethero άμα ξέρεις.

  • 0
Posted

πφφφ,

άμα σόνι και καλά θες το sethero άλλαξε pack,απο όσο έχω δεί όλα τα άλλα το έχουνε,η πέρνα μόνο σου το code για το //sethero άμα ξέρεις.

Kai to 3analew.... den 8a einai //sethero...  Na alla3ei pack den einia lisi....

 

Ekanes auto pou s ipa? .... dld n apatiseis //set_menu...

  • 0
Posted

Mporei na min ginete me //sethero.... ka8e pack exei diko tou command.... gia l2j den 3erw....

 

px dokimase //hero h //set_hero... h .sethero... genika dokimase diafora..

 

Auto to code pou mas edwses einai gia manual hero an den kanw la8os...

dokimase kai ///sethero i ///set_hero se ena pack etsi itan se mana kai pes mas

  • 0
Posted

opws ema8a kai prosfata osa command einai me 3 slash (///) einai gia to client size....

afou sou ipa to exo pathi se pack me (///)les na leo psemata ?

 

  • 0
Posted

afou sou ipa to exo pathi se pack me (///)les na leo psemata ?

 

Den ipa oti les psemata LoL.... lew oti a8 ginei hero apo cilent side... kai oxi kanonika... Btw an 8es na sizitisoume pm me...  (min kaneis reply gia na min mamisoume to topic..)

  • 0
Posted

@dleogr opos ipe kai o krino ta /// eine gia client side file s dini hero aura mono kai to vlepis mono esi ... tcp..

 

@krinos t ekana dn m ebgale tpt

 

Ama mporite pite mou pos mporw na to peraso i an den ginete alazw se l2jfree (den pisteuo na exei to idio prob.. )

 

 

  • 0
Posted

@dleogr opos ipe kai o krino ta /// eine gia client side file s dini hero aura mono kai to vlepis mono esi ... tcp..

 

@krinos t ekana dn m ebgale tpt

 

Ama mporite pite mou pos mporw na to peraso i an den ginete alazw se l2jfree (den pisteuo na exei to idio prob.. )

Nop h l2jFree einai testarismeni :P

 

Ps: ta dokimases ola osa s ipa? //hero //set_hero klp?

Ps2: 3ereis na kaneis  compile me maven?

Guest
This topic is now closed to further replies.


  • Posts

    • L2 Kings    Stage 1 – The Awakening Dynasty and Moirai Level Cap: 83 Gear: Dynasty -Moirai & Weapons (Shop for Adena + Drop from mobs/instances ) Masterwork System: Available (Neolithics S required with neolithics u can do armor parts foundation aswell) Class Cloaks: Level 1 - Masterwork sets such us moirai/dynasty stats are boosted also vesper(stage 2) Olf T-Shirt: +6 (fails don’t reset) safe is +2 Dolls: Level 1 Belts: Low & Medium Enchant: Safe +3 / Max +8 / Attribution Easy in Moirai-Dynasty . Main Zones: Varka Outpost: Easy farm, Adena, EXP for new players = > 80- 100kk hour Dragon Valley: Main farm zone — , 100–120kk/hour Weapon Weakness System active (all classes can farm efficiently) Archers get vampiric auto-hits vs mobs Dragon Valley Center: Main Party Zone — boosted drops (Blessed enchants, Neolithics chance) => farm like 150-200kk per hour. Dragon Valley North: Spoil Zone (Asofe + crafting materials for MW) Primeval Isle: Safe autofarm zone (low adena for casual players) ==> 50kk per hour Forge of the Gods & Imperial Tomb: Available from Stage 1 (lower Adena reward in compare with Dragon Valley) Hellbound also avaliable from stage 1 In few words all zones opened but MAIN farm zone with boosted adena and drops is Dragon valley also has more mobs Instances: Zaken (24h Reuse) → Instead of Vespers drop Moirai , 100% chance to drop 1 of 9 dolls lvl 1, Zaken 7-Day Jewelry Raid Bosses (7 RBs): Drop Moirai Parts + Neolithic S grade instead of Vespers parts that has 7 Rb Quest give Icarus Weapons Special Feature 7rb bosses level up soul crystals aswell. Closed Areas : Monaster of SIlence, LOA, ( It wont have mobs) / Mahum Quest/Lizardmen off) Grand Epics: Unlocked on Day 4 of Stage 1 → Antharas, Valakas, Baium, AQ, etc ================================================================================= Stage 2 – Rise of Vespers Level Cap: 85 Gear: Moirai Armors (Adena GM SHOP / Craft/ Drop) Weapons: Icarus Cloaks: Level 2 Olf: +8 Dolls: Level 2 Belts: High & Top Enchant: Safe +3 / Max +8 Masterwork can be with Neolithics S84 aswell but higher so craft will be usefull aswell. 7 Raid Boss Quest Updated: Now works retail give vesper weapons 7rb Bosses Drops : Vespers Instances: Zaken : Drops to retail vespers + the dolls and the extra items that we added on stage 1 New Freya Instance: Added — drops vespers and instead of mid s84 weapons will drop vespers . Extra drops Blessed Bottle of Freya - drops 100% chance 1 of 9 dolls. Farm Areas Dragon Valley remains main farm New Zone : Lair of Antharas (mobs nerfed and added drop Noble stone so solo players can farm too) New Party Zone : LOA Circle   ============================================================================   Stage 3 – The Vorpal ERA Gear: Vorpal Unclock Cloaks: Level 3 Olf: +10 (max cap) Dolls: Level 3 Enchant: Safe +3 / Max +12 Farm Zones : Dragon Valley Center Scorpions becomes a normal solo zone (no longer party zone) Drops:   LOA & Knorik → Mid Weapons avaliable in drop New Party Zone Kariks Instances: Easy Freya Drops Mid Weapons Frintezza Release =================================================================================     Stage 4 – Elegia Era (Final Stage) Elegia Unlock Gear: Elegia Weapons: Elegia TOP s84 ( farmed via H-Freya/ Drops ) Cloaks: Level 5 Dolls: Level 3 (final bonuses) Enchant: Safe +6 / Max +16 Instances: Hard Freya → Drops Elegia Weapons + => The Instance will drop 2-3 parts for sure and also will be able to Join with 7 people . Party Zone will have also drop chances for elegia armor parts and weapons but small   Events (Hourly): Win: 50 Event Medals + 3 GCM + morewards Lose: 25 Medals + 1 GCM + more rewards Tie: 30 Medals + 2 GCM + more rewards   ================================================================================ Epic Fragments Currency Participating in Daily Bosses mass rewarding all players Participating in Instances (zaken freya frintezza etc) all players get reward ================================================================================ Adena - Main server currency (all items in gm shop require adena ) Event Medals (Festival Adena) - Event shop currency Donation coins you can buy with them dressme,cosmetics and premium account Epic Fragments you can buy with them fake epic jewels Olympiad Tokens you can buy many items from olympiad shop (Hero Coin even items that are on next stages) Olympiad Win = 1000 Tokens / Lose = 500 Tokens ================================================================================= Offline Autofarm Allows limited Offline farming requires offline autofarm ticket that you get by voting etc ================================================================================= Grand Epics have Specific Custom NPC that can spawn Epics EU/LATIN TIME ZONE ================================================================================= First Olympiad Day 19 December First Heroes 22 December ( 21 December Last day of 1st Period) After that olympiad will be weekly. ================================================================================= Item price and economy Since adena is main coin of server and NOT donation coins we will always add new items in gm shop with adena in order to burn the adena of server and not be inflation . =================================================================================        
    • Hello, I'd like to change a title color for custom npc.  I created custom NPC, cloned existing. I put unique id for it in npcname-e, npcgrp and database. I have "0" to serverSideName in db, so that it would use npcname-e, but instead it has "NoNameNPC"and no title color change.
    • Trusted Guy 100% ,  I asked him for some work and he did it right away.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock