Posted by: jastey
« on: October 04, 2010, 03:22:23 PM »
This is what I am planning for the next release. in short: Added reply options so quests can be finished if talked to Scar too soon, make Duke Elhan wait so the PC can finish the Scar quests if accidentally talking to him, and extending the Sewer quest not only with the daughter's body (current UB material) but also by making the ring a unique item. Any comments welcome, especially if you see code that might need improving.
EDIT: The text will be proofread, of course. Edit away.
REPLACE_STATE_TRIGGER %tutu_var%ARKION 6 ~Global("HelpArkion","GLOBAL",1)~
REPLACE %tutu_var%ARKION
IF ~Global("HelpArkion","GLOBAL",0)
PartyHasItem("%tutu_var%MISC80")~ THEN BEGIN 3
SAY @0
IF ~PartyHasItem("%tutu_var%MISC80")~ THEN DO ~SetGlobal("HelpArkion","GLOBAL",1) TakePartyItem("%tutu_var%MISC80") GivePartyGold(250) AddexperienceParty(1800)~ EXIT
END
END
APPEND %tutu_var%ARKION
IF WEIGHT #0 ~Global("HelpArkion","GLOBAL",0)
PartyHasItem("%tutu_var%MISC79")~ THEN BEGIN EitherBody
SAY @0
IF ~PartyHasItem("%tutu_var%MISC79")~ THEN DO ~SetGlobal("HelpArkion","GLOBAL",1) TakePartyItem("%tutu_var%MISC79") GivePartyGold(250) AddexperienceParty(1800)~ EXIT
END
IF WEIGHT #0 ~Global("HelpArkion","GLOBAL",0)
PartyHasItem("UBFEBODY")~ THEN BEGIN NobleBody
SAY @16
IF ~~ THEN EXIT
END
END
/* Extentions of the Scar quest regarding playability:
- if the PC declines to say his name or to work for Scar at the bridge, he can now do so when he sees Scar in front of the FF headquarters.
-talking to Eltan directly won't kill Scar's quests: The PC has the choice to finish his work for Scar, first. Eltan's quest will work as usual when Scar brings the PC to him.
*/
/* LORD ELTAN
If the PC talked to Lord Eltan directly, Scar will disappear and all his quests will be lost. Not any more: */
REPLACE_STATE_TRIGGER %tutu_var%DELTAN 0 ~~
APPEND %tutu_var%DELTAN
IF WEIGHT #-1
~Global("HelpEltan","GLOBAL",0)~ THEN not_yet
SAY ~You... I think I heard of you. You might be of service to me and this city. Will you hear me out?~
+ ~GlobalLT("ScarMission","GLOBAL",5)~ + ~I am sorry, but I am doing investigations for your Second in Command I would like to finish, first.~ EXIT
+ ~GlobalLT("ScarMission","GLOBAL",5)~ + ~Yes, tell me what you want. I am sure Scar can deal with his problems himself.~ + 0
+ ~GlobalGT("ScarMission","GLOBAL",4)~ + ~Just a moment, I have to finish something, first.~ EXIT
+ ~GlobalGT("ScarMission","GLOBAL",4)~ + ~Well, then speak.~ + 0
END
END //APPEND
/* PC can tell Scar who s/he is later
- if the PC declines to say his name or to work for Scar at the bridge, he can now do so when he sees Scar in front of the FF headquarters.*/
ADD_TRANS_ACTION %tutu_var%SCAR BEGIN 1 END BEGIN END ~SetGlobal("UB_ScarMission","GLOBAL",1)~
ADD_TRANS_ACTION %tutu_var%SCAR BEGIN 3 END BEGIN END ~SetGlobal("UB_ScarMission","GLOBAL",2)~
EXTEND_BOTTOM %tutu_var%SCAR 19
+ ~Global("UB_ScarMission","GLOBAL",1)~ + ~Not so fast. Let me first tell you that I am indeed the one involved in the clearing of the Nashkel mines.~ DO ~SetGlobal("UB_ScarMission","GLOBAL",0)~ + 2
+ ~Global("UB_ScarMission","GLOBAL",2)~ + ~Just a minute. You said something about help you would need. I am interested in working for you now.~ DO ~SetGlobal("UB_ScarMission","GLOBAL",0)~ + 4
END
/* If the PC talks to Scar again before defeating the doppelgangers in the seven suns, he will lose the job: not any more
BGT already adds this!
*/
EXTEND_BOTTOM %tutu_var%SCAR 14
+ ~GlobalLT("KilledDopple","GLOBAL",5)~ + ~I am not finished there yet.~ + more_battle
END
APPEND %tutu_var%SCAR
IF ~~ THEN more_battle
SAY ~Please go back and fight those creatures. I won't be at ease until I know the Seven Suns building is cleansed and no more people in danger.~
IF ~~ THEN EXIT
END
END //APPEND
/* If the PC talks to Scar before killing the Oger mage, the quest will be gone: Not any more. */
REPLACE_TRANS_ACTION %tutu_var%SCAR
BEGIN 31 END
BEGIN 0 END
~SetGlobal("ScarMission","GLOBAL",4)~ ~~
EXTEND_BOTTOM %tutu_var%Scar 31
+ ~!Dead("SewerOgre")~ + ~I give up on this one.~ + 37
+ ~!Dead("SewerOgre")~ + ~We are still on it.~ + 36
END
/* COSMETIC TWEAK State 10 misses some polite answer e.g. for paladins */
EXTEND_BOTTOM %tutu_var%Scar 10
++ ~Of course we will go back and fight those monsters!~ + 12
END
/* another addition: If the PC doesn't have the ring of the girl the first time he reports he won't have the chance to bring it later: not any more.
Also tweaked to make the ring unique.
Combined with the "bring the dead girl's body" quest extention.
Unique ring: UBSCARIN.itm in AR0226 ESewers */
REPLACE_TRANS_TRIGGER %tutu_var%Scar BEGIN 32 END BEGIN 1 END ~PartyHasItem("%tutu_var%RING19")~ ~False()~
EXTEND_BOTTOM %tutu_var%Scar 32
IF ~PartyHasItem("UBSCARIN")~ THEN REPLY ~Yes we did, we'll happily return it.~ GOTO 34_UB
+ ~!PartyHasItem("UBSCARIN")~ + ~I will go again and have a closer look.~ DO ~SetGlobal("UBScarRingFetch","LOCALS",1)~ + scar_ring
+ ~PartyHasItem("UBFEBODY") PartyHasItem("UBSCARIN")~ + ~I think I also found her body.~ DO ~TakePartyItem("UBSCARIN")~ + AlreadyHaveBody
+ ~PartyHasItem("UBFEBODY") !PartyHasItem("UBSCARIN")~ + ~I didn't find a ring but what appears to be her body.~ DO ~TakePartyItem("UBFEBODY")~ + scar_only_body
END
APPEND %tutu_var%Scar
IF ~~ THEN scar_only_body
SAY ~You have done well! This will help the Sashenstars to find some peace. Still, I am sure it would help them to have the ring to remember their loved one.~
++ ~I will go again and have a closer look.~ DO ~SetGlobal("UBScarRingFetch","LOCALS",2)~ + scar_ring
IF ~~ THEN REPLY ~I really don't have time for that now.~ GOTO 33
END
IF ~~ THEN scar_ring
SAY ~If you would take the time, I am sure the Sashenstar family will be more than grateful.~
IF ~~ THEN EXIT
END
IF WEIGHT #0 ~GlobalGT("UBScarRingFetch","LOCALS",0)~ THEN BEGIN RingFetchQuestReturn
SAY ~It's good to see you again, how have things gone?~
+ ~Dead("SewerOgre") !PartyHasItem("UBSCARIN")~ + ~I am still searching for possessions of the victims.~ EXIT
+ ~Global("UBScarRingFetch","LOCALS",1) PartyHasItem("UBSCARIN")~ + ~We found a ring that looks special.~ DO ~SetGlobal("UBScarRingFetch","LOCALS",0)~ + 34_UB
+ ~Global("UBScarRingFetch","LOCALS",2) PartyHasItem("UBSCARIN")~ + ~We found a ring that looks special.~ DO ~SetGlobal("UBScarRingFetch","LOCALS",0)~ + 34
++ ~I give up on this one.~ DO ~SetGlobal("UBScarRingFetch","LOCALS",0)~ + 33
END
END //APPEND
REPLACE_TRANS_ACTION %tutu_var%SCAR
BEGIN 34 END
BEGIN 0 END
~TakePartyItem("%tutu_var%RING19")~ ~TakePartyItem("UBSCARIN")~
APPEND %tutu_var%SCAR
IF ~~ THEN BEGIN 34_UB
SAY @1
IF ~PartyHasItem("UBFEBODY")~ THEN DO ~TakePartyItem("UBSCARIN")~ REPLY @2 GOTO AlreadyHaveBody
IF ~!PartyHasItem("UBFEBODY")~ THEN DO ~TakePartyItem("UBSCARIN")~ REPLY @3 GOTO NoWay
IF ~!PartyHasItem("UBFEBODY")~ THEN DO ~TakePartyItem("UBSCARIN")~ REPLY @4 GOTO WillReturnBody
IF ~!PartyHasItem("UBFEBODY")~ THEN DO ~TakePartyItem("UBSCARIN")~ REPLY @5 GOTO NoWay
END
IF ~~ THEN BEGIN AlreadyHaveBody
SAY @6
COPY_TRANS %tutu_var%SCAR 34
END
IF ~~ THEN BEGIN NoWay
SAY @7
COPY_TRANS %tutu_var%SCAR 33
END
IF ~~ THEN BEGIN WillReturnBody
SAY @8
IF ~~ THEN DO ~SetGlobal("ScarBodyFetch","GLOBAL",1)~ EXIT
END
IF WEIGHT #0 ~Global("ScarBodyFetch","GLOBAL",1)~ THEN BEGIN BodyFetchQuestReturn
SAY @9
IF ~PartyHasItem("UBFEBODY")~ THEN REPLY @10 GOTO AlreadyHaveBody
IF ~!PartyHasItem("UBFEBODY")~ THEN REPLY @11 GOTO NoBodyYet
IF ~~ THEN REPLY @12 GOTO NoWay
END
IF WEIGHT #0 ~Global("ScarBodyFetch","GLOBAL",2)
PartyHasItem("UBFEBODY")~ THEN BEGIN ChangedMind
SAY @13
IF ~~ THEN REPLY @14 GOTO AlreadyHaveBody
END
IF ~~ THEN BEGIN NoBodyYet
SAY @15
IF ~~ THEN EXIT
END
END
REPLACE_TRANS_ACTION %tutu_var%SCAR
BEGIN AlreadyHaveBody END
BEGIN 0 END
~TakePartyItem("%tutu_var%RING19")~ ~TakePartyItem("UBFEBODY") SetGlobal("ScarBodyFetch","GLOBAL",3)~
REPLACE_TRANS_ACTION %tutu_var%SCAR
BEGIN NoWay END
BEGIN 0 END
~GiveGoldForce(1000)
AddexperienceParty(2000)~
~GiveGoldForce(500)
AddexperienceParty(3000)
SetGlobal("ScarBodyFetch","GLOBAL",2)~