Alright I have a little quest system, it works like so; you start the game with a variable called talk, which is at 0. everytime you talk to an NPC, talk rises. if talk ==1 then you can do a quest, but once it rises you cannot do it again, which is good. but everytime you kill an enemy you get +1 to your quest, a variable. my first quest, if you get 10 quest(the variable), your quest is subtracted by 10 then the quest is completed. what worries me is that you get +1 quest EVERY NPC you kill, which doesn't work with the quest. any better systems?
|
Code\Quest.dm:19:error: usr.quest1: undefined var that is what I get. |
That's what you get for copy pasting. Don't copy paste, study what people give you so you actually learn how to do it.
|
fixed it, shouldve been mob/var. but when i right click the npc to talk, nothing happens
|
Use:
set src in oview(1) // Only people next to the NPC can talk to him. I think it was like that. |
mob/var |
then i get
loading RPGStarter.dme |
when I indent it,
loading RPGStarter.dme |
You're indenting it wrong. First delete the line, re-write it without ani indentation and then press tab to indent it.
|
I'll fix it for you this time, but next time be sure to read the DM Guide.
mob/QuestNPC |
wait, he talks, i had to edit the variable to 0. Now, how do I assign a certain monster to kill?
|
Filthynate, I believe all of your programming issues can be solved here. Although, I suggest reading the whole thing.
|
I can't think of any other way to have it other than to define different quest variables for your different quests.
So instead of just 'quest +1', you would have to define: quest1, quest2, quest3, etc.
For example: (This is very similar to what I use)
This is assuming you need 10 *particular* NPC (not just any NPC) kills for that quest.
Edit: For some reason, the word "on" in the variables in the code are being changed to "disabled".
Not exactly sure why, but the variables that say "disabledquestX" should say "onquestX".