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

[EO] Quest system - edited


Qazek
 Share

Recommended Posts

NEW WORKING VERSION!!! I think that XD

It's my quest system. If you don't have choice you can use it but it's very very bad quest system XD

CLIENT SIDE

Download attachments and replace in source client folder

It's a new NPC Editor if you don't have npc spell casting system you can delete this frame with scrollbars and labels XD I think you know what I said but I'm not good in english xD

Search this:

```
Private Type NpcRec
```
Add to this type:

```
    QuestNum As Long
    QuestLevel As Long
    QuestReqItem As Long
    QuestReqItemHowMany As Long
    QuestRewItem As Long
    QuestRewItemHowMany As Long
    QuestMsg1 As String * 250
    QuestMsg2 As String * 250
    QuestMsg3 As String * 250
    QuestMsg4 As String * 250
```
Search:
```
Public Const NPC_BEHAVIOUR_GUARD As Byte = 4
```
Add:
```
Public Const NPC_BEHAVIOUR_QUEST As Byte = 6
```
Search in NPCEditorInit in modGameEditors:
```
.txtEXP.text = Npc(EditorIndex).EXP
```
Add:
```
        .txtQuestNum.text = Npc(EditorIndex).QuestNum
        .txtQuestLevel.text = Npc(EditorIndex).QuestLevel
        .txtQuestReqItem.text = Npc(EditorIndex).QuestReqItem
        .txtQuestReqMany.text = Npc(EditorIndex).QuestReqItemHowMany
        .txtQuestRewItem.text = Npc(EditorIndex).QuestRewItem
        .txtQuestRewMany.text = Npc(EditorIndex).QuestRewItemHowMany
        .txtMsg1.text = Trim$(Npc(EditorIndex).QuestMsg1)
        .txtMsg2.text = Trim$(Npc(EditorIndex).QuestMsg2)
        .txtMsg3.text = Trim$(Npc(EditorIndex).QuestMsg3)
        .txtMsg4.text = Trim$(Npc(EditorIndex).QuestMsg4)
```
Ok now SERVER SIDE

Search:

```
Private Type NpcRec
```
Add to this type:

```
    QuestNum As Long
    QuestLevel As Long
    QuestReqItem As Long
    QuestReqItemHowMany As Long
    QuestRewItem As Long
    QuestRewItemHowMany As Long
    QuestMsg1 As String * 250
    QuestMsg2 As String * 250
    QuestMsg3 As String * 250
    QuestMsg4 As String * 250
```
Search:
```
Public Const NPC_BEHAVIOUR_GUARD As Byte = 4
```
Add:
```
Public Const NPC_BEHAVIOUR_QUEST As Byte = 6
```
Find in CanAttackNPC:

```
                    If Npc(NpcNum).Behaviour <> NPC_BEHAVIOUR_FRIENDLY And Npc(NpcNum).Behaviour <> NPC_BEHAVIOUR_SHOPKEEPER Then
```
Change to this:

```
                    If Npc(NpcNum).Behaviour <> NPC_BEHAVIOUR_FRIENDLY And Npc(NpcNum).Behaviour <> NPC_BEHAVIOUR_SHOPKEEPER And Npc(NpcNum).Behaviour <> NPC_BEHAVIOUR_QUEST Then
```
You will find below:
```
                        CanAttackNpc = True
                    Else
```
under this paste:

```
                        If Npc(NpcNum).Behaviour = NPC_BEHAVIOUR_QUEST Then
                            If Npc(NpcNum).QuestLevel <= GetPlayerLevel(Attacker) Then
                                If GetVar("data\quest\" & GetPlayerName(Attacker) & ".ini", "QUEST", "Quest" & Npc(NpcNum).QuestNum) = 0 Then
                                    Call PlayerMsg(Attacker, Npc(NpcNum).QuestMsg1, Yellow)
                                    Call PutVar("data\quest\" & GetPlayerName(Attacker) & ".ini", "QUEST", "Quest" & Npc(NpcNum).QuestNum, 1)
                                Exit Function
                                End If

                                If GetVar("data\quest\" & GetPlayerName(Attacker) & ".ini", "QUEST", "Quest" & Npc(NpcNum).QuestNum) = 1 Then
                                If HasItem(Attacker, Npc(NpcNum).QuestReqItem) Then
                                    Call PlayerMsg(Attacker, Npc(NpcNum).QuestMsg2, Yellow)
                                    Call TakeInvItem(Attacker, Npc(NpcNum).QuestReqItem, Npc(NpcNum).QuestReqItemHowMany)
                                    Call GiveInvItem(Attacker, Npc(NpcNum).QuestRewItem, Npc(NpcNum).QuestRewItemHowMany)
                                    Call PutVar("data\quest\" & GetPlayerName(Attacker) & ".ini", "QUEST", "Quest" & Npc(NpcNum).QuestNum, 2)
                                    Exit Function
                                Else
                                    Call PlayerMsg(Attacker, Npc(NpcNum).QuestMsg3, Yellow)
                                End If
                                End If

                                If GetVar("data\quest\" & GetPlayerName(Attacker) & ".ini", "QUEST", "Quest" & Npc(NpcNum).QuestNum) = 2 Then
                                    Call PlayerMsg(Attacker, Npc(NpcNum).QuestMsg4, Yellow)
                                Exit Function
                                End If
                            Else
                                Call PlayerMsg(Attacker, "You don't have required level!", Yellow)
                            End If
                        End If
```
Search:

```
            ' exit out early
            If IsSpell Then
                If Npc(NpcNum).Behaviour <> NPC_BEHAVIOUR_FRIENDLY And Npc(NpcNum).Behaviour <> NPC_BEHAVIOUR_SHOPKEEPER Then
                    CanAttackNpc = True
                    Exit Function
                End If
            End If
```
Change to this:

```
            ' exit out early
            If IsSpell Then
                If Npc(NpcNum).Behaviour <> NPC_BEHAVIOUR_FRIENDLY And Npc(NpcNum).Behaviour <> NPC_BEHAVIOUR_SHOPKEEPER And Npc(NpcNum).Behaviour <> NPC_BEHAVIOUR_QUEST Then
                    CanAttackNpc = True
                    Exit Function
                End If
            End If
```

Search this in AddChar:
```
        ' set starter equipment
        For n = 1 To 5
            Player(Index).Inv(n).Num = Class(ClassNum).StartItem(n)
            Player(Index).Inv(n).Value = Class(ClassNum).StartValue(n)
        Next
```
Add under this:

```
        For n = 1 To 100
            Call PutVar("data\quest\" & GetPlayerName(Index) & ".ini", "QUEST", "Quest" & n, 0)
        Next
```
Ok now in data folder in server add new folder "quest"
Link to comment
Share on other sites

  • Replies 95
  • Created
  • Last Reply

Top Posters In This Topic

@Lunar1LTK:

> Wow..thats it? Hm..wow..haha. Maybe he should atleast add..killing quests? Even though I guess you could make it so the npc drops something everytime but stil…

Do it yourself. He just released the system he created for himself.
Link to comment
Share on other sites

I will, I was auctally thinking of getting all the fixes for Eclipse Origins together, a guild and party system, quest system, enemy health bars and text and release. Im thinking about it though, might just keep it for Valkyrie Online, and release Eclipse Origins with all the fixes. But yeah, looks like Ill just edit this to my needs. Thanks guys.
Link to comment
Share on other sites

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...