Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Quest System + Quest Log - 100% Working


Zamin
 Share

Recommended Posts

SRYyyyyyyyyyyyyyyyy. I have time over this weekend. I will sort out everything. I know whats wrong. Its the stupid .rar extension. It works for a few weeks. Then when you download it says the upload was incomplete from source so you get half the files. Which leads to problems.

I will fix this tomorrow. I don't think I deserve to make anymore promises since I broken all my previous ones. But I will get it done tomorrow. Because tomorrow I won't be going to uni (after a long time i'll be staying home on the weekend).

I will get this done for sure. Thanks for the support. And for the people who sent me so many messages, please visit this topic in a day (or two) and you will get answer to your questions.

-Thanks once again :)
Link to comment
Share on other sites

  • Replies 72
  • Created
  • Last Reply

Top Posters In This Topic

Hello,

This is a full, formal installation guide to the Quest System for Eclipse Stable, as requested. So lets get started. You will noticed many repetitions from the EE installation guide, but this must be done. ;p

A few pics of what your about to get:
[Quest Picture](http://i6.photobucket.com/albums/y220/Zamin/Quest.jpg)
[Quest Log Picture](http://i6.photobucket.com/albums/y220/Zamin/QuestLog.jpg)

Difficulty for adding this script is: 1/5

**About the Quest**
-No need of any sad scripting knowledge, in fact, you do not need to touch coding at all
-Very Newbie friendly
-Everything edited via one (1) '.ini' file
-Option to turn on/off quests without deleting them
-Option to skip from 1 quest to another
-Comes with built-in Quest Log (auto updates, no work required)
-No 'joingame' check; if you edit/add/delete any quest at any point, you do not need the players to re-enter the game. The system will check for any change as soon as they are made.
-Delete one/all quest of a person at any point using one command in game
    -Player name and quest number recognition
    -Player access recognition
-NPC recognition; the system recognizes which NPC is assigned to which quest.
-No limit; you can assign as many quests to a NPC and as many NPCs you like, there is pretty much no limit to what you can add (as far as I checked)
-The only limit is the image of the Quest Log. If you make more than 7-8 quests, you will have to make your Quest Log image bigger, more on this in ReadMe.txt
-*Added new system which allows you to put a level restriction on quest along with give EXP as a reward.

**Some Source Edits**

**Edit 1:** OK, before you even continue, you need to add the following edit:
http://www.touchofdeathforums.com/smf/index.php/topic,51259.0.html
If not, you will get so many custom menu errors, you'll go crazy and jump off a building. No point even reading further if you have not installed this edit. This is a very simple, client side edit. I can give a client upon request for you to download in which I have already installed this edit for you to use.

**Edit 2:** This is a small one, credit goes to Balliztik1 again:
Open Server Source and go to **modGameLogic**
Find:
```
MyScript.ExecuteStatement "Scripts\Main.txt", "ScriptedNPC " & Attacker & "," & NPC(NPCnum).SpawnSecs
```And replace it with:
```
MyScript.ExecuteStatement "Scripts\Main.txt", "ScriptedNPC " & Attacker & "," & NPC(NPCnum).SpawnSecs & "," & MapNpcNum
```You will have to do this for a total of '8' times. Just use the CTRL+F (find) command, replace the line as many time as you see it; there should be 8 of them in total.

Now go to your ScriptedNPC.ess, find:
```
Sub ScriptedNPC(Index, Script)
```And replace it with:
```
Sub ScriptedNPC(index, script, npcSlot)
```

**Edit 3:** This is short and simple. This is necessary for the admin command, done by me btw:
Open Server Source and go do **clsCommands**
Put the following function anywhere in the code:
```
Public Function QuestReset(ByVal Index As Long, ByVal PlayerName As String)
    Dim S() As String
    Dim Length As Integer
    Dim Count As Integer

    Length = 0
    Count = 0

    Open App.Path & "\Accounts\CharList.txt" For Input As #1
    S = Split(Input(LOF(1), 1), vbCrLf)
    Close #1

    Do While Count >= 0
        Length = Len(S(Count))
        If Length = 0 Then
            QuestReset = "EndOfFile"
            Exit Do
        ElseIf S(Count) = PlayerName Then
            QuestReset = S(Count)
            Exit Do
        End If
        Count = Count + 1
    Loop

End Function

```

**Start of Quest Script**

Open **Main.txt**, put the following on very top of the file:
```
#include
```More explanaion on this below.

In: **Events\JoinGame.ess**
Under the line: Call SendWhosOnline(Index)
Put the following:
```
'***********************Begin Initiate Quest***********************
Call InitiateQuest(Index)
'***********************End Initiate Quest***********************

```

In: **Events\MenuScripts.ess**
Under the select case: End Select
Put the following:
```
Case "QuestExtra"
      '***********************Begin Quest***********************
      Dim QuestCount
      Dim IndexCount
      Dim Quest

      QuestCount = 1
      IndexCount = 1

      Do While QuestCount <= Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUESTS", "Amount"))
        If Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "Switch")) = 1 Then
          If Int(GetVar("\Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount)) < 2 Then
            Quest = GetVar("Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount)
            If ElementIndex = 0 Then
              Call CustomMenuClose(Index)
              Exit Do
            ElseIf MenuTitle = "QuestExtra" And ElementIndex = IndexCount+1 And Quest = 0 Then
              Call PutVar("\Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount, 1)
              Call PlayerMsg(Index, GetVar("Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "AcceptMessage"), RED)
              Exit Do
            ElseIf MenuTitle = "QuestExtra" And ElementIndex = IndexCount+2 And Quest = 0 Then
              Call PlayerMsg(Index, GetVar("Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "DenyMessage"), RED)
              Exit Do
            ElseIf MenuTitle = "QuestExtra" And ElementIndex = IndexCount+4 And Quest = 1 Then
              Call QuestExtra(Index)
              Exit Do
            ElseIf MenuTitle = "QuestExtra" And ElementIndex = IndexCount+5 And Quest = 1 Then
              Call PlayerMsg(Index, GetVar("Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "DontHaveItem"), RED)
              Exit Do
            End If
          End If
        End If
        IndexCount = IndexCount + 6
        QuestCount = QuestCount + 1
      Loop
      If (MenuTitle = "QuestExtra") And (ElementIndex = 0 OR ElementIndex = IndexCount+1 OR ElementIndex = IndexCount+2 OR ElementIndex = IndexCount+4 OR ElementIndex = IndexCount+5) Then
        Call CustomMenuClose(Index)
      End If
      '***********************End Quest***********************

      Case "QuestLog"
      '***********************Begin Quest***********************
      If (MenuTitle = "QuestLog" And ElementIndex = 0) Then
        Call CustomMenuClose(Index)
      End If
      '***********************End Quest***********************

```

In: **Events\ScriptedNPC.ess**
Under (in my case, change if you must): Case 2
Put the following:
```
      '***********************Begin Quest***********************
      Dim NPCnum
      Dim QuestCount
      Dim IndexCount
      Dim Amount

      QuestCount = 1
      IndexCount = 1
      Amount = Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUESTS", "Amount"))
      NpcNum = GetMapNPCNumber(GetPlayerMap(index), npcSlot)

      '***********************Begin Initiate Quest***********************
      Call InitiateQuest(Index)
      '***********************End Initiate Quest***********************

      Call CustomMenuClose(Index)
      Call CustomMenuShow(Index, "QuestExtra", "\GUI\CUSTOM\QuestExtra\Menu.gif", 1)
      Call CustomMenuLabel(Index, 0, "Close!", 150, 280, 8, 4, 0, 40, 15)
      Do While QuestCount <= Amount
        If Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "Switch")) = 1 Then
          If Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "NPCNumber")) = Int(NPCnum) Then
            If Int(GetVar("\Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount)) = 0 Then
              If Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "LevelRequired")) > GetPlayerLevel(Index) Then
                Call CustomMenuLabel(Index, 4, GetVar("Scripts\Quests\QuestSystem.ini", "Quest" & QuestCount, "NotEnoughLevel"), 3, 50, 8, 0, 0, 190, 200)
                Exit Do
              End If
              Call CustomMenuLabel(Index, IndexCount, GetVar("Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "Description"), 3, 50, 8, 0, 0, 190, 200)
              Call CustomMenuLabel(Index, IndexCount+1, "Accept Quest!", 3, 260, 8, 5, 0, 78, 15)
              Call CustomMenuLabel(Index, IndexCount+2, "Deny Quest!", 3, 280, 8, 5, 0, 70, 15)
              Exit Do
            ElseIf Int(GetVar("\Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount)) = 1 Then
              Call CustomMenuLabel(Index, IndexCount+3, GetVar("Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "Description2"), 3, 50, 8, 0, 0, 190, 200)
              Call CustomMenuLabel(Index, IndexCount+4, "Yes!", 3, 260, 8, 5, 0, 25, 15)
              Call CustomMenuLabel(Index, IndexCount+5, "Not Yet!", 3, 280, 8, 5, 0, 50, 15)
              Exit Do
            End If
          End If

        End If
        IndexCount = IndexCount + 6
        QuestCount = QuestCount + 1
      Loop
      If Amount = QuestCount - 1 Then
        Call CustomMenuLabel(Index, 4, GetVar("Scripts\Quests\QuestSystem.ini", "QUESTS", "EndOfQuests"), 3, 50, 8, 0, 0, 190, 200)
      End If
      Exit Sub
      '***********************End Quest***********************

```

In: **Events\Commands.ess**
Under (in default main.ess): Case "/warpto" (the entire case, after you see its 'Exit Sub')
Put the following:
```
      '***********************Begin Quest***********************
      Case "/QuestReset"
        If GetPlayerAccess(Index) >= 5 Then
          Dim QuestCount
          Dim PlayerName
          Dim QuestName
          Dim CheckName

          QuestCount = 1
          PlayerName = TextSay(1)
          QuestName = Lcase(TextSay(2))

          CheckName = QuestReset(index, PlayerName)
          If CheckName = "EndOfFile" Then
            Call PlayerMsg(Index, "The player '" & PlayerName & "' does not exit!", RED)
            Exit Sub
          ElseIf QuestName = "all" Then
            Do While QuestCount <= Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUESTS", "Amount"))
              Call PutVar("\Scripts\Quests\QuestDatabase\" & PlayerName & ".ini", "QUESTS", "Quest" & QuestCount, 0)
              QuestCount = QuestCount + 1
            Loop
            Call PlayerMsg(Index, "All quests for player " & PlayerName & " has been reset.", BLACK)
          ElseIf Int(QuestName) > Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUESTS", "Amount")) OR Int(QuestName) = 0 Then
            Call PlayerMsg(Index, "Quest" & QuestName & " does not exist. Perhaps check the 'Amount' of your total quests set in QuestSystem.ini", RED)
          Else
            Call PutVar("\Scripts\Quests\QuestDatabase\" & PlayerName & ".ini", "QUESTS", "Quest" & QuestName, 0)
            Call PlayerMsg(Index, "Quest" & QuestName & " for player " & PlayerName & " has been reset.", BLACK)
          End If
        Else
        Call PlayerMsg(Index, "You do not have enough access to use this command.", BRIGHTGREEN)
      End If
    Exit Sub
    '***********************End Quest***********************

```

In: **Events\HotScript.ess**
Under (in my case, change if you must): Case KEY_PAGEDOWN
Put the following:
```
'***********************Begin Quest Log***********************
      Dim QuestCount
      Dim QuestYCoord
      Dim IndexCount
      Dim Quest

      QuestCount = 1
      QuestYCoord = 50
      IndexCount = 1

      Call CustomMenuClose(Index)
      Call CustomMenuShow(Index, "QuestLog", "\GUI\CUSTOM\QuestExtra\QuestLog.gif", 1)
      Call CustomMenuLabel(Index, 0, "Close!", 150, 280, 8, 4, 0, 40, 15)
      Do While QuestCount <= Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUESTS", "Amount"))
        Quest = GetVar("Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount)
        If Quest = 1 Then
          Call CustomMenuPicture(Index, IndexCount, "\GUI\CUSTOM\QuestExtra\Quest" & QuestCount & "Accepted.gif", 3, QuestYCoord)
          QuestYCoord = QuestYCoord + 25
        ElseIf Quest = 2 Then
          Call CustomMenuPicture(Index, IndexCount+1, "\GUI\CUSTOM\QuestExtra\Quest" & QuestCount & "Completed.gif", 3, QuestYCoord)
          QuestYCoord = QuestYCoord + 25
        End If
        IndexCount = IndexCount + 2
        QuestCount = QuestCount + 1
      Loop
      Exit Sub
      '***********************End Quest Log***********************

```

**Godlords Main 9.12.25**

Note that this Quest System requires Godlords Main 9.12.25 (which comes with Eclipse Stable). You will need to change something. There is a bug which Godlord forgot to fix. Please do the following do fix it.

In: **\Server\Scripts\Modules\Inventory.ess**
In Function: **AddPlayerInvStackableItem**
Replace This:
```
[code]Call SetPlayerInvItemValue(Index, Slot, Amount)[/code]
```With This
```
Call SetPlayerInvItemValue(Index, Slot, GetPlayerInvItemValue(Index, Slot) + Amount)
```This is because you don't want to overwrite the current amount with your specified amount. You want to add to it.

**End of Quest Script**

Almost done, just a bit more:
-Download **QuestExtra.rar**, unzip it and put the entire folder in the following directory: **\Client\GUI\CUSTOM**
-Make a folder called **Quests** in the following directory: **\Server\Scripts**
-Make another folder called **QuestDatabase** in the following directory: **\Server\Scripts\Quests**
-Download **CQS.ess** and place it where your Main.ess is located: **\Server\Scripts**
-Download **QuestSystem.ini** and place it in the following directory: **\Server\Scripts\Quests**
-Download the **ReadMe.txt** file to learn how to use the system

Make sure you get these steps right. If the script isn't working, make sure you didn't make a mistake somewhere copying-pasting it, otherwise the script works 100% for me.

Below is a link to basic Eclipse Stable with Question System already installed. I downloaded the most updated ES and installed the QuestSystem on it. This means everything is aleady done for you. All the VB source edits and all the SadScript addons. I suggest if you are having problems installed the script, download this and take a look at this. Or if your starting to make your own game and want a Quest System, download this and see if you like it.

An explanation on how to function the Quest System is in the ReadMe.txt file. Please do read it before running the script.

As for credits, all credits of the script go to me. Some credits, if any, go to the people who have answered my questions in the shout box, especially AR and Balliztik1\. xD
Give credits if you want to, I will won't beg. If you do want to give credits, put it where people can actually see it. No point putting my name in Main.ess.

[Click Here to Download Eclipse Stable with QuestSystem Installed](http://rapidshare.com/files/356795369/QuestSystem.rar) - RapidShare
[Click Here to Download Eclipse Stable with QuestSystem Installed](http://www.megaupload.com/?d=JYJPWY4J) - MegaUpload
-Please host file if you can

-Thanks for reading.
Link to comment
Share on other sites

@Toxikr3:

> Are the links posted at the bottom updated?
>
> Also thanks for taking the time to explain a bit more!
>
> -Toxikr3

By the bottom update you mean the one i just posted, then yes. Here is the link to that update for the heck of it, lol http://www.touchofdeathforums.com/smf/index.php/topic,51512.msg613417.html#msg613417

So all the updated links, or pretty much anything you might need for the ES version of the system is provided in that topic. Please let me know if you or anyone else faces a problem.

-Thanks
Link to comment
Share on other sites

Sorry but I get the same problem with server.vbp

I run it, with nothing changed, and it gives me a timed event error and loads up the server, but gives the timed event error every second or so.

Its not a problem for me right now, since I won't be needing to source edit the server but it could be a problem later on.

Do you know what might be wrong?

-Toxikr3
Link to comment
Share on other sites

  • 5 weeks later...
@Toxikr3:

> Sorry but I get the same problem with server.vbp
>
> I run it, with nothing changed, and it gives me a timed event error and loads up the server, but gives the timed event error every second or so.
>
> Its not a problem for me right now, since I won't be needing to source edit the server but it could be a problem later on.
>
> Do you know what might be wrong?
>
> -Toxikr3

Check your \Server\Scripts Folder. 
Re-Extract your "Main.ess" and "Events" folder.
Link to comment
Share on other sites

@Toxikr3:

> Sorry but I get the same problem with server.vbp
>
> I run it, with nothing changed, and it gives me a timed event error and loads up the server, but gives the timed event error every second or so.
>
> Its not a problem for me right now, since I won't be needing to source edit the server but it could be a problem later on.
>
> Do you know what might be wrong?
>
> -Toxikr3

Look in Main.ess, in TimedEvent Sub.
Link to comment
Share on other sites

  • 3 weeks later...
Would it be possible/easy to make the quest have its own gui button? Instead of opening up by pressing Page up or w.e like having it so that there's a button saying "Quests" you click on and it opens it? For ES 1.2 btw.
Link to comment
Share on other sites

  • 4 weeks later...
I have the quest i want created, have quest 1 and 2 disabled, have total quests set to 3, but i dont know how to assign the quest to an NPC. What would i do? Would i have to edit the scripted NPC to run it or what?

ES, downloaded from this thread.
Link to comment
Share on other sites

  • 3 weeks later...
Hello,

Guys, I have exams, I wish I can spend some time to solve your unique problems. But everything is in readMe.txt file. Just follow instructions and you will be fine. If you still have problems post here, if not someone I will eventually come and help you out. Sorry for this.

-Thanks
Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...
  • 4 weeks later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...