Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 09:57

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[GUIDE]Making Quest LOTF. Hey Look is Me, Yea. Good Guide,Basic, SO PRO!

Discussion on [GUIDE]Making Quest LOTF. Hey Look is Me, Yea. Good Guide,Basic, SO PRO! within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2009
Posts: 149
Received Thanks: 22
[GUIDE]Making Quest LOTF. Hey Look is Me, Yea. Good Guide,Basic, SO PRO!

Hello again Elite Pvpers.
This is for LOTF.
I want to show you how to creat your own basic quest.
Lets look on the steps we are going through:
1. Making the steps for the quests
2. Making it save to database everytime go to next step
3. Making the npc's for the quest

PLEASE READ EVERYTHING I HAVE WRITTEN CAUSE IS IMPORTANT IF YOU DONT WANT ERROR

Well there is those 3 steps.
Thats much huh? thats right.
Is not that hard to creat a quest.
Actually it is, but for basic noob quest is not.
Well lets go to the first step.

Step1: Making the quest steps
Open your character.cs
First you have to find this:
Code:
        public byte Stamina = 0;
Okay under it you can make your steps for your quest.
Lets make an easy quest and call it Test.
Okay add under the steps for quest.
Here is an example:
Code:
        public uint QuestTestStart = 0;
        public uint QuestTestGetReward = 0;
        public uint QuestTestEnd = 0;
Now you have to make it save for everytime you
clear step.
Search for:
Code:
   public void Save()
Over it you will have to put the save.
It have to be like this.
The redcoloured spots are where you put the steps name.
Code:
        public void [COLOR="Red"]QuestTestStart[/COLOR]()
        {
            LastSave = DateTime.Now;
            if (MyClient.There)
                if (MyClient.Online)
                {
                DataBase.Save[COLOR="Red"]QuestTestStart[/COLOR](this);    
                DataBase.SaveChar(this);
                }
        }
        public void [COLOR="Red"]QuestTestGetReward[/COLOR]()
        {
            LastSave = DateTime.Now;
            if (MyClient.There)
                if (MyClient.Online)
                {
                DataBase.Save[COLOR="Red"]QuestTestGetReward[/COLOR](this);    
                DataBase.SaveChar(this);
                }
        }
        public void [COLOR="Red"]QuestTestEnd[/COLOR]()
        {
            LastSave = DateTime.Now;
            if (MyClient.There)
                if (MyClient.Online)
                {
                DataBase.Save[COLOR="Red"]QuestTestGetEnd[/COLOR](this);    
                DataBase.SaveChar(this);
                }
        }
Step2: Saving to Database
Now we need to make it save to database.
Open database.cs and search for:
Code:
public static void SaveChar(Character Charr)
Now you need to make a part for each things to save.
If you know what i mean.
Well do it like this.
You have to put it over.
The red parts is for changing the name of quest step.
Why is it needed that it save the certain steps, well thats
because then you cant go back in the quest and do the same step again and
also you cant do the quest mroe then once.
Code:
        public static void [COLOR="Red"]SaveQuestTestStart[/COLOR](Character Charr)
        {
            MySqlCommand Command = null;
            Command = new MySqlCommand("UPDATE `Characters` SET `[COLOR="Red"]QuestTestStart[/COLOR]` = '" + Charr.[COLOR="Red"]QuestTestStart[/COLOR] + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
            Command.ExecuteNonQuery();
        }
    }
        public static void [COLOR="Red"]SaveQuestTestGetReward[/COLOR](Character Charr)
        {
            MySqlCommand Command = null;
            Command = new MySqlCommand("UPDATE `Characters` SET `[COLOR="Red"]QuestTestGetReward[/COLOR]` = '" + Charr.[COLOR="Red"]QuestTestGetReward[/COLOR] + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
            Command.ExecuteNonQuery();
        }
    }
        public static void [COLOR="Red"]SaveQuestTestEnd[/COLOR](Character Charr)
        {
            MySqlCommand Command = null;
            Command = new MySqlCommand("UPDATE `Characters` SET `[COLOR="Red"]QuestTestEnd[/COLOR]` = '" + Charr.[COLOR="Red"]QuestTestEnd[/COLOR] + "' WHERE `Account` = '" + Charr.MyClient.Account + "'", Connection);
            Command.ExecuteNonQuery();
        }
    }
Now search for:
Code:
DataRow DR = DSet.Tables["Character"].Rows[0];
Under this you have to make the saving in database.
You have to make it like this:
The red spots are for changing the steps name.
Code:
 Charr.[COLOR="Red"]QuestTestStart[/COLOR] = (uint)DR["Save[COLOR="Red"]QuestTestStart[/COLOR]"];
 Charr.[COLOR="Red"]QuestTestGetReward[/COLOR] = (uint)DR["Save[COLOR="Red"]QuestTestGetReward[/COLOR]"];
 Charr.[COLOR="Red"]QuestTestEnd[/COLOR] = (uint)DR["Save[COLOR="Red"]QuestTestEnd[/COLOR]"];
Okay now we have finished the half of the quest.
Now we need to make it ingame.
What will it say?
We have to make the NPC.
Wow already step3.
Yeah you right, is done quickly right?

Step3: The NPC's
This is a quiet hard and can take long time to make it work.
But lets take it 1 step by 1 step, so
all can understand.

First you have to choose how many npc's to make.
For every NPC you will need to have 1 step.
More info about that look my release for the Quest:
BraveHeart, because im using 4 NPC's in that.
Well in this test quest i only have choosed to make 2 NPC, so
here we go.

First we have to make the steps for it.
so it says different things all after how long in quest you are.
You should set it up like this:
NPC1:
Code:
                            if (CurrentNPC == 25706)//Quest NPC1
                            {
                                if (MyChar.QuestTestGetReward == 1 && MyChar.InventoryContains(721165, 1))//For getting reward, when have the item
                                {
                                    {
                                        MyChar.RemoveItem(MyChar.ItemNext(721165));//Removing the needed item
                                        SendPacket(General.MyPackets.NPCSay("What ever it says, when give the item."));
                                        SendPacket(General.MyPackets.NPCLink("Get Reward.", 1));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                                else if (MyChar.QuestTestEnd == 1)//If have cleard quest
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You have already cleard the quest, you can't clear it 2 times."));
                                        SendPacket(General.MyPackets.NPCLink("I see.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                            }
                                else
                                {
                                if (MyChar.QuestTestStart == 0)//If have not started the quest
                                {
                                    SendPacket(General.MyPackets.NPCSay("What ever the NPC says to tell what the quest is about."));
                                    SendPacket(General.MyPackets.NPCLink("Accepting quest.", 3));
                                    SendPacket(General.MyPackets.NPCLink("Not Accepting quest.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                else if (MyChar.QuestTestStart == 1)//When quest is started
                                {
                                    SendPacket(General.MyPackets.NPCSay("What ever the NPC says if you ahve started the quest."));
                                    SendPacket(General.MyPackets.NPCLink("Accepting to go clear it.", 255));
                                    SendPacket(General.MyPackets.NPCLink("Trashing task.", 2));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                            }
Controls:
Code:
                            if (CurrentNPC == 25706)//Quest NPC1
                            {
                                if (Control == 1)//For getting reward
                                {
                                    if (MyChar.QuestTestGetReward == 1)
                                    {
                                        MyChar.QuestTestEnd += 1;
                                        MyChar.QuestGetReward += 1;
                                        MyChar.AddItem("720028-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));//The reward
                                        MyChar.SaveQuestTestEnd();
                                        MyChar.SaveQuestTestGetReward();
                                    }
                                }
                                if (Control == 2)//For trashing quest
                                {
                                    if (MyChar.QuestTestEnd == 1)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("What ever it says when trying thrash a cleard quest."));
                                        SendPacket(General.MyPackets.NPCLink("I see.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                 }
                                 else
                                 {
                                        MyChar.QuestTestGetReward -= 1;
                                        MyChar.QuestTestStart -= 1;
                                        MyChar.SaveQuestTestGetReward();
                                        MyChar.SaveQuestTestStart()
                                 }
                                if (Control == 3)//For accepting the quest
                                {
                                        MyChar.QuestTestStart += 1;
                                        MyChar.SaveQuestTestStart();
                                        SendPacket(General.MyPackets.NPCSay("What ever it says you have to do."));
                                        SendPacket(General.MyPackets.NPCLink("OK.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                }
                            }
Now we have made the first NPC for the quest. Now we only need 1 more NPC.
This NPC isn't as big as the other 1.
The next NPC only do this:
•Taking item required
•Giving another item taht you have to bring to NPC1
•Saving your quest to next step
Thats not much, right?
Okay lets go.

Here is how you can make it:
Code:
                            if (CurrentNPC == 25707)//Quest NPC2
                            {
                                if (MyChar.QuestTestStart == 1)
                                {
                                    {
                                if (MyChar.InventoryContains(723234, 1))//The item that is required
                                {
                                        MyChar.RemoveItem(MyChar.ItemNext(723234));//Removing the item
                                        SendPacket(General.MyPackets.NPCSay("What ever it says when you give the item."));
                                        SendPacket(General.MyPackets.NPCLink("You answer.", 1));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                  }
                                }
                                else//If dont have the item or dont have started the quest
                                    {
                                        SendPacket(General.MyPackets.NPCSay("What ever it says if you dont have the item or havent started the quest."));
                                        SendPacket(General.MyPackets.NPCLink("I see.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                            }
Controls:
Code:
                            if (CurrentNPC == 25707)//Quest NPC2
                            {
                                if (Control == 1)
                                {
                                        MyChar.QuestTestGetReward += 1;
                                        MyChar.QuestTestGetReward();
                                        MyChar.AddItem("721165-0-0-0-0-0", 0, (uint)General.Rand.Next(36457836));//The item to give NPC1
                                        SendPacket(General.MyPackets.NPCSay("What ever it says when you have to give the new item to the NPC1."));
                                        SendPacket(General.MyPackets.NPCLink("Okay.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                  }
                                }
AWSOME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!
You have now made your own quest, how cool is that?
That is pretty cool huh?
For more advanced quest you have to know some C#, well
to know some more you should read hybrids guide for programming and also what
you should know before making a private server.
both have links here:



PRESS THANKS IF YOU LIKE IT, I KNOW YOU LIKE IT CAUSE IM SEXY!!
THERE SHOULDNT BE ANY PROBLEMS IF YOU AHVE FOLLOWED THE GUIDE.
THIS IS DIFFENTLY A 5* GUIDE
#*=DarkAngeL=*# is offline  
Thanks
1 User
Old 11/13/2009, 07:37   #2
 
elite*gold: 80
Join Date: Sep 2007
Posts: 642
Received Thanks: 168
All that is needed is the npc scripts, the rest is really easy. The only thing i would use is the npc script
Santa is offline  
Old 11/13/2009, 11:56   #3
 
elite*gold: 0
Join Date: Aug 2008
Posts: 889
Received Thanks: 199
Good job DarkAngel :P.
zbest is offline  
Thanks
1 User
Old 11/13/2009, 11:57   #4
 
elite*gold: 20
Join Date: Aug 2009
Posts: 254
Received Thanks: 28
You should move onto a different source, Like CoEmu or Tanels 5119
LookBehindYou is offline  
Old 11/13/2009, 17:27   #5
 
damianpesta's Avatar
 
elite*gold: 0
Join Date: Jan 2007
Posts: 1,034
Received Thanks: 58
Quote:
Originally Posted by LookBehindYou View Post
You should move onto a different source, Like CoEmu or Tanels 5119
lol you dont realize how bad 5119 tanel's source is.
damianpesta is offline  
Old 11/13/2009, 18:18   #6
 
CurseOfExcalibur's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 151
Received Thanks: 28
Quote:
Originally Posted by damianpesta View Post
lol you dont realize how bad 5119 tanel's source is.
And do you realize that you're in no position to judge someone's work?
CurseOfExcalibur is offline  
Old 11/13/2009, 19:02   #7
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Quote:
Originally Posted by damianpesta View Post
lol you dont realize how bad 5119 tanel's source is.
Not having actually used the 5119 source I can't judge it but it seems unlikely that it would be coded worse than lotf...

Or are you saying the source is bad because it's missing features?

</offtopic/derail>
pro4never is offline  
Old 11/14/2009, 00:57   #8
 
elite*gold: 0
Join Date: Nov 2009
Posts: 149
Received Thanks: 22
Quote:
Originally Posted by StarBucks View Post
All that is needed is the npc scripts, the rest is really easy. The only thing i would use is the npc script
You can not use the NPC script without the database.cs and character.cs script?
Hallo?
They can keep make the quest then.


Quote:
Originally Posted by LookBehindYou View Post
You should move onto a different source, Like CoEmu or Tanels 5119
Im not gonna use those sources at the moment.
Maybe later
#*=DarkAngeL=*# is offline  
Old 11/14/2009, 01:13   #9
 
elite*gold: 0
Join Date: Nov 2009
Posts: 159
Received Thanks: 27
Nice job bro :P keep it up
MexicanoCoder is offline  
Thanks
1 User
Old 11/14/2009, 02:52   #10
 
elite*gold: 0
Join Date: Nov 2009
Posts: 149
Received Thanks: 22
#REMOVED
#*=DarkAngeL=*# is offline  
Old 11/14/2009, 07:49   #11
 
elite*gold: 0
Join Date: Nov 2009
Posts: 149
Received Thanks: 22
Quote:
Originally Posted by MexicanoCoder View Post
Nice job bro :P keep it up
Thanks man
#*=DarkAngeL=*# is offline  
Old 12/23/2009, 17:42   #12
 
renetjuuh's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 97
Received Thanks: 9
if you are making an new npc . how can i make an id that i neet to put into the npc.txt like this one 1153 6520 2 63 1351 489 372.
renetjuuh is offline  
Old 12/23/2009, 18:11   #13
 
renetjuuh's Avatar
 
elite*gold: 0
Join Date: Jul 2008
Posts: 97
Received Thanks: 9
if you are making an new npc . how can i make an id that i neet to put into the npc.txt like this one 1153 6520 2 63 1351 489 372.
renetjuuh is offline  
Old 12/23/2009, 18:39   #14
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
Quote:
Originally Posted by CurseOfExcalibur View Post
And do you realize that you're in no position to judge someone's work?
And Why is that? It's probably even worse than the Original LOTF.
PeTe Ninja is offline  
Reply


Similar Threads Similar Threads
Need Help With Farm Guide or Money Gold Making Guide !!! Thx Every1
08/27/2011 - Metin2 - 4 Replies
I have a SIMPLE question : How can I make 3.5kk to 5kk aday in metin2 ? Can some give me a HINT,TIPS,GUIDE how to make some gold ??? PLS and thx the BEST ANSWER WILL RECIEVE my 3x thanks from me and my friends account !!! also thx for all any1 that give me an idea ....
Can someone point me to a good guide to making a server?
09/15/2010 - CO2 Private Server - 7 Replies
Okay, There are so many guides on here and a lot of them people say do not work can someone point me to one that does please? I want one that has the newer items and doesn't run on hamachi if possible. Thank you in advance.
LOTF Source Guide
07/02/2009 - CO2 PServer Guides & Releases - 151 Replies
Official Unofficial Guide for the LOTF Source. Server Info: - Database: MySQL - Language: C# - Client: v 5016 Required Programs:
LOTF Source Guide
07/20/2008 - CO2 Guides & Templates - 5 Replies
Opps, comp was acting up when I posted this, please go to this link for the guide: http://www.elitepvpers.com/forum/co2-main-discussi ons-questions/150327-lotf-source-guide.html - Super



All times are GMT +1. The time now is 09:57.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.