[HELP]How to Change Guild to Squad

10/10/2010 10:14 shadow8994#1
So my server is based off of the Anime "Bleach" And I want to make it more like "Bleach" So how do I tweak it so when people make a guild instead of making a random name they Create EX: "Squad 11" instead of EX: "Cookies" I had it going before thanks to I think the name was Toshiro Something he did it for me and it worked but I lost the source so I moved to 5165 so how would I do all that with 5165.

Thanks your help is Appreciated.
10/10/2010 15:13 killersub#2
basically, u would have to change everything that says "Guild Leader" to "Squad Leader" and also the client-sided files( I think). but, I, wouldn't know how to do that :rolleyes:
10/10/2010 21:32 shadow8994#3
Alight =) Thanks I'll try it
10/10/2010 21:46 _tao4229_#4
client\ini\strres.ini has the Guild Leader / Deputy Leader strings in it.

Change it to whatever you want
10/10/2010 21:50 shadow8994#5
Well I changed all the "Guild" Stuff to "Squad" but people can still Put random names down like "Cookies" I need them to say "Squad(Random Number)" when they make it Help =(
10/10/2010 21:56 Arcо#6
Quote:
Originally Posted by shadow8994 View Post
Well I changed all the "Guild" Stuff to "Squad" but people can still Put random names down like "Cookies" I need them to say "Squad(Random Number)" when they make it Help =(
Thats not client sided then. When they make the guild, just make the guild
director take away the 1kk silver, then make
public Random rnd = new Random();

guild name Squad rnd.Next(1, 50);

Get it?
10/10/2010 22:03 shadow8994#7
Quote:
Originally Posted by Аrco View Post
Thats not client sided then. When they make the guild, just make the guild
director take away the 1kk silver, then make
public Random rnd = new Random();

guild name Squad rnd.Next(1, 50);

Get it?

I'll try thats now and get back to you.


Edit:

I tryed what you said but I get 1 error guild name Squad rnd.Next(1, 50);
It says Type Expected Help =P
10/10/2010 23:01 Arcо#8
Like when they say yes they wanna make a guild, do this

Random rnd = new Random();
GC.MyChar.MyGuild.Name = "Squad" +rnd.Next(1,50);
Get it? So it adds a random number to the string "Squad", then make sure the guild name isn't taken, if it is, then loop through it again.
10/10/2010 23:20 shadow8994#9
Quote:
Originally Posted by Аrco View Post
Like when they say yes they wanna make a guild, do this

Random rnd = new Random();
GC.MyChar.MyGuild.Name = "Squad" +rnd.Next(1,50);
Get it? So it adds a random number to the string "Squad", then make sure the guild name isn't taken, if it is, then loop through it again.
Ok let me try

Edit:

I need a bit of help =P Add my msn [Only registered and activated users can see links. Click Here To Register...] =( sorry But I'm dumb when it comes to this i'll keep trying though till I talk to you.
10/11/2010 02:05 Arcо#10
Post your guild npc here.
10/11/2010 03:27 shadow8994#11
Quote:
Originally Posted by Аrco View Post
Post your guild npc here.
Sorry Went to Church Here you go



Code:
#region Squad NPC
                            case 10003:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Hello.I create and manage Squads in the Society. So what do you want to do?"));
                                        GC.AddSend(Packets.NPCLink("Create Squad", 1));
                                        GC.AddSend(Packets.NPCLink("Add ViceCaptain", 3));
                                        GC.AddSend(Packets.NPCLink("Disband my Squad", 5));
                                        GC.AddSend(Packets.NPCLink("Just passing by.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    #region Create
                                    else if (Control == 1)
                                    {
                                        if (GC.MyChar.MySquad == null)
                                        {
                                            GC.AddSend(Packets.NPCSay("I don't know why, but you have to be level 95 or higher and need 1 million silvers to create one."));
                                            GC.AddSend(Packets.NPCLink2("Create", 2));
                                            GC.AddSend(Packets.NPCLink("No, i changed my mind.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You are already in a Squad. You cannot create a Squad."));
                                            GC.AddSend(Packets.NPCLink("Oh, i forgot...", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else if (Control == 2)
                                    {
                                        if (GC.MyChar.Level >= 95 && GC.MyChar.MySquad == null)
                                        {
                                            if (GC.MyChar.Silvers >= 1000000)
                                            {
                                                string SquadName = ReadString(Data);
                                                if (Features.Squads.ValidName(SquadName))
                                                {
                                                    GC.MyChar.Silvers -= 1000000;
                                                    ushort NewSquadID = (ushort)Rnd.Next(ushort.MaxValue);
                                                    while (Features.Squads.AllTheSquads.Contains(NewSquadID))
                                                        NewSquadID = (ushort)Rnd.Next(ushort.MaxValue);
                                                    Features.Squads.CreateNewSquad(SquadName, NewSquadID, GC.MyChar);
                                                    Game.World.Spawn(GC.MyChar, false);

                                                    GC.AddSend(Packets.SquadInfo(GC.MyChar.MySquad, GC.MyChar));
                                                    GC.AddSend(Packets.String(GC.MyChar.MySquad.SquadID, (byte)Game.StringType.SquadName, GC.MyChar.MySquad.SquadName));

                                                    GC.AddSend(Packets.NPCSay("Congratulations! You now have your own Squad."));
                                                    GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                                    GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                    GC.AddSend(Packets.NPCFinish());
                                                }
                                                else
                                                {
                                                    GC.AddSend(Packets.NPCSay("Choose another name, this name is taken or has invalid length."));
                                                    GC.AddSend(Packets.NPCLink2("Create", 2));
                                                    GC.AddSend(Packets.NPCLink("I changed my mind.", 255));
                                                    GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                    GC.AddSend(Packets.NPCFinish());
                                                }
                                            }
                                            else
                                            {
                                                GC.AddSend(Packets.NPCSay("I said you need 1 Million Silvers and you don't have enough."));
                                                GC.AddSend(Packets.NPCLink("Ok ok, i'll go bring the money.", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                            }
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("Forget it! You're too weak."));
                                            GC.AddSend(Packets.NPCLink("Alright, I will get stronger.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    #endregion
                                    #region ViceCaptains
                                    else if (Control == 3)
                                    {
                                        if (GC.MyChar.MySquad != null && GC.MyChar.SquadRank == SoulSocietyCoServer.Features.SquadRank.SquadLeader)
                                        {
                                            GC.AddSend(Packets.NPCSay("Insert the name of the player in your Squad you want to make a ViceCaptain."));
                                            GC.AddSend(Packets.NPCLink2("There", 4));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You are not a Squad Captain."));
                                            GC.AddSend(Packets.NPCLink("Ohhh...", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else if (Control == 4)
                                    {
                                        string PlayerName = ReadString(Data);
                                        Features.MemberInfo M = GC.MyChar.MySquad.MembOfName(PlayerName);
                                        if (M != null && M.MembName == PlayerName && ((Hashtable)GC.MyChar.MySquad.Members[(byte)90]).Count < 5)
                                        {
                                            M.Rank = SoulSocietyCoServer.Features.SquadRank.DeputyManager;
                                            ((Hashtable)GC.MyChar.MySquad.Members[(byte)50]).Remove(M.MembID);
                                            ((Hashtable)GC.MyChar.MySquad.Members[(byte)90]).Add(M.MembID, M);
                                            Game.Character C = M.Info;
                                            if (C != null)
                                            {
                                                C.SquadRank = SoulSocietyCoServer.Features.SquadRank.DeputyManager;
                                                Game.World.Spawn(C, false);
                                                C.MyClient.AddSend(Packets.SquadInfo(GC.MyChar.MySquad, GC.MyChar));
                                            }
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("The player is not in your Squad or is not a normal member. By the way, the max number ViceCaptains there can be is 5."));
                                            GC.AddSend(Packets.NPCLink("Oh, sorry.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    #endregion
                                    else if (Control == 5)
                                    {
                                        if (GC.MyChar.MySquad != null && GC.MyChar.SquadRank == SoulSocietyCoServer.Features.SquadRank.SquadLeader)
                                        {
                                            GC.AddSend(Packets.NPCSay("Are you sure you want to disband your Squad?"));
                                            GC.AddSend(Packets.NPCLink("Yes, I want to disband my Squad.", 6));
                                            GC.AddSend(Packets.NPCLink("I've changed my mind.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You are not a Squad Captain, therefore you cannot disband this Squad."));
                                            GC.AddSend(Packets.NPCLink("I see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else if (Control == 6)
                                    {
                                        if (GC.MyChar.MySquad != null && GC.MyChar.SquadRank == SoulSocietyCoServer.Features.SquadRank.SquadLeader)
                                        {
                                            GC.MyChar.MySquad.Disband();
                                        }
                                    }
                                    break;
                                }
                            #endregion
10/11/2010 03:50 Arcо#12
Change control 1 with this
PHP Code:
                                    else if (Control == 1)
                                    {
                                        if (
GC.MyChar.MySquad == null)
                                        {
                                            
GC.AddSend(Packets.NPCSay("I don't know why, but you have to be level 95 or higher and need 1 million silvers to create one."));
                                            
GC.AddSend(Packets.NPCLink("Create"2));
                                            
GC.AddSend(Packets.NPCLink("No, i changed my mind."255));
                                            
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            
GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            
GC.AddSend(Packets.NPCSay("You are already in a Squad. You cannot create a Squad."));
                                            
GC.AddSend(Packets.NPCLink("Oh, i forgot..."255));
                                            
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            
GC.AddSend(Packets.NPCFinish());
                                        }
                                    } 
replace control2 with
PHP Code:
else if (Control == 2)
                                    {
                                        if (
GC.MyChar.Level >= 95 && GC.MyChar.MySquad == null)
                                        {
                                            if (
GC.MyChar.Silvers >= 1000000)
                                            {
                                                
String SquadName "Squad" Rnd.Next(150);
                                                while()
                                                if (
Features.Squads.ValidName(SquadName))
                                                {
                                                    
GC.MyChar.Silvers -= 1000000;
                                                    
ushort NewSquadID = (ushort)Rnd.Next(ushort.MaxValue);
                                                    while (
Features.Squads.AllTheSquads.Contains(NewSquadID))
                                                        
NewSquadID = (ushort)Rnd.Next(ushort.MaxValue);
                                                    
Features.Squads.CreateNewSquad(SquadNameNewSquadIDGC.MyChar);
                                                    
Game.World.Spawn(GC.MyCharfalse);

                                                    
GC.AddSend(Packets.SquadInfo(GC.MyChar.MySquadGC.MyChar));
                                                    
GC.AddSend(Packets.String(GC.MyChar.MySquad.SquadID, (byte)Game.StringType.SquadNameGC.MyChar.MySquad.SquadName));

                                                    
GC.AddSend(Packets.NPCSay("Congratulations! You now have your own Squad."));
                                                    
GC.AddSend(Packets.NPCLink("Thanks."255));
                                                    
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                    
GC.AddSend(Packets.NPCFinish());
                                                }
                                                else
                                                {
                                                    
GC.AddSend(Packets.NPCSay("Choose another name, this name is taken or has invalid length."));
                                                    
GC.AddSend(Packets.NPCLink("Create"2));
                                                    
GC.AddSend(Packets.NPCLink("I changed my mind."255));
                                                    
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                    
GC.AddSend(Packets.NPCFinish());
                                                }
                                            }
                                            else
                                            {
                                                
GC.AddSend(Packets.NPCSay("I said you need 1 Million Silvers and you don't have enough."));
                                                
GC.AddSend(Packets.NPCLink("Ok ok, i'll go bring the money."255));
                                                
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                
GC.AddSend(Packets.NPCFinish());
                                            }
                                        }
                                        else
                                        {
                                            
GC.AddSend(Packets.NPCSay("Forget it! You're too weak."));
                                            
GC.AddSend(Packets.NPCLink("Alright, I will get stronger."255));
                                            
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            
GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    
#endregion