[Release]Botjail Command

03/10/2009 16:58 brodie67#1
Hello this is my first release so this might be nooby but it works..
This is for LOTF based servers but here is the command I coded this myself:
Code:
                                             if (Splitter[0] == "/botjail")
                                        {
                                            foreach (DictionaryEntry DE in World.AllChars)
                                            {
                                                Character Char = (Character)DE.Value;

                                                if (Char.Name == Splitter[1])
                                                {
                                                    World.SendMsgToAll(Splitter[1] + " has been sent to botjail for breaking a rule.", "SYSTEM", 2011);
                                                    World.SendMsgToAll("Note: Please follow all the rules!", "SYSTEM", 2005);
                                                    Char.Teleport(6001, 30, 75);
                                                    Char.CurHP = 0;
                                                    Char.Alive = false;
                                                    Char.MyClient.SendPacket(General.MyPackets.Status1(Char.UID, 0));
                                                    Char.MyClient.SendPacket(General.MyPackets.Status3(Char.UID));
                                                    Char.MyClient.SendPacket(General.MyPackets.Vital(Char.UID, 26, Char.GetStat()));
                                                    Char.MyClient.SendPacket(General.MyPackets.CharacterInfo(Char));
                                                    Char.MyClient.SendPacket(
                                                    General.MyPackets.Vital(Char.UID, 26, Char.GetStat()));
                                                    Char.Stamina = 0;
                                                    Char.CPs = 0;
                                                    Char.Silvers = 0;
                                                    Char.MyClient.SendPacket(General.MyPackets.Vital(Char.UID, 9, Char.Stamina));
                                                    Char.Die();
                                                    Char.RemoveEquips();
                                                    Char.Level = 1;
                                                    World.UpdateSpawn(Char);
                                                    Char.MyClient.Drop();
                                                    
                                                }
                                                else
                                                {
                                                    SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Sorry the Character: " + Splitter[1] + " is offline...Please try again later", 2000));
                                                }
                                            }
                                        }
This command should do this:
1. Send the person to a jail type place
2. Delete there cps so they cant broadcast
3. Remove there silvers
4. Make them level 1
5. Make them have no stamina and health (Dead)
6. Send a message to all saying this: [Name] Has been sent to botjail for breaking a rule!
7. And Please follow the rules.
This is a command I made in 5 minutes so please don't flame. :)
If this worked for you please press the magic button "Thanks" xD

How to use command: /botjail ExampleName
03/10/2009 17:16 lol-lol#2
Very nice .. but i will not try it because i am working on TQ binarys

Good luck
03/10/2009 20:12 PeTe Ninja#3
Quote:
Originally Posted by brodie67 View Post
Hello this is my first release so this might be nooby but it works..
This is for LOTF based servers but here is the command I coded this myself:
Code:
                                             if (Splitter[0] == "/botjail")
                                        {
                                            foreach (DictionaryEntry DE in World.AllChars)
                                            {
                                                Character Char = (Character)DE.Value;

                                                if (Char.Name == Splitter[1])
                                                {
                                                    World.SendMsgToAll(Splitter[1] + " has been sent to botjail for breaking a rule.", "SYSTEM", 2011);
                                                    World.SendMsgToAll("Note: Please follow all the rules!", "SYSTEM", 2005);
                                                    Char.Teleport(6001, 30, 75);
                                                    Char.CurHP = 0;
                                                    Char.Alive = false;
                                                    Char.MyClient.SendPacket(General.MyPackets.Status1(Char.UID, 0));
                                                    Char.MyClient.SendPacket(General.MyPackets.Status3(Char.UID));
                                                    Char.MyClient.SendPacket(General.MyPackets.Vital(Char.UID, 26, Char.GetStat()));
                                                    Char.MyClient.SendPacket(General.MyPackets.CharacterInfo(Char));
                                                    Char.MyClient.SendPacket(
                                                    General.MyPackets.Vital(Char.UID, 26, Char.GetStat()));
                                                    Char.Stamina = 0;
                                                    Char.CPs = 0;
                                                    Char.Silvers = 0;
                                                    Char.MyClient.SendPacket(General.MyPackets.Vital(Char.UID, 9, Char.Stamina));
                                                    Char.Die();
                                                    Char.RemoveEquips();
                                                    Char.Level = 1;
                                                    World.UpdateSpawn(Char);
                                                    Char.MyClient.Drop();
                                                    
                                                }
                                                else
                                                {
                                                    SendPacket(General.MyPackets.SendMsg(MessageId, "SYSTEM", MyChar.Name, "Sorry the Character: " + Splitter[1] + " is offline...Please try again later", 2000));
                                                }
                                            }
                                        }
This command should do this:
1. Send the person to a jail type place
2. Delete there cps so they cant broadcast
3. Remove there silvers
4. Make them level 1
5. Make them have no stamina and health (Dead)
6. Send a message to all saying this: [Name] Has been sent to botjail for breaking a rule!
7. And Please follow the rules.
This is a command I made in 5 minutes so please don't flame. :)
If this worked for you please press the magic button "Thanks" xD

How to use command: /botjail ExampleName
not a flame here but i think...

if you make them ahve no stamina and health they will still be able to move . if you want the /kill command ( for them to be dead you know you could add the kill part of it in the ban part)

very nice command, sorry to say i wont be using it in peteco updated because im making my own also =]]
03/10/2009 21:45 justprownage#4
Thanks, this gave me an idea of something :cool:
03/10/2009 22:12 taylor2846#5
um whats the point of taking there stamina a way if u r sending them to botjail u orda let theam do what thay want there just put a code of scrolls to thay cant us if in bot jail and put a code on all commadns so thay will not effect playres in bot jail and put a code on brodcast so players in botjail cant brodcast
xD and if u r seting there level to 1 adn stuff like that why not just del there acc??
^^ not flaming just asking

But it is still good work
03/10/2009 23:17 PeTe Ninja#6
by the way for this to complelty work make sure the npc reads that they are in botjail for a reason and they cant leave until.. lets say they get a dragonball


so it could be like


at the end of your comand

Char.BotJailPoints += 1;

then the npc could read it like

if(MyChar.BotJailPoints == 1)
{

then like if item has or something == dragonball
mychar.teleport 1002 500 500

that oculd work good
03/11/2009 00:20 taylor2846#7
ya that would work i just had a GM command that will recall a botjail player but u can only do it with that 1 command but yours works batter well unless u want the guy to stay there well i gese u can set def levels of bot jail lol
03/11/2009 00:31 PeTe Ninja#8
or you can make command to send to botjail

make botjailpoints

make npc read them

make gates not let anyone use if in that map

make sure you cant use the recall command,
by that i mean if your sent to botjail change status to normal player status

also make sure the recall command for gms is blocked if the char is in that map