Create a free account to remove all ad content.

Author Topic:  Lets build a Quest  (Read 3055 times)

0 Members and 1 Guest are viewing this topic.

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Lets build a Quest
« on: July 31, 2014, 10:54:27 PM »
In this topic I want to build a full quest, with multiple objectives, multiple quest items and a final reward.

Post an objective you'd like to see in the quest.

I will implement the scripts in the test version using the new commands and post them here as working examples. So every script you see me post here is tested and working.

The purpose of this topic is to show how complex quests can be created in the game using the upcoming script commands.
« Last Edit: August 01, 2014, 08:53:50 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Re: Lets build a Quest
« Reply #1 on: July 31, 2014, 10:54:33 PM »
Quest: Mother of all Quests (moaq)

Starting point: Talk to Bob

Quest requirement: Mining Level 20, Attack Level 25.
« Last Edit: August 01, 2014, 06:21:08 AM by Craig »

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Re: Lets build a Quest
« Reply #2 on: July 31, 2014, 10:54:38 PM »
Quest Start Point

To start the quest, the player talks to the Bob NPC, who will give the player details about the quest and what to do next.

Step 1: Put an NPC of your choice somewhere. Prospect the NPC block and enter a name and dialogue for the NPC. I will name the NPC Bob.

Step 2:
Script: Quests\MOAQ\StartQuest
Code: [Select]
1: if
2:    HasHistory [moaq complete] [player]
3: then
4:    settext [576,201,514] [Greetings hero.]
5: Elseif
6:    HasHistory [moaq] [player]
7: then
8:    settext [576,201,514] [Good luck [gamertag]!]
9: Elseif
10:    HasSkill [mining] [>=] [20]
11:    HasSkill [attack] [>=] [25]
12: then
13:    settext [576,201,514] [Hello there [gamertag]. I have an adventure for you. A valuable relic has been lost. Find it, become a hero, and reap a reward! To start, enter the dungeon to the west, near Diggers Canyon. Good luck.]
14:    History [moaq] [player]
15:    Marker [Diggers Canyon] [606,511]
16:    Waypoint [606,511]
17: else
18:    settext [576,201,514] [What are you looking at?]

* If the player has already completed the quest, Bob will say "Greetings hero".
* If the player has already started the quest (by talking to Bob), Bob will say "Good luck [gamertag]!".
* If the player is talking to Bob for the first time and meets the quest requirements, Bob will say: "Hello there [gamertag]. I have an adventure for you. A valuable relic has been lost. Find it, become a hero, and reap a reward! To start, enter the dungeon to the west, near Diggers Canyon. Good luck!"
* Otherwise if the player does not meet the quest requirements, Bob will say "What are you looking at".

Line 14 flags the player as having started the Mother of all Quests (MOAQ) quest.
Line 15 adds a Diggers Canyon marker to the map to aid the player in finding the dungeon.
Line 16 sets the players waypoint to the dungeon.



Step 3: Prospect the Bob NPC spawner. Select "Quests\MOAQ\StartQuest" for the Talk script. This will cause the script to be executed when a player opens Bob's speech bubble. Here is the spawner setup:





Step 4: Create the following reset script. It is a good idea to have a reset script ready while you are building a script based quest, so that you can reset the quest for testing from the start as needed.

Script: Quests\MOAQ\Reset
Code: [Select]
1: History [moaq] [delete] [player]
2: History [moaq stage1] [delete] [player]
3: History [moaq complete] [delete] [player]
4: Marker [Diggers Canyon] [delete]
5: Waypoint [delete]

--------------------------------------------------------------------------------------------------------------

Objective 1 Diggers Canyon - Conmaan Dungeon

The player must acquire an item to continue the quest. The item is a GreenstoneGold Battle Axe. To do this the player must talk to the Guard at the entrance of the dungeon, and follow his instructions. The player must enter one of the dungeon lairs and kill the waves of Zombies until one of the zombies drops a Greenstone Gold Battle axe and the player picks it up. The dungeon lairs are protected by toll doors. The player must pay the toll to enter the lair. Once the player has the battle axe, they should exit the lair and talk to the guard again.

At the dungeon entrance is a Guard NPC. Here is his talk script.

Script: Quests\MOAQ\DungeonGuard
Code: [Select]
1: if
2:    HasHistory [moaq complete] [player]
3: then
4:    settext [615,205,518] [Greetings hero.]
5: Elseif
6:    HasHistory [moaq stage1] [player]
7: then
8:    settext [615,205,518] [I see you have acquired the Battle Axe. Go and talk to Father Ted at the church.]
9: Elseif
10:    HasHistory [moaq] [player]
11: then
12:    settext [615,205,518] [Welcome [gamertag]. You are on the Mother of all Quests. Enter either lair and fight until you acquire a Greenstone BattleAxe. Each lair has a toll for entry. Good luck!
13: else
14:    settext [615,205,518] [Welcome to my dungeon adventurer]

* line 1 - 4 tests if the player has already completed the quest and just gives a general greeting if so
* line 5 - 8 tests if the player has already acquired the quest item (and therefor must have started the quest) and gives the player new instructions for the next stage. The player must talk to the Guard after acquiring the item to activate this.
* line 9 - 12 tests if the player has started the quest and gives instructions is so
* Otherwise the player is not on the quest and is treated as a general adventurer.



Inside the dungeon are two toll doors. For simplicity I've used a simple teleport system, you could invent far more sophisticated doors. When you step on the lair entry plate a script is run that checks if you have the toll, and if so, the toll is paid to the guards chest and you are teleported inside the lair. For brevity I will only show Lair 1 scripts here.

Run this script via a pressure plate or whatever mechanism you want as the door threshold.

Script: Quests\MOAQ\DungeonLair1Entry
Code: [Select]
1: if
2:    HasInventory [player] [goldpieces] [>=] [100]
3: then
4:    Inventory [player] [615,206,516] [move] [goldpieces] [100]
5:    teleport [player] [618,205,523]
6:    Notify [Toll paid. Use the plate to exit.]
7:    Script [Quests\MOAQ\DungeonLair1SpawnWave]
8: else
9:    Notify [You do not have the required toll]

* line 2 checks the player has the required toll. if he doesn't the script falls to line 9 and notifies.
* line 4 moves the toll from the players inventory to the Guards chest.
* line 5 teleports the player inside the lair
* line 7 executes the script to spawn a wave of zombies



Script: Quests\MOAQ\DungeonLair1SpawnWave
Code: [Select]
1: History [moaq lair1 kill count] [delete] [player]
2: SpawnMob [623,205,520] [zombie] [kill=Quests\MOAQ\DungeonLair1MobKill] [loot=[greenstonegoldbattleaxe,1,5][chance,1,95]]
3: SpawnMob [623,205,520] [zombie] [kill=Quests\MOAQ\DungeonLair1MobKill] [loot=[greenstonegoldbattleaxe,1,5][chance,1,95]]
4: SpawnMob [623,205,520] [zombie] [kill=Quests\MOAQ\DungeonLair1MobKill] [loot=[greenstonegoldbattleaxe,1,5][chance,1,95]]
5: SpawnMob [623,205,520] [zombie] [kill=Quests\MOAQ\DungeonLair1MobKill] [loot=[greenstonegoldbattleaxe,1,5][chance,1,95]]
6: SpawnMob [623,205,520] [zombie] [kill=Quests\MOAQ\DungeonLair1MobKill] [loot=[greenstonegoldbattleaxe,1,5][chance,1,95]]
7: SpawnMob [623,205,520] [zombie] [kill=Quests\MOAQ\DungeonLair1MobKill] [loot=[greenstonegoldbattleaxe,1,5][chance,1,95]]
8: SpawnMob [623,205,520] [zombie] [kill=Quests\MOAQ\DungeonLair1MobKill] [loot=[greenstonegoldbattleaxe,1,5][chance,1,95]]
9: SpawnMob [623,205,520] [zombie] [kill=Quests\MOAQ\DungeonLair1MobKill] [loot=[greenstonegoldbattleaxe,1,5][chance,1,95]]
10: SpawnMob [623,205,520] [zombie] [kill=Quests\MOAQ\DungeonLair1MobKill] [loot=[greenstonegoldbattleaxe,1,5][chance,1,95]]
11: SpawnMob [623,205,520] [zombie] [kill=Quests\MOAQ\DungeonLair1MobKill] [loot=[greenstonegoldbattleaxe,1,5][chance,1,95]]

First the script resets the players kill count. This is reset at the start of every wave so the kill script can determine if all 10 zombies in the wave have been killed so that it can spawn another wave. Next the script spawns a wave of 10 zombies. They have a customized loot table. 5% chance of dropping a greenstone gold battle axe, and 95% chance of a standard drop. Each zombie also has a kill script which is executed when you kill it. The kill script is the one that tests if the wave has been finished and spawns another wave, among other things. I haven't varied the spawn coords here, but you would probably want to, otherwise they all spawn on top of each other.



Script: Quests\MOAQ\DungeonLair1MobKill
Code: [Select]
1: History [moaq lair1 kill count] [player]
2: If
3:    HasHistory [moaq lair1 kill count] [player] [>=] [10]
4: then
5:    Notify [Prepare for the next wave]
6:    Wait [3000]
7:    Script [Quests\MOAQ\DungeonLair1SpawnWave]
8: endif
9: if
10:    HasInventory [player] [greenstonegoldbattleaxe]
11:    HasHistory [moaq stage1] [player] [false]
12: then
13:    History [moaq stage1] [player]
14:    Notify [[gamertag] you have the quest item. Go and talk to the Guard again.]
15: endif

* line 1 increments the players kill count
* line 3 tests if the player has 10 (or more) kills
* line 5 - 7 notifies a warning and spawns a new wave after a 3 second delay
* line 10 - 11 tests if the player has acquired the quest item for the first time. because this test is outside the first if block, it is tested every time a zombie is killed
* line 13 flags and notifies the quest item as acquired. The player must now go back and talk to the guard for the instructions on the next stage of the quest 'talk to Father Ted'.

--------------------------------------------------------------------------------------------------------------
« Last Edit: August 01, 2014, 09:33:27 PM by Craig »

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Re: Lets build a Quest
« Reply #3 on: July 31, 2014, 10:54:46 PM »
.

Gary

  • Tester
  • Supreme Member
  • *
  • Posts: 2942
  • Steam: Conmaan ... ... Discord: Conmaan #9586
    • View Profile
Re: Lets build a Quest
« Reply #4 on: July 31, 2014, 11:00:20 PM »
Okay, well, for Tater and I's upcoming origins map we want the game to be wave based. A certain number of zombies are released at the begining of each wave as well as throughout the wave.

If a player has opened certain doors then zombies will be released in the next area rather than the original area.

It would be nice if the waves automatically started. If not, thats fine.

Edit: I may have read the OP wrong. Am I supposed to suggest an entirely new quest or suggest further objectives for the quest you already have?

Edit #2: At some point in the quest, can there be an example script shown of what I described above, with purchasable doors and a way for the script to detect which door has been opened, and therefore choose where to place the mobs.
« Last Edit: August 01, 2014, 12:14:13 AM by Conmaan »


               

Link to my youtube channel:
https://www.youtube.com/channel/UCo4rmelSOUB9YMM0Is-zWyQ

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Re: Lets build a Quest
« Reply #5 on: July 31, 2014, 11:58:28 PM »
or suggest further objectives for the quest you already have?
This please. It doesn't really matter what it is, just something that you'd like to see how it might be created.

Gary

  • Tester
  • Supreme Member
  • *
  • Posts: 2942
  • Steam: Conmaan ... ... Discord: Conmaan #9586
    • View Profile
Re: Lets build a Quest
« Reply #6 on: August 01, 2014, 12:01:00 AM »
This please. It doesn't really matter what it is, just something that you'd like to see how it might be created.

I'll modify my post to better fit the quest you have going, but I'll wait until you finish first ::)


               

Link to my youtube channel:
https://www.youtube.com/channel/UCo4rmelSOUB9YMM0Is-zWyQ

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Re: Lets build a Quest
« Reply #7 on: August 01, 2014, 12:10:45 AM »
I'll modify my post to better fit the quest you have going, but I'll wait until you finish first ::)
I won't be finished anytime soon, this topic is a continuous work in progress, added to as people request.

Gary

  • Tester
  • Supreme Member
  • *
  • Posts: 2942
  • Steam: Conmaan ... ... Discord: Conmaan #9586
    • View Profile
Re: Lets build a Quest
« Reply #8 on: August 01, 2014, 12:14:48 AM »
I won't be finished anytime soon, this topic is a continuous work in progress, added to as people request.

Okay, I edited my original post (again). Hopefully this rolls with what youre saying.


               

Link to my youtube channel:
https://www.youtube.com/channel/UCo4rmelSOUB9YMM0Is-zWyQ

crazytater94

  • Supreme Member
  • *
  • Posts: 2649
  • Mastering TM since 2011
    • View Profile
  • Xbox: crazytater94
  • PSN: crazytater94 (Inactive)
  • Steam: crazytater94
Re: Lets build a Quest
« Reply #9 on: August 01, 2014, 12:21:23 AM »
I'm assuming that you want suggestions of quest parts to add necessary scripts that a quest would need, is this correct?