16-06-2007, 10:13 PM
I definitely shouldn't be able to attack friendly NPCs. The weird thing is, the code has very little to do with NPCs (other than the fact that it's activated by attacking NPCs.
That was the first thing I added. Basically, that says the quest has not been done yet, so the player will be able to continue with the quest. I added something else to the quest editor though. I added a required quest. Basically, it checks the quest for another quest number (and this number must not equal 1, meaning that they must have completed a previous quest to continue this quest)
To do that, I changed the above code to this:
When I tested it, my NPC began attacking me. In fact, the bastard killed me. First thing I did was check to see if I accidentally switched it to attack when attack while I was assigning it a quest number, but he was still friendly. I then removed the "And-Check" so that it looks like the first snip I posted, and I was able to do the quest again, and I couldn't attack the npc.
Does anyone have any clue what might be causing this?
Code:
If GetPlayerQRecordID(Index, QuestID) = 0 Then
That was the first thing I added. Basically, that says the quest has not been done yet, so the player will be able to continue with the quest. I added something else to the quest editor though. I added a required quest. Basically, it checks the quest for another quest number (and this number must not equal 1, meaning that they must have completed a previous quest to continue this quest)
To do that, I changed the above code to this:
Code:
If GetPlayerQRecordID(Index, QuestID) = 0 And GetPlayerQRecordID(Index, Quests(QuestID).RequiredQuest) 0 Then
When I tested it, my NPC began attacking me. In fact, the bastard killed me. First thing I did was check to see if I accidentally switched it to attack when attack while I was assigning it a quest number, but he was still friendly. I then removed the "And-Check" so that it looks like the first snip I posted, and I was able to do the quest again, and I couldn't attack the npc.
Does anyone have any clue what might be causing this?