ok cleaned it up.
you were right that the dialog was kinda redundant in places
the container now forces prism to initiate dialog.
prism's script will cause him to initiate dialog with a wait of 1 and range of 4 if either or both gems are taken off his person.
else he will not initiate if you approach him.
it is possible to pickpocket and run out of range.
give it a try and see what you think. i hope this can make it done...
dialog changes//OublekBounty1 is for brage
//OublekBounty2 is for prism
//the oublekbounty globals will prevent any exploits by dropping a second item and trying to get the full reward again
ADD_TRANS_TRIGGER ~oublek~ 9 ~Global("OublekBounty1","GLOBAL",0)~ DO 0 UNLESS ~Global("OublekBounty1","GLOBAL",0)~
ADD_TRANS_TRIGGER ~oublek~ 9 ~Global("OublekBounty2","GLOBAL",0)~ DO 1 UNLESS ~Global("OublekBounty2","GLOBAL",0)~
ADD_TRANS_TRIGGER ~oublek~ 9 ~Global("OublekBounty1","GLOBAL",0) Global("OublekBounty2","GLOBAL",0)~ DO 4 UNLESS ~Global("OublekBounty2","GLOBAL",0)~
ADD_TRANS_TRIGGER ~oublek~ 10 ~Global("OublekBounty1","GLOBAL",0)~ DO 1 5 UNLESS ~Global("OublekBounty1","GLOBAL",0)~
ADD_TRANS_TRIGGER ~oublek~ 10 ~Global("OublekBounty2","GLOBAL",0)~ DO 9 5 UNLESS ~Global("OublekBounty2","GLOBAL",0)~
//changing from one item to two ensures that players can not take advantage of dropping one item and trying to get the full reward twice
REPLACE_TRANS_TRIGGER oublek BEGIN 9 END BEGIN 1 END ~PartyHasItem("MISC43")~ ~PartyHasItem("abgfEyeL") PartyHasItem("abgfEyeR")~
REPLACE_TRANS_TRIGGER oublek BEGIN 9 END BEGIN 4 END ~!PartyHasItem("MISC43")~ ~!PartyHasItem("abgfEyeL") !PartyHasItem("abgfEyeR")~
REPLACE_TRANS_TRIGGER oublek BEGIN 10 END BEGIN 9 END ~PartyHasItem("MISC43")~ ~PartyHasItem("abgfEyeL") PartyHasItem("abgfEyeR")~
REPLACE_TRANS_TRIGGER oublek BEGIN 10 END BEGIN 5 END ~!PartyHasItem("MISC43")~ ~!PartyHasItem("abgfEyeL") !PartyHasItem("abgfEyeR")~
REPLACE_TRANS_ACTION oublek BEGIN 14 END BEGIN 0 END ~TakePartyItem("MISC43")~ ~TakePartyItem("abgfEyeL") TakePartyItem("abgfEyeR")~
REPLACE_TRANS_ACTION oublek BEGIN 4 END BEGIN 0 END ~TakePartyItem("MISC43")~ ~~
REPLACE_TRANS_ACTION oublek BEGIN 4 END BEGIN 0 END ~GivePartyGold(300)~ ~GivePartyGold(300) TakePartyItem("abgfEyeL") TakePartyItem("abgfEyeR")~
//adding new states that give half the reward when only one item gets turned in
APPEND oublek
IF ~~ THEN BEGIN abLeftEye
SAY ~One of the Emeralds! That will be a 150 gold bounty for you. Be sure to bring the other if you should find it.~//this is custom text
IF ~~ THEN DO ~AddexperienceParty(100) GivePartyGold(150) TakePartyItem("abgfEyeL") SetGlobal("abgf_LeftEyeBounty","GLOBAL",1)~ EXIT
END
IF ~~ THEN BEGIN abRightEye
SAY ~One of the Emeralds! That will be a 150 gold bounty for you. Be sure to bring the other if you should find it.~//this is custom text
IF ~~ THEN DO ~AddexperienceParty(100) GivePartyGold(150) TakePartyItem("abgfEyeR") SetGlobal("abgf_RightEyeBounty","GLOBAL",1)~ EXIT
END
IF ~~ THEN BEGIN abLeftEyeLast
SAY ~The last of the Emeralds! That will be another 150 gold bounty for you. Well, you'll make quite a name for yourself among the bounty hunters if you keep this up. Whether it is for better or worse, I do not know.~//this is custom text
IF ~~ THEN DO ~AddexperienceParty(100) GivePartyGold(150) TakePartyItem("abgfEyeL") SetGlobal("abgf_LeftEyeBounty","GLOBAL",1)~ EXIT
END
IF ~~ THEN BEGIN abRightEyeLast
SAY ~The last of the Emeralds! That will be another 150 gold bounty for you. Well, you'll make quite a name for yourself among the bounty hunters if you keep this up. Whether it is for better or worse, I do not know.~//this is custom text
IF ~~ THEN DO ~AddexperienceParty(100) GivePartyGold(150) TakePartyItem("abgfEyeR") SetGlobal("abgf_RightEyeBounty","GLOBAL",1) ~ EXIT
END
END //end the append
//adding additional transitions that allow the player to turn in only one of the two required items for good boy
EXTEND_BOTTOM oublek 9
IF ~PartyHasItem("abgfEyeL") !PartyHasItem("abgfEyeR") Global("abgf_LeftEyeBounty","GLOBAL",0) Global("abgf_RightEyeBounty","GLOBAL",0)~
THEN REPLY ~I've come to turn in a bounty, and collect the reward that is duly mine.~ GOTO abLeftEye
IF ~!PartyHasItem("abgfEyeL") PartyHasItem("abgfEyeR") Global("abgf_LeftEyeBounty","GLOBAL",0) Global("abgf_RightEyeBounty","GLOBAL",0)~
THEN REPLY ~I've come to turn in a bounty, and collect the reward that is duly mine.~ GOTO abRightEye
IF ~PartyHasItem("abgfEyeL") !PartyHasItem("abgfEyeR") Global("abgf_RightEyeBounty","GLOBAL",1)~
THEN REPLY ~I've come to turn in a bounty, and collect the reward that is duly mine.~ GOTO abLeftEyeLast
IF ~!PartyHasItem("abgfEyeL") PartyHasItem("abgfEyeR") Global("abgf_LeftEyeBounty","GLOBAL",1)~
THEN REPLY ~I've come to turn in a bounty, and collect the reward that is duly mine.~ GOTO abRightEyeLast
END //end the extend bottom
//adding additional transitions that continue to keep 'bad boy' player from getting full reward. If they turn in only one gem, they get rewarded but can't turn in the other or resolve brage issue with oublek. It is an overall punishment when compared to 'good boy' rewards.
EXTEND_BOTTOM oublek 10
IF ~Global("OublekBounty2","GLOBAL",0) PartyHasItem("abgfEyeL") !PartyHasItem("abgfEyeR") Global("BroughtBounty","GLOBAL",1)~
THEN REPLY ~I've come to turn in a bounty, and collect the reward that is duly mine.~ GOTO 14
IF ~Global("OublekBounty2","GLOBAL",0) !PartyHasItem("abgfEyeL") PartyHasItem("abgfEyeR") Global("BroughtBounty","GLOBAL",1)~
THEN REPLY ~I've come to turn in a bounty, and collect the reward that is duly mine.~ GOTO 14
END //end the extend bottom
//adjustments needed for prism to work with the rest of the component
ADD_STATE_TRIGGER prism 0 ~HasItem("abgfEyeL",Myself) HasItem("abgfEyeR",Myself) Global("abgf_BrokeInto","GLOBAL",0)~
//REPLACE_TRANS_ACTION prism BEGIN 7 END BEGIN 0 moved to separate files for BGT+Tutu / BG
REPLACE_TRANS_ACTION prism BEGIN 7 END BEGIN 0 END ~DropInventory()~
~DestroyItem("abgfEyeL") DestroyItem("abgfEyeR") SetGlobal("abgf_GemInEye","GLOBAL",1)~
//Make sure the containers are empty if Prism can't put in the gems any more.
//ONLY apply if the emeralds really cannot be returned to Prism
//state 3 is where player attacks prism so gems need removed from eyes
//state 8 is where player has previously stolen the gems from off of Prism so gems need removed from eyes
//state 9 is where player backed off and let Greywolf have Prism & the gems so gems need removed from eyes
ADD_TRANS_ACTION prism BEGIN 3 8 9 END BEGIN 0 END ~Unlock("A6StatueRightEye") Unlock("A6StatueLeftEye") ActionOverride("A6StatueRightEye",DestroyItem("abgfEyeR")) ActionOverride("A6StatueLeftEye",DestroyItem("abgfEyeL"))~
//set state 8 to be a repeat state if prism is talked to again after the gems were stolen and no longer retrievable
ADD_STATE_TRIGGER prism 8 ~Global("ab_GemsTrulyGone","GLOBAL",1)~
REPLACE_TRANS_ACTION prism BEGIN 9 END BEGIN 0 END ~GiveItem("MISC43","GREYWOLF")~
~GiveItem("abgfEyeL","GREYWOLF") GiveItem("abgfEyeR","GREYWOLF") SetGlobal("abgf_GemInEye","GLOBAL",3)~
ADD_TRANS_ACTION prism BEGIN 4 END BEGIN 0 END ~SetGlobal("abCalledGreywolf","GLOBAL",1)~
//anything not one means that either the gems were not in container when obtained OR the penalty was applied
//only way to get items if player allowed greywolf to attack prism is to attack greywolf before prism is dead and hopefully kill him before he runs away.
//allow prism to return to correct location after having moved to catch up with player
ADD_TRANS_ACTION prism BEGIN 5 8 END BEGIN 0 END ~ActionOverride("Prism",MoveToPoint([641.2713]))~
APPEND prism
//if prism still has both gems but player managed to get one of them out of the statue before prism initiates dialog
//rep loss of 1 if you take a gem from the statue and get caught by prism.
IF ~HasItem("abgfEyeL",Myself) HasItem("abgfEyeR",Myself) Global("abgf_BrokeInto","GLOBAL",1)~ THEN BEGIN abMidWorkL
SAY ~How dare you! How dare you take the sparkle from her eyes!~
IF ~PartyHasItem("abgfEyeL") !PartyHasItem("abgfEyeR")~ THEN
DO ~SetGlobal("ab_GemsTrulyGone","GLOBAL",1) ReputationInc(-1) Unlock("A6StatueRightEye") Unlock("A6StatueLeftEye") ActionOverride("A6StatueRightEye",DestroyItem("abgfEyeR")) ActionOverride("A6StatueLeftEye",DestroyItem("abgfEyeL")) DestroyItem("abgfEyeL") Enemy()~
JOURNAL ~I managed to take some emeralds that the sculptor Prism was using as eyes in a statue. However, he had noticed me. I was forced to put him out of his misery after he lunged at me with a chisel.~
EXIT
IF ~!PartyHasItem("abgfEyeL") PartyHasItem("abgfEyeR")~ THEN
DO ~SetGlobal("ab_GemsTrulyGone","GLOBAL",1) ReputationInc(-1) Unlock("A6StatueRightEye") Unlock("A6StatueLeftEye") ActionOverride("A6StatueRightEye",DestroyItem("abgfEyeR")) ActionOverride("A6StatueLeftEye",DestroyItem("abgfEyeL")) DestroyItem("abgfEyeR") Enemy()~
JOURNAL ~I managed to take some emeralds that the sculptor Prism was using as eyes in a statue. However, he had noticed me. I was forced to put him out of his misery after he lunged at me with a chisel.~
EXIT
IF ~!PartyHasItem("abgfEyeL") !PartyHasItem("abgfEyeR")~ THEN
DO ~SetGlobal("ab_GemsTrulyGone","GLOBAL",1) ReputationInc(-1) Unlock("A6StatueRightEye") Unlock("A6StatueLeftEye") ActionOverride("A6StatueRightEye",DestroyItem("abgfEyeR")) ActionOverride("A6StatueLeftEye",DestroyItem("abgfEyeL")) Enemy()~
JOURNAL ~I managed to take some emeralds that the sculptor Prism was using as eyes in a statue. However, he had noticed me. I was forced to put him out of his misery after he lunged at me with a chisel.~
EXIT
END
//if prism still has both gems & player never tried to loot the eyes
IF ~HasItem("abgfEyeL",Myself) HasItem("abgfEyeR",Myself) !PartyHasItem("abgfEyeL") !PartyHasItem("abgfEyeR") Global("abgf_BrokeInto","GLOBAL",0) Global("abCalledGreywolf","GLOBAL",0)~ THEN BEGIN stillworking
SAY ~I've much work to do. But mayhaps you would help a foolish sculptor finish this epiphany now? Please, guard this place, for surely Greywolf will come. I will pay with my last possessions!~
COPY_TRANS prism 1
END
//prism initiates if both are missing and asks where they went
IF ~!HasItem("abgfEyeL",Myself) !HasItem("abgfEyeR",Myself) Global("abgf_BrokeInto","GLOBAL",0)~ THEN BEGIN abBothGone
SAY ~Hold! You took my emeralds. I must have them back. I need them to finish this epiphany. Please, please return them. I will give you all else that is mine.~
IF ~!PartyHasItem("abgfEyeL") !PartyHasItem("abgfEyeR") Global("OublekBounty2","GLOBAL",1)~ THEN
REPLY ~They are gone. Given to the authorities. You will never finish that lump of stone now.~
DO ~SetGlobal("ab_GemsTrulyGone","GLOBAL",1)~
GOTO 8
IF ~!PartyHasItem("abgfEyeL") !PartyHasItem("abgfEyeR") Global("OublekBounty2","GLOBAL",0)~ THEN
REPLY ~They are gone. Sold by now to hang on the neck as some fat woman's trinket.~
DO ~SetGlobal("ab_GemsTrulyGone","GLOBAL",1)~
GOTO 8
IF ~PartyHasItem("abgfEyeL") PartyHasItem("abgfEyeR") Global("OublekBounty2","GLOBAL",0)~ THEN
REPLY #4750
DO ~TakePartyItem("abgfEyeL") TakePartyItem("abgfEyeR")~
GOTO 4
IF ~PartyHasItem("abgfEyeL") PartyHasItem("abgfEyeR") Global("OublekBounty2","GLOBAL",0)~ THEN
REPLY #4751
GOTO 3
IF ~PartyHasItem("abgfEyeL") !PartyHasItem("abgfEyeR")~ THEN
REPLY ~Aye, I took them. Still have one. The other tho is long gone.~
GOTO abBothStoleButOneGone
IF ~!PartyHasItem("abgfEyeL") PartyHasItem("abgfEyeR")~ THEN
REPLY ~Aye, I took them. Still have one. The other tho is long gone.~
GOTO abBothStoleButOneGone
IF ~~ THEN
REPLY ~What is this? Some madman accusing me of thievery? Die for your insults.~
GOTO 3
END
//prism initiates if left gem is missing
IF ~!HasItem("abgfEyeL",Myself) HasItem("abgfEyeR",Myself) Global("abgf_BrokeInto","GLOBAL",0) Global("ab_GemStoleResolve","GLOBAL",0)~ THEN BEGIN abLeftGone
SAY ~Hold! You took my emerald. I must have it back. I need it to finish this epiphany. Please, please return it. I will give you all else that is mine.~
IF ~PartyHasItem("abgfEyeL") Global("OublekBounty2","GLOBAL",0)~ THEN
REPLY ~All that is yours, eh? So be it.~
DO ~TakePartyItem("abgfEyeL")~
GOTO 4
IF ~PartyHasItem("abgfEyeL") Global("OublekBounty2","GLOBAL",0)~ THEN
REPLY ~"All else that is yours" does not concern me. I'm taking you and the gems to the guard, where I shall get a hefty reward.~
GOTO 3
IF ~!PartyHasItem("abgfEyeL")~ THEN
GOTO abNotGetBackEver
IF ~~ THEN
REPLY ~I know not what you are talking about.~
EXIT
END
//prism initiates if right gem is missing
IF ~HasItem("abgfEyeL",Myself) !HasItem("abgfEyeR",Myself) Global("abgf_BrokeInto","GLOBAL",0) Global("ab_GemStoleResolve","GLOBAL",0)~ THEN BEGIN abRightGone
SAY ~Hold! You took my emerald. I must have it back. I need it to finish this epiphany. Please, please return it. I will give you all else that is mine.~
IF ~PartyHasItem("abgfEyeR") Global("OublekBounty2","GLOBAL",0)~ THEN
REPLY ~All that is yours, eh? So be it.~
DO ~TakePartyItem("abgfEyeR")~
GOTO 4
IF ~PartyHasItem("abgfEyeR") Global("OublekBounty2","GLOBAL",0)~ THEN
REPLY ~"All else that is yours" does not concern me. I'm taking you and the gems to the guard, where I shall get a hefty reward.~
GOTO 3
IF ~!PartyHasItem("abgfEyeR")~ THEN
GOTO abNotGetBackEver
IF ~~ THEN
REPLY ~I know not what you are talking about.~
EXIT
END
IF ~~ THEN BEGIN abBothStoleButOneGone
SAY ~Give me the one you have. Go get the other and bring it back. I must finish this epiphany. I will give you all else that is mine.~
IF ~Global("abgf_RightEyeBounty","GLOBAL",1) Global("abgf_LeftEyeBounty","GLOBAL",0)~ THEN
REPLY ~I gave it to the authorities. You shall never get it back.~
DO ~SetGlobal("ab_GemsTrulyGone","GLOBAL",1)~
GOTO 8
IF ~Global("abgf_RightEyeBounty","GLOBAL",1) Global("abgf_LeftEyeBounty","GLOBAL",0)~ THEN
REPLY ~Not possible. I gave it to the authorities and have come back to claim the other for its bounty.~
DO ~SetGlobal("ab_GemsTrulyGone","GLOBAL",1)~
GOTO 3
IF ~Global("abgf_RightEyeBounty","GLOBAL",0) Global("abgf_LeftEyeBounty","GLOBAL",0)~ THEN
REPLY ~Not possible. Sold to some forgotten merchant or stashed in some forgotten place.~
DO ~SetGlobal("ab_GemsTrulyGone","GLOBAL",1)~
GOTO 8
IF ~Global("abgf_RightEyeBounty","GLOBAL",0) Global("abgf_LeftEyeBounty","GLOBAL",1)~ THEN
REPLY ~I gave it to the authorities. You shall never get it back.~
DO ~SetGlobal("ab_GemsTrulyGone","GLOBAL",1)~
GOTO 8
IF ~Global("abgf_RightEyeBounty","GLOBAL",0) Global("abgf_LeftEyeBounty","GLOBAL",1)~ THEN
REPLY ~Not possible. I gave it to the authorities and have come back to claim the other for its bounty.~
DO ~SetGlobal("ab_GemsTrulyGone","GLOBAL",1)~
GOTO 3
IF ~~ THEN
REPLY ~The gem may be gone, but I'll gladly take all else that is yours. Prepare to die.~
GOTO 3
END
IF ~~ THEN BEGIN abNotGetBackEver
SAY ~Give it back please. I must finish this epiphany. I will give you all else that is mine.~
IF ~Global("abgf_RightEyeBounty","GLOBAL",1) Global("abgf_LeftEyeBounty","GLOBAL",0)~ THEN
REPLY ~I gave it to the authorities. You shall never get it back.~
DO ~SeSetGlobal("ab_GemsTrulyGone","GLOBAL",1)~
GOTO 8
IF ~Global("abgf_RightEyeBounty","GLOBAL",1) Global("abgf_LeftEyeBounty","GLOBAL",0)~ THEN
REPLY ~Not possible. I gave it to the authorities and have come back to claim the other for its bounty.~
DO ~SetGlobal("ab_GemsTrulyGone","GLOBAL",1)~
GOTO 3
IF ~Global("abgf_RightEyeBounty","GLOBAL",0) Global("abgf_LeftEyeBounty","GLOBAL",0)~ THEN
REPLY ~Not possible. Sold to some forgotten merchant or stashed in some forgotten place.~
DO ~SetGlobal("ab_GemsTrulyGone","GLOBAL",1)~
GOTO 8
IF ~Global("abgf_RightEyeBounty","GLOBAL",0) Global("abgf_LeftEyeBounty","GLOBAL",1)~ THEN
REPLY ~I gave it to the authorities. You shall never get it back.~
DO ~SSetGlobal("ab_GemsTrulyGone","GLOBAL",1)~
GOTO 8
IF ~Global("abgf_RightEyeBounty","GLOBAL",0) Global("abgf_LeftEyeBounty","GLOBAL",1)~ THEN
REPLY ~Not possible. I gave it to the authorities and have come back to claim the other for its bounty.~
DO ~SetGlobal("ab_GemsTrulyGone","GLOBAL",1)~
GOTO 3
IF ~~ THEN
REPLY ~The gem may be gone, but I'll gladly take all else that is yours. Prepare to die.~
GOTO 3
END
END//end the append
prism's scriptIF
See([PC])
Range(LastSeenBy,4)
!HasItem("abgfEyeL",Myself)
!HasItem("abgfEyeR",Myself)
!Global("ab_GemsTrulyGone","GLOBAL",1)
THEN
RESPONSE #100
Wait(1)
Dialogue([PC])
END
IF
See([PC])
Range(LastSeenBy,4)
!HasItem("abgfEyeL",Myself)
HasItem("abgfEyeR",Myself)
!Global("ab_GemsTrulyGone","GLOBAL",1)
THEN
RESPONSE #100
Wait(1)
Dialogue([PC])
END
IF
See([PC])
Range(LastSeenBy,4)
HasItem("abgfEyeL",Myself)
!HasItem("abgfEyeR",Myself)
!Global("ab_GemsTrulyGone","GLOBAL",1)
THEN
RESPONSE #100
Wait(1)
Dialogue([PC])
END
IF
See([PC])
!Range(LastSeenBy,4)
!HasItem("abgfEyeL",Myself)
!HasItem("abgfEyeR",Myself)
Global("abgf_BrokeInto","GLOBAL",0)
Global("abgf_StolenJEntry","GLOBAL",0)
THEN
RESPONSE #100
AddJournalEntry(~That fool Prism really should keep better watch over his work area. I snagged some gems while he wasn't looking. Loss for him. Profit for me.~)
SetGlobal("abgf_StolenJEntry","GLOBAL",1)
END
IF
See([PC])
!Range(LastSeenBy,4)
THEN
RESPONSE #100
ClearActions(Myself)
MoveToPoint([641.2713])
END
/*
IF
Dead("Greywolf")
See([PC])
Range(LastSeenBy,4)
THEN
RESPONSE #100
SetGlobal("abgf_PrismTalk","LOCALS",1)
Dialogue([PC])
END
IF
See([PC])
Range(LastSeenBy,4)
!Global("ab_GemsTrulyGone","GLOBAL",1)
!Global("abCalledGreywolf","GLOBAL",1)
THEN
RESPONSE #100
Wait(2)
Dialogue([PC])
END
*/
//if turned hostile
IF
Allegiance(Myself,ENEMY)
Global("abgf_GemInEye","GLOBAL",0)
THEN
RESPONSE #100
Unlock("A6StatueRightEye")
Unlock("A6StatueLeftEye")
ActionOverride("A6StatueRightEye",DestroyItem("abgfEyeR"))
ActionOverride("A6StatueLeftEye",DestroyItem("abgfEyeL"))
Attack(NearestEnemyOf(Myself))
END
//if died while blue circle
IF
Die()
Global("abgf_GemInEye","GLOBAL",0)
THEN
RESPONSE #100
Unlock("A6StatueRightEye")
Unlock("A6StatueLeftEye")
ActionOverride("A6StatueRightEye",DestroyItem("abgfEyeR"))
ActionOverride("A6StatueLeftEye",DestroyItem("abgfEyeL"))
END
the trap scriptIF
Opened([ANYONE])
Global("abgf_GemInEye","GLOBAL",0)
!Global("ab_GemsTrulyGone","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("abgf_BrokeInto","GLOBAL",1)
ActionOverride("Prism",Dialogue([PC])
END
IF
Opened([ANYONE])
Global("abgf_GemInEye","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("abgf_GemInEye","GLOBAL",2) //2 is only 1 gem taken from statue
ReputationInc(-1) //only one rep point loss in total cause it reverts the rep point gain given by letting him finish the work
AddJournalEntry(~Perhaps it was wrong, but after allowing Prism to complete his 'final masterpiece' I've taken one of the emeralds out of the statue's eyes. It should bring a hefty price at the right place or a decent reward...~)
END
IF
Opened([ANYONE])
Global("abgf_GemInEye","GLOBAL",2)
THEN
RESPONSE #100
SetGlobal("abgf_GemInEye","GLOBAL",3)
AddJournalEntry(~After a bit of hard work, I finally removed the second emerald which Prism had stolen to use in one of the eyes of his 'final masterpiece'.~)
END