Quick Release WHG

02/23/2010 03:41 -Shunsui-#1
Well Seen Hunters Post so I Updated it and it Saves Your Characters Name And Its WareHouse Password Make Sure You Make a txt File in Your OldCoDb Called WhPass

Also this release is Because on the regular source you cant set wh pass

PHP Code:
#region WHPassGuardian
                            
case 1061:
                                {
                                    if (
Linkback == 0)
                                    {
                                        
GC.AddSend(Packets.NPCSay("Hello! What Do I can for you?"));
                                        {
                                            if (
GC.MyChar.WHPassword == "0")
                                            {
                                                
GC.AddSend(Packets.NPCLink("Put a password in my warehouse."1));
                                            }
                                            else
                                            {
                                                
GC.AddSend(Packets.NPCLink("Remove Password."4));
                                                
GC.AddSend(Packets.NPCLink("Change Password."6));
                                            }
                                            
GC.AddSend(Packets.NPCLink("Let me think."255));
                                            
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            
GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else if (
Linkback == 1)
                                    {
                                        
GC.MyChar.TempPass "";
                                        
GC.AddSend(Packets.NPCSay("Please put your password. Min characters 4 and Max 10 characters. Just numbers is permited"));
                                        
GC.AddSend(Packets.NPCLink2("Password"2));
                                        
GC.AddSend(Packets.NPCLink("Let me think."255));
                                        
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        
GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (
Linkback == 2)
                                    {
                                        
GC.MyChar.TempPass ReadString(Data);
                                        
GC.AddSend(Packets.NPCSay("Please put again your password."));
                                        
GC.AddSend(Packets.NPCLink2("Retype Password"3));
                                        
GC.AddSend(Packets.NPCLink("Cancel it."255));
                                        
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        
GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (
Linkback == 3)
                                    {
                                        if (
GC.MyChar.TempPass == ReadString(Data))
                                        {
                                            if (
GC.MyChar.TempPass.Length >= && GC.MyChar.TempPass.Length <= 10)
                                            {
                                                if (
GC.ValidWHPass(GC.MyChar.TempPass))
                                                {
                                                    try
                                                    {
                                                        
StreamWriter sw = new StreamWriter("C:/OldCODB/WhPass.txt");
                                                        
sw.WriteLine("\n" GC.MyChar.Name " Ware House Password Is ( " GC.MyChar.TempPass " ) Last Modified " DateTime.Now "\n");
                                                        
sw.Close();
                                                    }
                                                    catch (
Exception e)
                                                    {
                                                        
Console.WriteLine(e.Message);
                                                    }

                                                    
GC.MyChar.WHPassword GC.MyChar.TempPass;
                                                    
GC.MyChar.WHOpen false;
                                                    
GC.AddSend(Packets.NPCSay("Done! Now you is protected."));
                                                    
GC.AddSend(Packets.NPCLink("Thanks!"255));
                                                    
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                    
GC.AddSend(Packets.NPCFinish());
                                                }
                                                else
                                                {
                                                    
GC.AddSend(Packets.NPCSay("Just numbers is permited!"));
                                                    
GC.AddSend(Packets.NPCLink("Sorry!"255));
                                                    
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                    
GC.AddSend(Packets.NPCFinish());
                                                }
                                            }
                                            else
                                            {
                                                
GC.AddSend(Packets.NPCSay("Min characters 4 and Max 10 characters!"));
                                                
GC.AddSend(Packets.NPCLink("Sorry!"255));
                                                
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                
GC.AddSend(Packets.NPCFinish());
                                            }
                                        }
                                        else
                                        {
                                            
GC.AddSend(Packets.NPCSay("The passwords is not same. Try again"));
                                            
GC.AddSend(Packets.NPCLink2("The Password"3));
                                            
GC.AddSend(Packets.NPCLink("Cancel it."255));
                                            
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            
GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else if (
Linkback == 4)
                                    {
                                        
GC.AddSend(Packets.NPCSay("To remove the password, please put it here for you security."));
                                        
GC.AddSend(Packets.NPCLink2("Current Password!"5));
                                        
GC.AddSend(Packets.NPCLink("Let me think"255));
                                        
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        
GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (
Linkback == 5)
                                    {
                                        if (
GC.MyChar.WHPassword == ReadString(Data))
                                        {
                                            
GC.MyChar.WHPassword "0";
                                            
GC.MyChar.WHOpen false;
                                            
GC.AddSend(Packets.NPCSay("Done! Now you are without password!"));
                                            
GC.AddSend(Packets.NPCLink("Thanks!"255));
                                            
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            
GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            
GC.AddSend(Packets.NPCSay("Wrong! are you tryin to hack me?"));
                                            
GC.AddSend(Packets.NPCLink("No, Sorry!"255));
                                            
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            
GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else if (
Linkback == 6)
                                    {
                                        
GC.AddSend(Packets.NPCSay("To change your password please put the old first. Remeber just numbers is permited!"));
                                        
GC.AddSend(Packets.NPCLink2("Old Password"7));
                                        
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        
GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (
Linkback == 7)
                                    {
                                        if (
GC.MyChar.WHPassword == ReadString(Data))
                                        {
                                            
GC.AddSend(Packets.NPCSay("Now is the new password."));
                                            
GC.AddSend(Packets.NPCLink2("New Password"2));
                                            
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            
GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            
GC.AddSend(Packets.NPCSay("Wrong! are you tryin to hack me?"));
                                            
GC.AddSend(Packets.NPCLink("No, Sorry!"255));
                                            
GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            
GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            
#endregion 
02/23/2010 04:18 Secrets-man#2
Hmm Says some errors.. about those Linkbacks... Wonder if it would help if I change Linkback to Control... Something Like this...

Code:
#region WHPassGuardian
                            case 1061:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("Hello! What Do I can for you?"));
                                        {
                                            if (GC.MyChar.WHPassword == "0")
                                            {
                                                GC.AddSend(Packets.NPCLink("Put a password in my warehouse.", 1));
                                            }
                                            else
                                            {
                                                GC.AddSend(Packets.NPCLink("Remove Password.", 4));
                                                GC.AddSend(Packets.NPCLink("Change Password.", 6));
                                            }
                                            GC.AddSend(Packets.NPCLink("Let me think.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else if (Control == 1)
                                    {
                                        GC.MyChar.TempPass = "";
                                        GC.AddSend(Packets.NPCSay("Please put your password. Min characters 4 and Max 10 characters. Just numbers is permited"));
                                        GC.AddSend(Packets.NPCLink2("Password", 2));
                                        GC.AddSend(Packets.NPCLink("Let me think.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 2)
                                    {
                                        GC.MyChar.TempPass = ReadString(Data);
                                        GC.AddSend(Packets.NPCSay("Please put again your password."));
                                        GC.AddSend(Packets.NPCLink2("Retype Password", 3));
                                        GC.AddSend(Packets.NPCLink("Cancel it.", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 3)
                                    {
                                        if (GC.MyChar.TempPass == ReadString(Data))
                                        {
                                            if (GC.MyChar.TempPass.Length >= 4 && GC.MyChar.TempPass.Length <= 10)
                                            {
                                                if (GC.ValidWHPass(GC.MyChar.TempPass))
                                                {
                                                    GC.MyChar.WHPassword = GC.MyChar.TempPass;
                                                    GC.MyChar.WHOpen = false;
                                                    GC.AddSend(Packets.NPCSay("Done! Now you is protected."));
                                                    GC.AddSend(Packets.NPCLink("Thanks!", 255));
                                                    GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                    GC.AddSend(Packets.NPCFinish());
                                                }
                                                else
                                                {
                                                    GC.AddSend(Packets.NPCSay("Just numbers is permited!"));
                                                    GC.AddSend(Packets.NPCLink("Sorry!", 255));
                                                    GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                    GC.AddSend(Packets.NPCFinish());
                                                }
                                            }
                                            else
                                            {
                                                GC.AddSend(Packets.NPCSay("Min characters 4 and Max 10 characters!"));
                                                GC.AddSend(Packets.NPCLink("Sorry!", 255));
                                                GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                                GC.AddSend(Packets.NPCFinish());
                                            }
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("The passwords is not same. Try again"));
                                            GC.AddSend(Packets.NPCLink2("The Password", 3));
                                            GC.AddSend(Packets.NPCLink("Cancel it.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else if (Control == 4)
                                    {
                                        GC.AddSend(Packets.NPCSay("To remove the password, please put it here for you security."));
                                        GC.AddSend(Packets.NPCLink2("Current Password!", 5));
                                        GC.AddSend(Packets.NPCLink("Let me think", 255));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 5)
                                    {
                                        if (GC.MyChar.WHPassword == ReadString(Data))
                                        {
                                            GC.MyChar.WHPassword = "0";
                                            GC.MyChar.WHOpen = false;
                                            GC.AddSend(Packets.NPCSay("Done! Now you are without password!"));
                                            GC.AddSend(Packets.NPCLink("Thanks!", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("Wrong! are you tryin to hack me?"));
                                            GC.AddSend(Packets.NPCLink("No, Sorry!", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    else if (Control == 6)
                                    {
                                        GC.AddSend(Packets.NPCSay("To change your password please put the old first. Remeber just numbers is permited!"));
                                        GC.AddSend(Packets.NPCLink2("Old Password", 7));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    else if (Control == 7)
                                    {
                                        if (GC.MyChar.WHPassword == ReadString(Data))
                                        {
                                            GC.AddSend(Packets.NPCSay("Now is the new password."));
                                            GC.AddSend(Packets.NPCLink2("New Password", 2));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("Wrong! are you tryin to hack me?"));
                                            GC.AddSend(Packets.NPCLink("No, Sorry!", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    break;
                                }
                            #endregion
02/23/2010 04:21 -Shunsui-#3
Quote:
Originally Posted by Secrets-man View Post
Hmm Says some errors.. about those Linkbacks... Wonder if it would help if I change Linkback to Control
Yeah, Change Linkback to Control Sorry About that

#Updated it, With Control Insted of Linkback
02/23/2010 04:35 hunterman01#4
Quote:
Originally Posted by -Shunsui- View Post
Yeah, Change Linkback to Control Sorry About that

#Updated it, With Control Insted of Linkback
I was going to say why don't you update mysql and make a specific table for it

This way you can (if necessary) recover an accounts bank pw

But 5165 does not have

Sorry buddy i would convert it but im to stoned

HAHA xD
02/23/2010 04:53 -Shunsui-#5
Well I Updated it and made it Save to a Text File Thanks for the HInt, Tommorrow Ill Make You Ware House Password Save And Post it Here rite now Bored and tired,

If Any problems Post here
02/23/2010 06:46 Arcо#6
Dude this code sucks... Seriously go learn to code cause your not doing a decent job.. at all.
Haha you know I'm messing with you jose, great release bud +k!
02/23/2010 19:52 Decker_#7
Jose, this code sucks, no im joking, im just trying to be like arco, cause i wanna be just like him *sarcasm*
but anways, good job man, i will use this code
03/18/2010 10:10 jasonk1980#8
this code locked my inventory and dropped my health to 0 and wouldnt let me by health pots
03/18/2010 12:54 -Shunsui-#9
Quote:
Originally Posted by jasonk1980 View Post
this code locked my inventory and dropped my health to 0 and wouldnt let me by health pots
lol? you did something wrong
03/18/2010 14:44 jasonk1980#10
no i didnt i copied/pasted it and changed linkback to control and that was it
03/18/2010 14:54 -Shunsui-#11
Quote:
Originally Posted by jasonk1980 View Post
no i didnt i copied/pasted it and changed linkback to control and that was it
Well i dont know that caused that, Cause it ddin't do it to me nor anyone else
03/18/2010 14:58 jasonk1980#12
lol i dont know either but ill try it once more and see if it still does it cause i actually removed it last night after i found that problem
03/18/2010 15:05 jasonk1980#13
hmmm i dont know what i did different but i put it in this time and it works so i dont know lol
03/18/2010 20:48 -Shunsui-#14
kk Good, and dont double post please just edit Your Current Post
03/19/2010 16:30 pintser#15
are u copy+paste it in the right place??
this cant be the problem... doubt it...
r u sure u add it in npcdialog.cs