Mirage Source
Quest help - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Quest help (/showthread.php?tid=931)



Quest help - DarkX - 09-05-2007

Ok I found this tutorial for programming a quest system on a MS based forum, can't remember the name and it went out of buisness so anyway. This is server side.

Code:
' :::::::::::::::::::::::::::::::
    ' :: Request a quest packet ::
    ' :::::::::::::::::::::::::::::::
    If Left(LCase(Parse(0)), 12) = "requestquest" Then
        If Player(index).Char(Player(index).CharNum).CurrentQuest > 0 Then
        Select Case Player(index).Char(Player(index).CharNum).QuestStatus
            Case Is = 1
                Call SendDataTo(index, "questmsg" & SEP_CHAR & procQuestMsg(index, Quests(Player(index).Char(Player(index).CharNum).CurrentQuest).StartQuestMsg) & END_CHAR)
            Case Is = 2
            Debug.Print Quests(Player(index).Char(Player(index).CharNum).CurrentQuest).GetItemQuestMsg
                Call SendDataTo(index, "questmsg" & SEP_CHAR & procQuestMsg(index, Quests(Player(index).Char(Player(index).CharNum).CurrentQuest).GetItemQuestMsg) & END_CHAR)
            Case Is = 3
                Call SendDataTo(index, "questmsg" & SEP_CHAR & procQuestMsg(index, Quests(Player(index).Char(Player(index).CharNum).CurrentQuest).FinishQuestMessage) & END_CHAR)
            Case Else
                Call PlayerMsg(index, "You have no quest", White)
            
        End Select
        Else
            Call SendDataTo(index, "questmsg" & SEP_CHAR & "You currently have no quest" & END_CHAR)
        End If
    End If

It highlights the Quests of
Code:
(index, Quests(Player(index).Char(Player
this part and says sub or function not defined, no matter what I do, including creating another quest sub with all the needed info in it; any idea's?


- Ramsey - 09-05-2007

Did you make a QuestRec?

Is procQuestMsg defined? Like, is there a Sub procQuestMsg or Function procQuestMsg?


- Boo - 09-05-2007

Ya I think your missing the QuestRec.


- DarkX - 10-05-2007

Nah I have it on both sides, I figured out what the error was.

Code:
Public Quests(1 To MAX_QUESTS) As QuestRec
This was what was wrong, I typed in
Code:
public Quest(1 to MAX_QUEST) as QuestRec
on the server side.


- Boo - 10-05-2007

Alright cool Smile


- Ramsey - 10-05-2007

It's always the small problems that are hard to find.


- Boo - 10-05-2007

Ya like 1 small letter can ruin all. I always think that the reason its not super fast is because of a mis-spell :p. Like if 1 letter was missing and you added it, it would be like a super mirage and run super fast xD.


- DarkX - 10-05-2007

Yeah missspelling screwed up my Vis inv several times, and the npc, and the PickP system(though that's still not working correctly.) It's really annoying, the tut doesn't explain any way to use the npc's to give the quests so I'm in the middle of figuring that out.


- DarkX - 14-05-2007

Sorry about double posting but I have another issue

Code:
' Make sure they are on the same map
    If IsPlaying(Attacker) Then
        If NpcNum > 0 And GetTickCount > Player(Attacker).AttackTimer + 950 Then
            ' Check if at same coordinates
            Select Case GetPlayerDir(Attacker)
                Case DIR_UP
                    If (MapNpc(MapNum, MapNpcNum).y + 1 = GetPlayerY(Attacker)) And (MapNpc(MapNum, MapNpcNum).x = GetPlayerX(Attacker)) Then
                    If Npc(NpcNum).Behavior  NPC_BEHAVIOR_FRIENDLY And Npc(NpcNum).Behavior  NPC_BEHAVIOR_SHOPKEEPER Then
                        CanAttackNpc = True
                    Else
                    If chkQuest.Value = True Then
                        Call SetCurrentQuest
                        Call StartQuestMsg
                    Else
                        Call PlayerMsg(Attacker, Trim(Npc(NpcNum).Name) & " says: '" & Trim(Npc(NpcNum).AttackSay) & "'", BrightBlue)
                        End If
                    End If
                    End If
it highlights if Chkquest.value and says variable not defined and I've tried about everything I know and still no luck any clues?


- Ramsey - 14-05-2007

Where is this code located? If in a mod you have to state the form.

Code:
frmBlah.Chkquest.Value

If it it's in the form... you never made the Chkquest.


And isn't it supposed to be
Code:
Chkquest.checked
or something like that?


- DarkX - 24-05-2007

The check box is on the npcform and I think I set a quest code on the npcform; but all the quest codes like start finish and checkquestprogression are all in modQuests. So make 'em all like

Code:
If frmNpcEditor.chkQuest.Checked = True Then
                        Call SetCurrentQuest
                        Call StartQuestMsg
Is that what your talking about?


- Ramsey - 24-05-2007

Yes.


Re: Quest help - genusis - 09-06-2007

there is a tutorial for making a quest editor an stuff on elysium it works once you fix the errors.


Re: Quest help - Matt - 09-06-2007

Necro posting. xD

Anything at ES is useless.


Re: Quest help - DarkX - 10-07-2007

I still can't get this stupid thing to let players aquire a quest from a npc, I am actually getting very annoyed with it.


Re: Quest help - Kousaten - 13-08-2007

Necro-post again, but if you haven't fixed it by now there's always the option of hard-coding in the quests. Takes a lot work and isn't as efficient, but at least it gets the job done. Smile