Jump to content

A little help with a quest script please =)


dmtzcain

Recommended Posts

Hello, my name is David and I’ve been trying to make a simple mod with a quest in it.But I’m stocked.

 

Basically the quest should go something like this:

Get the quest from a specific NPC, who tell the player to go and kill 2 bandits in room A, inside room A there are 2 random bandits for the player to kill.

 

After they are dead, when the player return’s the quest giver point’s out there are now 3 Bandits to kill in the same room.

After killing the last 3 bandits, the quest giver finishes the quest with a reward.

 

What I’ve got by following tutorials is to build the rooms, create “new random bandits (8)” Create a new topic which only displays to the specific NPC and create a journal entry after talking to the NPC.

 

How can I continue from there… I’m lost. I don’t know how to script a “kill” condition nor to place the new bandits inside the same room after the first ones are killed.

 

Could anyone help me?

Please.

 

Thank you =)

Link to comment
Share on other sites

I wouldn't use 'random' (I presume you mean 'random' respawning) bandits, because the best way I know to do this, is to make a new NPC (if you don't want them to look the same, you should make five NPCs), place 'em in the room where you want them to be (place five of the same bandit if you've made just one NPC), then double click 'em and give them unique references, for example "MyBandit1", "MyBandit2" (without the quotes) etc. Make sure you place a checkmark in the 'Persitent reference' (so you can use them in a script) and 'Initially disabled' (so they won't show up untill you want them to) boxes.

 

Next, make a script like this:

ScriptName MyQuestScript

Begin GameMode

If GetStage MyQuest == 10;Set the quest stage to 10 after the 
;player spoke to quest giver

;Enable first two bandits
MyBandit1.Enable
MyBandit2.Enable
SetStage MyQuest 15 
;First two bandits now show up in your room

EndIf

If MyBandit1.GetDead == 1 && MyBandit2.GetDead == 1;Are the first bandits dead?

SetStage MyQuest 20;Player should now speak to quest giver

EndIf

If GetStage MyQuest == 25;Player spoke to quest giver again

;Enable last three bandits
MyBandit3.Enable
MyBandit4.Enable
MyBandit5.Enable
SetStage MyQuest 30
;Last bandits now show up in your room

EndIf

If MyBandit3.GetDead == 1 && MyBandit4.GetDead == 1 && MyBandit5.GetDead == 1;Bandits dead?
;^ That's supposed to be on one line, but I can't fit it on 
;one at the forums

SetStage MyQuest 35;Player can now speak to 
;quest giver for reward

EndIf

End

Make sure this is a 'quest script' (you can select a script type in a dropdown box in the scripts screen) and attach it to you quest. Also make sure that you set the quest stage correctly (using the dialog script box) each time the player spoke to the quest giver, and don't forget to add 'StopQuest MyQuest' to the dialog script box, after the player receives his reward.

 

If you have any questions or get stuck again, just ask and I'll try to help you out.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...