Alright, thanks again for all the help on the fighting system Nick, now my next task is: I'm trying to make some sort of questing thing. I want to be able to reward people with Items, Gold, and Experience. What I have done in the past with the regular Smaug program is have a mob program so if you give the mob something he gives you something in return, but there are too many problems with that, and If I wanted like a level up quest, it would get abused, and I would like to set an amount of times someone could do a quest so I could do a level up quest and limit it once per character. Any suggestions or helpful hints on this one?
Next thing, Quests
Posted by Rok on Sat 30 Jun 2001 08:12 PM — 5 posts, 21,624 views.
You could create another folder called `quests', and structure it the same way as the players directory. Then each player who participates in a quest has a file created for them (which is later modified for subsequent quests).
Then devise some way of storing quest data as well -- I'd suggest a file called `quests' located in the quests directory, but see what others think -- which stores information about all the quests have been run. Give each quest a `quest vnum' as well as other relevant data (type of quest, goal, prize, whatever), and then in the player files of the participants, append the data using the quest vnum and whatever relevant things need to be stored on a per player basis.
If one of your quest types is `onceonly' or some such, then when this quest vnum is started it checks the participants' quest files and if they have already participated in this quest, then they can't participate again.
How's that? You'll have to get someone else to help with coding if you need it, my C skills are weak at best.
Then devise some way of storing quest data as well -- I'd suggest a file called `quests' located in the quests directory, but see what others think -- which stores information about all the quests have been run. Give each quest a `quest vnum' as well as other relevant data (type of quest, goal, prize, whatever), and then in the player files of the participants, append the data using the quest vnum and whatever relevant things need to be stored on a per player basis.
If one of your quest types is `onceonly' or some such, then when this quest vnum is started it checks the participants' quest files and if they have already participated in this quest, then they can't participate again.
How's that? You'll have to get someone else to help with coding if you need it, my C skills are weak at best.
Wow.... Right on, thanks for the advice Mademoiselle!!
All right, I tried several differnet approaches to this. But I'm having trouble seeing the coding for writing something and checking it on a player file. I was going to give a quest catagory in the player files and number the quests but I don't know how to get it to write on the player file (Or read off of it for that matter). I was searching for codes that wrote to it and all that code is kinda overwhelming any ideas?
Characters are saved in save_char_obj in save.c.