Mammon Admin
Posts : 159 Join date : 2010-08-23
| Subject: Quest Areas Sat Aug 28, 2010 5:15 pm | |
| does anyone know how to make an area enterable only if the pc has a certain quest? i'm not sure where to begin on this, perhaps an onenter script for a trigger or an onuse script for a door that checks the journal and then jumps the pc to the correct area? | |
|
Mammon Admin
Posts : 159 Join date : 2010-08-23
| Subject: Re: Quest Areas Sat Aug 28, 2010 5:17 pm | |
| i think i can do something along the lines of
if GetJouranlEntry = x, then allow entry and port to area, if not = x, then send message oPC (you do not have this quest)...
right? | |
|
Miqu
Posts : 6 Join date : 2010-08-24
| Subject: Re: Quest Areas Sun Aug 29, 2010 10:26 am | |
| (Message deleted by user)
Last edited by Miqu on Wed Jun 29, 2011 7:06 am; edited 1 time in total | |
|
Miqu
Posts : 6 Join date : 2010-08-24
| Subject: Re: Quest Areas Sun Aug 29, 2010 10:49 am | |
|
Last edited by Miqu on Wed Jun 29, 2011 7:06 am; edited 1 time in total | |
|
Mammon Admin
Posts : 159 Join date : 2010-08-23
| Subject: Re: Quest Areas Mon Aug 30, 2010 12:53 pm | |
| Alright so I guess I'll just ignore the ez transition stuff it does and jump pcs to waypoints inside quest areas.
interestingly enough i could also jump them to non-quest areas that mimic the quest areas when they don't have the quest... hm... this could be fun. | |
|
Mammon Admin
Posts : 159 Join date : 2010-08-23
| Subject: Re: Quest Areas Sun Sep 05, 2010 9:15 am | |
| - Quote :
- void main()
{ object oPC = GetLastOpenedBy(); //the pc using the door/waypoint object oEntry = OBJECT_SELF; //the object the variables are stored on, in this case itself string sDest = GetLocalString(oEntry, "QuestObj"); //get string of destination from object storing variables. object oDest = GetObjectByTag(sDest); string sQuest = GetLocalString(oEntry, "QuestTag"); //tag of quest int nJour = GetJournalEntry(sQuest, oPC); //gets the progress along the quest path thus far
if (nJour == 1) { AssignCommand(oPC, JumpToObject(oDest)); AssignCommand(oEntry, ActionCloseDoor(oEntry)); return; } string sPortMess = GetLocalString(oEntry, "PortMess"); SendMessageToPC(oPC, sPortMess); } This is the end result of the quest area work. The PC opens the door, the script calls the variables for the destination from the door itself, as well as the quest tag from the door itself, checks to make sure the pcs have the quest and the proper progression (in my test case if they killed the main creature, then left the area, they could not return - which may be changed to just make sure it's less than the completed state, not sure yet)... if everything lines up the pc gets teleported to the quest area. if not, the pcs get a message from a variable stored on the door. Could be anything from "You have no business in the cellar" to "The guard stops you from entering the gate" to whatever. anyways, fun times :-) | |
|