EOSERV Forum > EOSERV > Ananas' Item related Quests (Release)
Topic is locked.
Page: << 1 2 3 >>
Ananas' Item related Quests (Release)
Author Message
Post #36484 Ananas' Item related Quests (Release)

Ananas' Item Related Quests!

Getting started! (What do you need?)

- A brain (Very important. I don't want to explain the whole guide over and over again.)
- Some coding skills. (Don't want people to keep on asking where to place things or how they would be called)
- Common sense (I admit, I'm searching for mine sometimes ;p


Ok so I made this little item related quest system as in;

1.Bob comes talks with a person.
2.Person wants cookies.
3.Person asks if bob wants to bring him some cookies.
4.Bob reply's with;
4A. Yes.
4B. No.
5A. If yes then the person waits untill bob gets the cookies.
5B. Person cries because hes not getting any cookies today.
6A. Bob has the cookies and gives him! Person is happy and rewards bob.
6B. Bob only has 1 cookie. Person rejects.
6C. Bob has not one cookie at all but bob thinks to be clever. Person rejects.

Hope this explain'd something..

The quest.ini later in this guide explains what stuff does.
Also the Quest.cpp does explain how everything goes.

A big thanks to the releaser of the Quest Data! (There lots of people that release quests based on it.)
I think it was Madao who released the packets and data.

Issues:

- Item does get deleted but player needs to relog or drop the item that the quest has deleted.

Thats all, if you find any bugs just post them or something. If you know the fix then fixes are welcome :)

I agree the code (Quest.cpp) Is a but messy, You could clean it up if you want. I'm just releasing the basic :)

**********
Step 1 A
**********

- Creating the config file! -

Go to world.hpp

and place under;

-------------------------
Config formulas_config;
-------------------------

The followed line;

-------------------------
Config quest_config;
-------------------------


Done with world.hpp
****************************************

**********
Step 1 B
**********

Go to world.cpp

And place under;

------------------------
this->formulas_config.Read(static_cast<std::string>(this->config["FormulasFile"]));
------------------------

The followed line;

------------------------
this->quest_config.Read(static_cast<std::string>(this->config["QuestFile"]));
------------------------


Then search for;

---------------------------
this->formulas_config.Read(this->config["FormulasFile"]);
---------------------------

And place under that;

---------------------------
this->quest_config.Read(this->config["QuestFile"]);
---------------------------


Done with world.cpp!
******************************************

*********
Step 1 C
*********

Go to your config.ini located at your trunk folder.

Search for;

---------------------------------------------
## FormulasFile (string)
# File containing stat/combat/class formulas
FormulasFile = ./data/formulas.ini
---------------------------------------------

You could copy and paste this below there;

-----------------------------
## Quest (string)
# Quest handling file
QuestFile = ./data/quest.ini
-----------------------------

No go to your (Data Folder)
and create a quest.ini

And place in the followed details;

https://tehsausage.com/paste/Ananas%20questini

Done with config!
*******************************************

********
Step 2
********

Go to character.cpp

Search for;

---------------------
this->jukebox_open = false;
---------------------

Place under that;

---------------------
this->testQ= 0;
---------------------

Note: Don't ask why its testQ, You can go and waste time changing that idk.

Done with character.cpp!
*******************************************

********
Step 2 B
********

Go to Character.hpp

Search for;

----------------
int usage;
----------------

Place under that;

----------------
int testQ;
----------------

Done with character.hpp!
********************************************

********
Step 3
********

Now go to Quest.cpp

Replace everything with the followed code;

https://tehsausage.com/paste/ananasquestcpp

Done with Quest.cpp!
********************************************

********
Step 4 (Hardest part!)
********

Compile the source!


(What's compiling?)

Compiling basically puts the source together and makes it into a little .exe file :3
The file you double click when you run the server ;D!

(How do I compile?)

You compile by or pressing (If you're using codeblocks) the blue radar looking thing (Sorry if this isn't correct English xD)
Or CTRL + F9. (Could also be F9)

Done with compiling?

Good! Your quests are finished ;D!
********************************************

---
"Pineapples and shit."
13 years, 49 weeks ago
Post #36485 Re: Ananas' Item related Quests (Release)

This isn't a bad attempt at quests. A couple of recommendations though:

Rework the quest call, use the NPC's quest ID as an identifier, not the map ID.

Second, I think a "Switch/Case:" method would be a bit more appropriate in your Quest.cpp. Let me give you a brief example:

Case Use:

switch (questid){

case questid:

switch (queststate) {

case state:

quest dialog

}}

*repeat for quest accept, adding only special cases where warping, rewarding, etc. are handled. Also, you can call the quest state from the character's database entry. In some cases, you will talk to an npc in mid-quest and it will have a different dialog, such as the AW quest. I hope this brief tip is helpful.

13 years, 49 weeks ago
Post #36489 Re: Ananas' Item related Quests (Release)

Script is pretty good, But there isnt a Quest.cpp Is there?

13 years, 49 weeks ago
Post #36491 Re: Ananas' Item related Quests (Release)

Look at step 3 please. Its a link linked to the code.
Or if you mean a Quest.cpp in your source, idk? Depends on which source you use.
Most of the already compiled sources have them like thehispanic's source.

Else you just make a new .cpp named Quest ;D and place them at handlers.

---
"Pineapples and shit."
13 years, 49 weeks ago
Post #36492 Re: Ananas' Item related Quests (Release)

Yea I'm using Rev189 With no Quest. anything Lol. I'll add Quest.cpp


EDIT: Can't figure out how to add Quest.cpp, Any help?

13 years, 49 weeks ago
Post #36493 Re: Ananas' Item related Quests (Release)

Got these 3 Warnings when I compiled it.


||=== eoserv, MYSQL+SQLITE ===|
C:\Documents and Settings\Owner\Desktop\My Rev\src\main.cpp||In function 'int main(int, char**)':|
C:\Documents and Settings\Owner\Desktop\My Rev\src\main.cpp|550|warning: 'active_clients' may be used uninitialized in this function|
C:\Documents and Settings\Owner\Desktop\My Rev\src\map.cpp||In member function 'void Map::LoadArena()':|
C:\Documents and Settings\Owner\Desktop\My Rev\src\map.cpp|278|warning: 's' may be used uninitialized in this function|
C:\Documents and Settings\Owner\Desktop\My Rev\src\scriptreg.cpp|43|warning: 'script_DEBUG' defined but not used|
||=== Build finished: 0 errors, 3 warnings ===|

13 years, 49 weeks ago
Post #36494 Re: Ananas' Item related Quests (Release)

Means it works.

---
"Pineapples and shit."
13 years, 49 weeks ago
Post #36495 Re: Ananas' Item related Quests (Release)

Lol, Script is almost pointless to have, Only cause theres only two quests.


But Just my Opinion. Feature I'll use it, Love ur helpful tutorial.

13 years, 49 weeks ago
Post #36496 Re: Ananas' Item related Quests (Release)

Are you stupid? You can add quests yourself based on the NPC located on the map :/ Learn to read.

---
"Pineapples and shit."
13 years, 49 weeks ago
Post #36497 Re: Ananas' Item related Quests (Release)

:O xD my bad, Of course I can read, What I was reading was very specific enough for me, But. Still I'll wait untill I fix all my commands.

13 years, 49 weeks ago
Post #36539 Re: Ananas' Item related Quests (Release)

@helper, to make a quest.cpp go to codeblocks and then click File and go down to new and click on empty file.Next thing to do is go to your trunk folder(or whatever you named it)then go to your SRC(source) folder and click on handlers then name a new file called Quest.cpp,anotherwindowshouldcome up in codeblocks and it should have the compile setting's like Mysql+sqlite etc click the one that you compiled your source with.Then add ananas's code in for quest.cpp and conitnue the tutorial.


Edit: If anyone need's to add a quest.cpp I suggest you use this tutorial otherwise you will most likely get a lot of error's(this doesn't apply for people who use the hispanic's rev) https://eoserv.net/forum/topic/6939

13 years, 49 weeks ago
Post #36540 Re: Ananas' Item related Quests (Release)

Thank you, If I need anymore assistance, i'll get back to you.


13 years, 49 weeks ago
Post #36557 Re: Ananas' Item related Quests (Release)

Will this work if u got the wiseman Quest in ur source? or will it replace the wiseman quest

---
Fate-Gaming/Forgotten Memories Owner.
13 years, 49 weeks ago
Post #36572 Re: Ananas' Item related Quests (Release)

it will works with the wise man quest


EDIT: it wont work XD i tried it and i wont work

---
opensource isometric game engine ~ www.avac-engine.blogspot.com
13 years, 49 weeks ago
Post #36578 Re: Ananas' Item related Quests (Release)
clive posted: (30th Apr 2010 06:51 am)

it will works with the wise man quest


EDIT: it wont work XD i tried it and i wont work


If I were you I would have tried it first then posted the fact lol.
This script is much better then the wise man.

I suggest using this, I've just gotta figure out how to add more quests /=
13 years, 49 weeks ago
Page: << 1 2 3 >>
Topic is locked.
EOSERV Forum > EOSERV > Ananas' Item related Quests (Release)