Jump to content

Recommended Posts

Posted

New command for admins.

Teleport char to desirable place.

 

aden|delf|dion|dwarven|elf|floran|giran|gludin|gludio|goddard

heine|hunters|kamael|orc|oren|rune|schuttgart|talkingisland

 

Index: trunk/L2jLive_DataPack/data/scripts/handlers/MasterHandler.java
===================================================================
--- /tmp/svn_fs20100723-29614-a94dpf-0	Fri Jul 23 14:49:29 2010
+++ /tmp/svn_fs20100723-29614-1htti98-0	Fri Jul 23 14:49:29 2010
@@ -136,6 +136,7 @@
		AdminCommandHandler.getInstance().registerAdminCommandHandler(new AdminSummon());
		AdminCommandHandler.getInstance().registerAdminCommandHandler(new AdminTarget());
		AdminCommandHandler.getInstance().registerAdminCommandHandler(new AdminTeleport());
+		AdminCommandHandler.getInstance().registerAdminCommandHandler(new AdminTeleportChar());
		AdminCommandHandler.getInstance().registerAdminCommandHandler(new AdminTerritoryWar());
		AdminCommandHandler.getInstance().registerAdminCommandHandler(new AdminTest());
		AdminCommandHandler.getInstance().registerAdminCommandHandler(new AdminTownWar());
Index: trunk/L2jLive_DataPack/sql/admin_command_access_rights.sql
===================================================================
--- /tmp/svn_fs20100723-29614-jpfq5z-0	Fri Jul 23 14:49:29 2010
+++ /tmp/svn_fs20100723-29614-ppccs1-0	Fri Jul 23 14:49:29 2010
@@ -420,6 +420,7 @@
('admin_summon_setlvl','1'),
('admin_target','1'),
('admin_tele','1'),
+('admin_teleportchar','1'),
('admin_teleportto','1'),
('admin_teleport_character','1'),
('admin_teleport_character_to_menu','1'),

 

AdminTeleportChar.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 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.util.StringTokenizer;
import java.util.logging.Logger;

import com.l2jserver.Config;
import com.l2jserver.gameserver.handler.IAdminCommandHandler;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;

public class AdminTeleportChar implements IAdminCommandHandler
{
        private static Logger _log = Logger.getLogger(AdminTeleportChar.class.getName());
        
        private static final String[] ADMIN_COMMANDS =
        {
                "admin_teleportchar"
        };
        
        private static final int[][] Teleport_Coords =
        {
                {147450, 27064, -2203},
                {12428, 16551, -4588},
                {18748, 145437, -3132},
                {116551, -182493, -1525},
                {45873, 49288, -3064},
                {17144, 170156, -3502},
                {83346, 148096, -3405},
                {-83063, 150791, -3133},
                {-14225, 123540, -3121},
                {147711, -55339, -2735},
                {111125, 219029, -3543},
                {116589, 76268, -2734},
                {-117016, 46555, 367},
                {-44133, -113911, -239},
                {82321, 55139, -1529},
                {44070, -50243, -796},
                {87359, -143377, -1293},
                {-83910, 243341, -3730}
        };
        
        public boolean useAdminCommand(String command, L2PcInstance activeChar, String target)
        {
                if (Config.ENABLE_SAFE_ADMIN_PROTECTION)
                {
                        if (!activeChar.isSafeAdmin())
                        {
                                activeChar.logout();
                                _log.warning("Character " + activeChar.getName() + "(" + activeChar.getObjectId() + ") tryed to use an admin command.");
                                return false;
                        }
                }
                
                if (command.startsWith("admin_teleportchar"))
                {
                        L2PcInstance targetp = (L2PcInstance)activeChar.getTarget();
                        
                        StringTokenizer st = new StringTokenizer(command);
                        st.nextToken();
                        String type = "";
                        try
                        {
                                type = st.nextToken();
                                if (type.equals ("aden"))
                                {
                                        teleportChar(targetp, 0, "Aden");
                                }
                                else if (type.startsWith ("delf"))
                                {
                                        teleportChar(targetp, 1, "D.Elf Village");
                                }
                                else if (type.startsWith ("dion"))
                                {
                                        teleportChar(targetp, 2, "Dion");
                                }
                                else if (type.startsWith ("dwarven"))
                                {
                                        teleportChar(targetp, 3, "Dwarven Village");
                                }
                                else if (type.startsWith ("elf"))
                                {
                                        teleportChar(targetp, 4, "Elven Village");
                                }
                                else if (type.startsWith ("floran"))
                                {
                                        teleportChar(targetp, 5, "Floran");
                                }
                                else if (type.startsWith ("giran"))
                                {
                                        teleportChar(targetp, 6, "Giran");
                                }
                                else if (type.startsWith ("gludin"))
                                {
                                        teleportChar(targetp, 7, "Gludin");
                                }
                                else if (type.startsWith ("gludio"))
                                {
                                        teleportChar(targetp, 8, "Gludio");
                                }
                                else if (type.startsWith ("goddard"))
                                {
                                        teleportChar(targetp, 9, "Goddard");
                                }
                                else if (type.startsWith ("heine"))
                                {
                                        teleportChar(targetp, 10, "Heine");
                                }
                                else if (type.startsWith ("hunters"))
                                {
                                        teleportChar(targetp, 11, "Hunters Village");
                                }
                                else if (type.startsWith ("kamael"))
                                {
                                        teleportChar(targetp, 12, "Kamael Village");
                                }
                                else if (type.startsWith ("orc"))
                                {
                                        teleportChar(targetp, 13, "Orc Village");
                                }
                                else if (type.startsWith ("oren"))
                                {
                                        teleportChar(targetp, 14, "Oren");
                                }
                                else if (type.startsWith ("rune"))
                                {
                                        teleportChar(targetp, 15, "Rune");
                                }
                                else if (type.startsWith ("schuttgart"))
                                {
                                        teleportChar(targetp, 16, "Schuttgart");
                                }
                                else if (type.startsWith ("talkingisland"))
                                {
                                        teleportChar(targetp, 17, "Talking Island Village");
                                }
            else if(activeChar.isInJail())
            {
                activeChar.sendMessage("Sorry,you are in Jail!");
                return false;
            }
            else if(activeChar.isInOlympiadMode())
            {
                activeChar.sendMessage("Sorry,you are in the Olympiad now.");
                return false;
            }
                    
            else if(activeChar.atEvent)
            {
                activeChar.sendMessage("Sorry,you are in an event.");
                return false;
            }
            else  if (activeChar.isInDuel())
            {
                activeChar.sendMessage("Sorry,you are in a duel!");
                return false;
            }
            else if (activeChar.isDead())
            {
               activeChar.sendMessage("Sorry,you are dead.");  
            return false;
            }        
            else if (activeChar.getKarma() > 0 || activeChar.getPvpFlag() > 0)
            {
               activeChar.sendMessage("Sorry,you are in combat.");
            return false;
            }              
            else if (activeChar.inObserverMode())
            {
               activeChar.sendMessage("Sorry,you are in the observation mode.");
            }         
            else if (activeChar.isInCombat())
            {
               activeChar.sendMessage("You are in combat!");
            }      
            else if (activeChar.isFestivalParticipant())
            {
                activeChar.sendMessage("Sorry,you are in a festival.");
                return false;
            }
                              else
                                {
                                        activeChar.sendMessage("Invalid place: " + type + ".");
                                        activeChar.sendMessage("Usage: //teleportchar Place");
                                        acticeChar.sendMessage("Places: aden|delf|dion|dwarven|elf|floran|giran|gludin|gludio|goddard");
                                        acticeChar.sendMessage("heine|hunters|kamael|orc|oren|rune|schuttgart|talkingisland");
                                }
                        }
                        return true;
                }
        }
        
        private boolean teleportChar(L2PcInstance target, int town, String name)
        {
                L2PcInstance targetp = (L2PcInstance)activeChar.getTarget();
                
                int[] loc = Teleport_Coords[town];
                
                targetp.teleToLocation(loc[0], loc[1], loc[2]);
                activeChar.sendMessage("Teleporting: " + targetp.getName() + " To: " + name + ".");
                targetp.sendMessage("You have been teleported to: " + name + ".");
                
                return true;
        }
        
        public String[] getAdminCommandList()
        {
                return ADMIN_COMMANDS;
        }
}

 

Credits to L2jLive

Posted

Fixed!

add this

 

            else if(activeChar.isInJail())
            {
                activeChar.sendMessage("Sorry,you are in Jail!");
                return false;
            }
            else if(activeChar.isInOlympiadMode())
            {
                activeChar.sendMessage("Sorry,you are in the Olympiad now.");
                return false;
            }
                    
            else if(activeChar.atEvent)
            {
                activeChar.sendMessage("Sorry,you are in an event.");
                return false;
            }
            else  if (activeChar.isInDuel())
            {
                activeChar.sendMessage("Sorry,you are in a duel!");
                return false;
            }
            else if (activeChar.isDead())
            {
               activeChar.sendMessage("Sorry,you are dead.");  
            return false;
            }        
            else if (activeChar.getKarma() > 0 || activeChar.getPvpFlag() > 0)
            {
               activeChar.sendMessage("Sorry,you are in combat.");
            return false;
            }              
            else if (activeChar.inObserverMode())
            {
               activeChar.sendMessage("Sorry,you are in the observation mode.");
            }         
            else if (activeChar.isInCombat())
            {
               activeChar.sendMessage("You are in combat!");
            }      
            else if (activeChar.isFestivalParticipant())
            {
                activeChar.sendMessage("Sorry,you are in a festival.");
                return false;
            }    

 

After:

                                else if (type.startsWith ("talkingisland"))
                                {
                                        teleportChar(targetp, 17, "Talking Island Village");
                                }

 

Posted

LOOOOOOL

This already exists and it's not limited.

You can set the name of a char and teleport him wherever you want.

Seriously, wtf is this shitty project?

Stop c/ping these stupid codes here >.<

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • https://web.archive.org/web/20260306183214/https://maxcheaters.com/topic/241828-l2j-l2damage/page/3/ https://l2topzone.com/forum/l2-server-support-problems/9/l2damage-stopped/30514 Also we will try to push longer seasons ever ! (1135-100)/9 = 115 online
    • ONE SIDE – AND EVERYTHING BREAKS ▪ Looks like a simple case: Florida DL, back side, barcode – “clean and minimal”. ▪ In reality, these are exactly the tasks that fail most often. – data provided as plain text – request only for the back side – focus on the barcode (PDF417) ▪ And here’s the key point: ▪ A barcode is not just a “picture on the back”. It’s compressed logic of the entire document. ▪ If it doesn’t match the front, format, and data structure – the system flags it instantly. ▪ Many create a “similar-looking” code. But systems don’t read “similar” – they read by specification. ▪ In cases like this, it’s not about design. It’s about correct data assembly and how it behaves inside the format. ▪ Today only – 15% off for verification cases. ▪ Want it to pass, not just look right? Describe your case – we’ll show where even clean files break. › TG: @mustang_service ( https:// t.me/ mustang_service ) › Channel: Mustang Service ( https:// t.me/ +JPpJCETg-xM1NjNl ) #editing #photoshop #documents #verification #case
    • Your anonymity is a corpse. Blockchain forgets nothing. Your transactions are direct footprints in the hands of anyone who takes an interest. [✘] Still believe in "mixing"? Forget it. Classic Bitcoin mixers are an illusion of security. For Chainalysis and Elliptic algorithms, any attempt to hide tracks in the ledger is transparent. Your "mixing" is an artifact that gets filtered out in seconds. Every transaction leaves a trail that leads to frozen assets or unwanted questions from exchanges.  We don't mix. We break the link. [-] Input: Your "dirty" coins (Dirty BTC/ETH) with all their history and digital markers stay with us. [+] Output: You receive absolutely clean assets (Clean Crypto) from our reserves, which have never intersected with your past. This isn't a game of hide and seek. This is the surgical removal of your financial history from the system.   ------------------------------------------------------------------- Technical indexing: Bitcoin Mixer, Crypto Mixer, Clean BTC, Clean ETH, Anti-Chainalysis, Best Bitcoin Mixer, Anonymous Crypto Exchange, NoLog Mixing Service.
    • Here you are: https://l2crypt.com/l2-tools/l2editor-source/
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..