npcdialog (5018)

07/31/2010 22:55 Fish*#1
does this look right for npc dialog?
(arco's)
Code:
                case 333333://test id
                    {
                        if (Client.Money >= 100)
                        {
                            dialog(Client, new string[] {
                            "AVATAR 30",
                            "TEXT You got 100Silvers",
                            "OPTION-1 Do you want it?",
                            "OPTION-2 You dont need them"
                        });
                        }
                        else
                        {
                            dialog(Client, new string[] {
                            "AVATAR 30",
                            "TEXT You need 10silvers",
                            "OPTION-2 Okay"
                        });
                        }
                        if (OptionID == 1)
                        {
                            Client.Money -= 100;
                            dialog(Client, new string[] {
                            "AVATAR 30",
                            "TEXT Yes",
                            "OPTION-1 Here u are"
                        });
                        }
                        break;
                    }
07/31/2010 23:11 Arcо#2
Looks pretty correct, might as well test and find out.
08/01/2010 02:25 killersub#3
Quote:
Originally Posted by .Arco View Post
Looks pretty correct, might as well test and find out.
that's quite a unique style of Npc Dialogs .Arco :)
08/01/2010 02:33 kinshi88#4
Quote:
Originally Posted by killersub View Post
that's quite a unique style of Npc Dialogs .Arco :)
It's Hybrids.


You're checking for the money everytime, when you only need to the first time.
Code:
                case 333333://test id
                    {
                        switch (OptionId)
                        {
                            case 0:
                                if (Client.Money >= 100)
                                {
                                    dialog(Client, new string[] {
                                        "AVATAR 30",
                                        "TEXT You got 100Silvers",
                                        "OPTION-1 Do you want it?",
                                        "OPTION-2 You dont need them"
                                    });
                                }
                                else
                                {
                                    dialog(Client, new string[] {
                                        "AVATAR 30",
                                        "TEXT You need 10silvers",
                                        "OPTION-2 Okay"
                                    });
                                }
                                break;
                            case 1:
                                Client.Money -= 100;
                                dialog(Client, new string[] {
                                    "AVATAR 30",
                                    "TEXT Yes",
                                    "OPTION-1 Here u are"
                                });
                                break;
                        }
                    }
08/01/2010 02:52 killersub#5
Quote:
Originally Posted by kinshi88 View Post
It's Hybrids.


You're checking for the money everytime, when you only need to the first time.
Code:
                case 333333://test id
                    {
                        switch (OptionId)
                        {
                            case 0:
                                if (Client.Money >= 100)
                                {
                                    dialog(Client, new string[] {
                                        "AVATAR 30",
                                        "TEXT You got 100Silvers",
                                        "OPTION-1 Do you want it?",
                                        "OPTION-2 You dont need them"
                                    });
                                }
                                else
                                {
                                    dialog(Client, new string[] {
                                        "AVATAR 30",
                                        "TEXT You need 10silvers",
                                        "OPTION-2 Okay"
                                    });
                                }
                                break;
                            case 1:
                                Client.Money -= 100;
                                dialog(Client, new string[] {
                                    "AVATAR 30",
                                    "TEXT Yes",
                                    "OPTION-1 Here u are"
                                });
                                break;
                        }
                    }
oh! lol forgot about dat :)...anyways I meant unique as in different from all da NpcDialogs lol :O
08/01/2010 03:05 Fish*#6
Quote:
Originally Posted by kinshi88 View Post
It's Hybrids.


You're checking for the money everytime, when you only need to the first time.
Code:
                case 333333://test id
                    {
                        switch (OptionId)
                        {
                            case 0:
                                if (Client.Money >= 100)
                                {
                                    dialog(Client, new string[] {
                                        "AVATAR 30",
                                        "TEXT You got 100Silvers",
                                        "OPTION-1 Do you want it?",
                                        "OPTION-2 You dont need them"
                                    });
                                }
                                else
                                {
                                    dialog(Client, new string[] {
                                        "AVATAR 30",
                                        "TEXT You need 10silvers",
                                        "OPTION-2 Okay"
                                    });
                                }
                                break;
                            case 1:
                                Client.Money -= 100;
                                dialog(Client, new string[] {
                                    "AVATAR 30",
                                    "TEXT Yes",
                                    "OPTION-1 Here u are"
                                });
                                break;
                        }
                    }
Thanks for helping me with it :)