Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Quest help (from m:rpge)
#1
Attempted to rip quests out of m:rpge, all started working nice. Quests saved/loaded, quest data attached to Npcs saved/loaded aswell. 'Cept one thing, i can't seem to trigger any quests.
So.. heres what I got basically,
Code:
' Check for an npc
        For i = 1 To MAX_MAP_NPCS
            If MapNpc(GetPlayerMap(index), i).Num > 0 Then
                If MapNpc(GetPlayerMap(index), i).X = X And MapNpc(GetPlayerMap(index), i).y = y Then
                
                   If Npc(MapNpc(GetPlayerMap(index), i).Num).QuestID > 0 Then
                        Call StartQuest(index, Npc(MapNpc(GetPlayerMap(index), i).Num).QuestID)
                    End If

Code:
Sub StartQuest(ByVal index As Long, ByVal QuestID As Long)
    If Player(index).Char(Player(index).CharNum).CurrentQuest = QuestID And Player(index).Char(Player(index).CharNum).QuestStatus = 2 Then
        FinishQuest (index)
        Exit Sub
    End If
    If (SetCurrentQuest(index, QuestID, Player(index).Char(Player(index).CharNum)) = True) Then
        Call SendQuestMessage(index, Quests(QuestID).StartQuestMsg)
    End If
End Sub

Anyone wanna help me out here whats wrong or why they arent being trigged would be appreciated
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)