Trying To Give All PCs a reward
Dragonfolk2000
Member Posts: 388
I'm trying to make a multiplayer module and the part I'm struggling with right now is giving the quest reward. It's a short adventure so there isn't much else going on.
When the quest is finished each player is supposed to receive the following: 1000 experience, a special ring, and a unique quest reward. Don't worry about determining the unique quest reward. I'll worry about coding that later. I have something similar working elsewhere.
The problem is I need to be able to give each PC the items. I haven't tested it yet but supposedly the XP reward is working just fine (using the GiveXPToAll function). I'll use module settings to force everyone into the same party.
The way I imagine this working is we make a list (or array?) of the PCs in the party (not their familiars, animal companions, and summons). Then we run a for loop that gives the item rewards listed above (like I said, I've got the unique rewards figured elsewhere). I don't know how to write a list (or array?) and run the for loop. I also don't know how to "get every PC in the party or in the module".
Thank you for reading all this! I appreciate your help!
When the quest is finished each player is supposed to receive the following: 1000 experience, a special ring, and a unique quest reward. Don't worry about determining the unique quest reward. I'll worry about coding that later. I have something similar working elsewhere.
The problem is I need to be able to give each PC the items. I haven't tested it yet but supposedly the XP reward is working just fine (using the GiveXPToAll function). I'll use module settings to force everyone into the same party.
The way I imagine this working is we make a list (or array?) of the PCs in the party (not their familiars, animal companions, and summons). Then we run a for loop that gives the item rewards listed above (like I said, I've got the unique rewards figured elsewhere). I don't know how to write a list (or array?) and run the for loop. I also don't know how to "get every PC in the party or in the module".
Thank you for reading all this! I appreciate your help!
0
Comments
I'm guessing that this code might be run from a conversation with someone who gave you a quest. After completing the quest and talking to them, this script could go on the "Actions Taken" tab of a conversation line.
I noticed that we are setting a local int on the PC. Do those local variables remain on characters who are exported out?
A non-droppable, plot-marked "database item" is an easy way to track quests, whether players have spoken to NPCs or opened unique chests, visited areas, their status with sanity, curses, hunger, disease, kill counts, deaths, etc.