16-06-2008, 11:10 PM
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,
Anyone wanna help me out here whats wrong or why they arent being trigged would be appreciated
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