Forbidden-Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Quest tutorial made by robby

2 posters

Go down

Quest tutorial made by robby Empty Quest tutorial made by robby

Post by demonlord5000 Thu Nov 24, 2016 2:10 pm

He originally made this for me, but I feel like others could benefit too so I'm posting it here.

Code:
################Robby's Tutorial Quest Writing Take One.#################################

There are several things you need to know in the Quest Writing side of Private Servers.

For starters, you'll need to know the right Actions & Rules for it all.
States can be made easily.
So here's a quick way to learn quest writing.

Step #1: Coming up with a Quest Name / Idea
For beginners, it's always best to do something small and simple.
But for people having trouble with Notepad++ / EO+ Quest Writing
It's easy to get used to once you know it, but in that case lets start.

So here's a quick idea for the NPC quest ID # and Name.

Main         <---- Main brings out the whole point of the quest, following it to the "Quest Name"
{ <----- This opens the state / main function that allows the quest to skip to the next chapter
    questname      "Testing Quest" <------ This is the Quest Name (Obviously)
   version         1.0  <----- And of course, this is the Quest Version (I always put it as version 1, even if i re-write a quest.)
} <---- This function here is to "Close" the state, allowing yourself to goto the next scene.

Step #2: Now that's done, we come up with ways of making this quest active and easy to follow
So i'll be using Pjedro as this tutorial which his Quest ID is #1, as in the very first quest npc in EO.

state Begin <------ Begins the very first state in Every single quest, it's important to place Begin in every quest you write.
{
    action     AddNpcText(1, "Hello, my name is Pjedro, and i have a serious problem"); <------- As you can see, at the beginning i placed "action" which allows the NPC to talk to you, Everytime you make an NPC talk always add these "" into it.
   action     AddNpcInput(1,1, "I don't care");  <---- This is from the original Main series, all of the "Reset" functions started with the very first thing you can say to the NPC.
   action     AddNpcInput(1,2, "What's wrong!"); <---- This is also from the original Main series, as you can say "Yes" or "Continue" the quest.
   rule       InputNpc(1)goto Reset     <---- this is for the "AddNpcInput(1,1,)" to Reset the quest once chosen.
   rule       InputNpc(2)goto Continue <----- Of course this is to continue the quest, (But you can name it whatever you want to continue it, it's just a example.)
}

Step #3: "Thinking of something to do" Either Find a certain item, or Kill a certain NPC, With your choice of the amount, So it'll basically look like this. (Remember this is an example, it doesn't have to be this exact way)

state Continue
{
    desc    "Kill 20 sheeps"
   action     ShowHint("Quest Reward: 1250 exp and 1000 gold!") <---- This will show the hint at the bottom of your GUI where it shows "you joined a party" or "Soul has left the party"
   rule       KilledNpcs(170,20)goto Pjedro  <----- This rule is a valueable one, If you want it done by killing ONLY Npc's, just use this rule, but also use any NPC / Amount you want given.
}

Step #4: "Returning to Pjedro" now this is where you'll return to Pjedro, to either talk about another task he wants you to do, or just get your reward from there.


Step#5: "Get Reward" This is the "Get Reward" version of this quest.

state Pjedro
{
    desc     "Talk to Pjedro"
   action     AddNpcText(1, "Thank you! i really appreciate your hard work!");
   rule       TalkedToNpc(1)goto GetReward <---- This rule is to say you have spoken to this NPC, and making the rule as "GetReward" will finish the quest.
}

Step #6: "GetReward" This is how you work the "GetReward" state.

state GetReward
{
    action    ShowHint("You gained 1250 exp and 1000 gold!")
   action    GiveExp(1250);
   action    PlaySound(17); <--- This sound is the original sound it plays after doing a quest, or joining a party like.
   action    GiveItem(1,1000);
   action    End(); <--- End's the quest without Repeat
}

Step #7: The "Reset" state.
As we discussed on Step #2 this rule
"rule       InputNpc(1)goto Reset" is used for this part of the quest.

After finishing the "state GetReward" slot, after that add this under the "GetReward" state.

state Reset
{
    action    Reset(); <--- this will trigger the function of all those "AddInputNpc" slots you set as a "Reset" function
}

Step #8: The "Continue" part of the quest.
As in Step #6 we described the "GetReward" state after killing only 20 sheep, here's how to make the quest longer.

state Pjedro
{
    desc     "Talk to Pjedro"
   action     AddNpcText(1, "Phew, glad that's over with.");
   action     AddNpcText(1, "Now, i want you to do one more thing for me.");
   action     AddNpcText(1, "I need you to kill these rats inside of my house");
   action     AddNpcInput(1,1, "Do it yourself");
   action     AddNpcInput(1,2, "I'm on it!");
   rule       InputNpc(1)goto Reset
   rule       InputNpc(2)goto KillTheRats
}

Step #9: Now the "KillTheRats" statement, is simple. it's like the first task "Kill 20 sheeps", except, this time you're killing 10 rats.

state KillTheRats
{
    desc    "Kill 10 rats"
   rule     KilledNpcs(2,10)goto Pjedro2
}

Step #10: Nothing really to tell in Step #10, It's basically like step #6 just return to Pjedro and talk to him either to end the quest there, or make it longer. (You already know what to do!)
Now listed Below is how both Quests would look.


Kill 20 Sheeps and End the Quest Version.

Main
{
    questname      "Testing Quest"
   version         1.0
}

state Begin
{
    action     AddNpcText(1, "Hello, my name is Pjedro, and i have a serious problem");
   action     AddNpcInput(1,1, "I don't care");
   action     AddNpcInput(1,2, "What's wrong!");
   rule       InputNpc(1)goto Reset
   rule       InputNpc(2)goto Continue
}
state Continue
{
    desc    "Kill 20 sheeps"
   action     ShowHint("Quest Reward: 1250 exp and 1000 gold!")
   rule       KilledNpcs(170,20)goto Pjedro
}
state Pjedro
{
    desc     "Talk to Pjedro"
   action     AddNpcText(1, "Thank you! i really appreciate your hard work!");
   rule       TalkedToNpc(1)goto GetReward
}
state GetReward
{
    action    ShowHint("You gained 1250 exp and 1000 gold!")
   action    GiveExp(1250);
   action    PlaySound(17);
   action    GiveItem(1,1000);
   action    End();
}
state Reset
{
    action   Reset();
}


Extend the Quest Version

Main
{
    questname      "Testing Quest"
   version         1.0
}

state Begin
{
    action     AddNpcText(1, "Hello, my name is Pjedro, and i have a serious problem");
   action     AddNpcInput(1,1, "I don't care");
   action     AddNpcInput(1,2, "What's wrong!");
   rule       InputNpc(1)goto Reset
   rule       InputNpc(2)goto Continue
}
state Continue
{
    desc    "Kill 20 sheeps"
   action     ShowHint("Quest Reward: 1250 exp and 1000 gold!")
   rule       KilledNpcs(170,20)goto Pjedro
}
state Pjedro
{
    desc     "Talk to Pjedro"
   action     AddNpcText(1, "Phew, glad that's over with.");
   action     AddNpcText(1, "Now, i want you to do one more thing for me.");
   action     AddNpcText(1, "I need you to kill these rats inside of my house");
   action     AddNpcInput(1,1, "Do it yourself");
   action     AddNpcInput(1,2, "I'm on it!");
   rule       InputNpc(1)goto Reset
   rule       InputNpc(2)goto KillTheRats
}
state KillTheRats
{
    desc    "Kill 10 rats"
   rule     KilledNpcs(2,10)goto Pjedro2
}
state Pjedro2
{
    desc    "Talk to Pjedro"
   action    AddNpcText(1, "Thank you so much!, take this as an reward!");
   rule      TalkedToNpc(1)goto GetReward
}
state GetReward
{
    action    ShowHint("You gained 1250 exp and 1000 gold!")
   action    GiveExp(1250);
   action    PlaySound(17);
   action    GiveItem(1,1000);
   action    End();
}
state Reset
{
    action   Reset();
}


If you have any questions, Let me know. and i'll gladly help ya.

Also, if you prefer to see it in a better format, I'll also add a link to download via eqf file. To view the file you'll need notepad++, but if you want the actual language in notepad++ then look up EO+ guide by apollo.

Important note: all actions and rules should be spaced exactly 3 times! Couldn't show a perfect format on the forum example.

Will upload when the forum lets me.

EDIT: No worries, this post had been edited by Soul, as demon gave me permission to do so.
Here's the downloadlink he's uploaded for you to see the eqf file in Notepad++ OR Quest Writer.exe
Click Me
demonlord5000
demonlord5000
Admin
Admin

Posts : 2
Realm Gold : 6
Reputation : 0
Join date : 2016-11-24
Age : 35
Location : Tennessee

Back to top Go down

Quest tutorial made by robby Empty Re: Quest tutorial made by robby

Post by Soul Thu Nov 24, 2016 2:27 pm

Edited the topic for ya, made it abit more cleaner looking than using the spoiler. :p
Soul
Soul
Founder
Founder

Posts : 8
Realm Gold : 17
Reputation : 0
Join date : 2016-09-29
Age : 29
Location : Canada

http://forbidden-realm.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum