[Help] Need Help at a NPC code

06/17/2010 16:55 _MaryJuana#1
hello,

i made a daily quest at my private server and i wanted to know if its possible to set it up that the quest only can be made 3 times each day. Does anyone know how to code that? would be nice to get some answers and the second thing is that i want to make a npc which gives new players a "special pack" which they can only claim one time.

ps. im working with version 5017

ty anyways :)
06/17/2010 17:14 .Summer#2
give me an example on a npc, then ill make the special packet thing.
I just dont remember the sendpakcet thing.
06/17/2010 17:28 _MaryJuana#3
here: xD

Code:
                        if (CurrentNPC == 9004)
                        {
                            SendPacket(General.MyPackets.NPCSay("Hello. Do you want to be a part of our Conquer Event?! Just go outside TwinCity and fight against Pheasants. They will drop White, Red, and Pink Roses. Come back if you got the Roses and i will make 99Roses for Lily!"));
                            SendPacket(General.MyPackets.NPCLink("OK. cool", 1));
                            SendPacket(General.MyPackets.NPCLink("Nope", 2));
                            SendPacket(General.MyPackets.NPCSetFace(30));
                            SendPacket(General.MyPackets.NPCFinish());
                        }
Code:
                        if (CurrentNPC == 9004)
                        {
                            if (Control == 1)
                            {
                                if (MyChar.InventoryContains(723453, 1))
                                if (MyChar.InventoryContains(723454, 1))
                                if (MyChar.InventoryContains(723455, 1))
                                        {
                                            MyChar.RemoveItem(MyChar.ItemNext(723453));
                                            MyChar.RemoveItem(MyChar.ItemNext(723454));
                                            MyChar.RemoveItem(MyChar.ItemNext(723455));
                                            MyChar.AddItem("723459-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));
                                            SendPacket(General.MyPackets.Vital(MyChar.UID, 30, MyChar.CPs));
                                        }
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("Sorry, I think you forgot something!."));
                                            SendPacket(General.MyPackets.NPCLink("Ohh I see.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                            }
                        }
06/17/2010 17:34 .Summer#4
nevermind about.
use this as reference to it :D
[Only registered and activated users can see links. Click Here To Register...]
06/17/2010 17:52 _MaryJuana#5
i try it now but the word DataBase is wrong =/
06/17/2010 18:03 .Summer#6
make sure to check if you use internaldatabase, externaldatabase or database
06/17/2010 18:08 _MaryJuana#7
i can use internet and external database but which one should i use lol?xD
06/17/2010 18:25 .Summer#8
change DataBase to what you use.
just check any other database uses in source.
do they use Internal, External etc.

ex. the code use DataBase.
Other codes in ur source use ExternalDataBase.
Change DataBase to ExternalDataBase