[HELP] My attempt to make a rb npc

06/19/2009 09:10 WHITELIONX#16
A question if the name does not exist such as "InventoryContains" there is an option to add this word to the source. My question is should I save these words so that I don`t receive errors in future?
06/19/2009 10:13 kiltz#17
its only a condition to check if the char has a cleanwater on his inventory, but if you don't want those conditions and want to reborn the character depending on the level without any necessary requirements you may exclude that statement on your code.

Its necessary to make a function called "InventoryContains" as you go along the way, it will be helpful for you to save time making code by just calling the functions you made.
06/19/2009 14:27 TheLeGend209#18
Quote:
Originally Posted by quadruple1 View Post
Here is my attempt to create an npc that reborns you

Code:
                case 211091:// Rb Adder
                    {
                        if (LinkBack == 0)
                        {
                            Text("Would you like to be reborn? You need to be level 120 or higher to reborn.", CSocket);
                            Link("1st rb", 1, CSocket);
                            Link("2nd rb", 2, CSocket);
                            Link("No thanks", 225, CSocket);
                            End(CSocket);

                        }
                        else if (LinkBack == 1)
                        {
                            if (CSocket.Client.Reborn == 0)
                            if (CSocket.Client.Level >= 120)
                            {
                                Reborn(+1, CSocket);
                                Level(15, CSocket);
                            }
                            else
                            {
                                Text("You are not high enough level", CSocket);
                                Link("Damn!", 255, CSocket);
                                End(CSocket);
                            }
                        }
                        else if (LinkBack == 2)
                        {
                            if (CSocket.Client.Level >= 120)
                            if (CSocket.Client.Reborn == 1)
                        Reborn(+1, CSocket);
                        Level (15, CSocket);
                        }
                        else
                        {
                            Text("You are not high enough level", CSocket);
                            Link("Damn!", 255, CSocket);
                            End(CSocket);
                        }
                        break;
                    }
Apparently, when i click on the npc and choose the "1st rb" link, it does not make me 1st rb. anyone know what im doing wrong?
Nice Attempt :bandit:
07/05/2009 13:53 0105653642#19
is that working with CoEmu v2
07/05/2009 14:03 kiltz#20
@0105653642

Yes, This thread is CoEmu related source.Actually the code isn't 100 percent done, its actually a fraction of the RB NPC, It only gives you an idea for you to expand.
07/06/2009 10:53 0105653642#21
i try it but i got about 4 errors
Error 1 The name 'InventoryContains' does not exist in the current context G:\Co privet Server\CoEmu v2 shydo\CoEmu v2 GameServer\Handlers\NpcTalk.cs 365 49 CoEmu v2 GameServer
Error 2 'CoEmu_v2_GameServer.Structs.Struct.ItemInfo' does not contain a definition for 'Progress' and no extension method 'Progress' accepting a first argument of type 'CoEmu_v2_GameServer.Structs.Struct.ItemInfo' could be found (are you missing a using directive or an assembly reference?) G:\Co privet Server\CoEmu v2 shydo\CoEmu v2 GameServer\Handlers\NpcTalk.cs 386 77 CoEmu v2 GameServer
Error 3 The name 'Reborn' does not exist in the current context G:\Co privet Server\CoEmu v2 shydo\CoEmu v2 GameServer\Handlers\NpcTalk.cs 413 33 CoEmu v2 GameServer
Error 4 The name 'Level' does not exist in the current context G:\Co privet Server\CoEmu v2 shydo\CoEmu v2 GameServer\Handlers\NpcTalk.cs 414 33 CoEmu v2 GameServer