Jump to content

I am lost with this one....


Domi

Recommended Posts

This keeps being reported over and over form Kivan. Kivan apparently interjects before Arat gives him arrows. But when I look at the code, the line seems to go very definetly after. What gives?

 

I_C_T2 KPCAPT01 11 P#KivanArat
== P#KIVJ  IF ~InParty("P#kivan") InMyArea("P#KIVAN")~ THEN @651
END

 

Where:

 

IF ~~ THEN BEGIN 11 // from: 49.1

SAY #39798 /* ~Just be sure you've acid or fire at your disposal. Trolls will not fall to anything else. May the gods go with you. Take these arrows, they might help.~ */

IF ~~ THEN DO ~GiveItemCreate("arow08",[PC],20,0,0)~ JOURNAL #20986 /* ~The de'Arnise Keep has been invaded.

 

I've been told that to kill a troll you must use fire against them when they fall down. Otherwise they'll get up again.~ */ FLAGS 128 EXIT

END

Link to comment

To fix the infinite arrow exploit, Fixpack moves the actual arrow giving into a new state. State 11 is "Just be sure you've acid or fire at your disposal. Trolls will not fall to anything else. May the gods go with you." If arrows have been given, the dialogue ends, if not the next state is "Take these arrows, they might help."

Link to comment

Any chance you wouldn't separate those lines, keeping the "Here're some arrows" within the original state 11 and adding something innocent like "Good luck!" in the new state? As long as Arat mentions arrows in State 11, my interjection should make sense.

Link to comment

Any chance you can introduce a brand-new state that says something like "I hope the arrows I gave you previously are helpful blah, blah, blah..." and leaving the original state alone?

 

There is only one reply that leads to State 11, it should not be too difficult to patch it for GivenArrows,0/GivenArrows,1 and EXTEND_BOTTOM redirecting to a new state if GA=1. I understand I might be the only person in the whole modding world who patches this state, but it kind of alters the game text, and ADD_TRIGGER/EXTEND_BOTTOM will eliminate altering the game's text.

Link to comment

Fixed entirely in d code:

 

// eliminates Captain Arat's flame arrow exploit, part 1/4
// intercept externs/gotos to state 11, redirect if arrows already given (see also naliaj, state 177)
EXTEND_BOTTOM KPCAPT01 49
 IF ~!IsValidForPartyDialog("Nalia") Global("CDAratGaveArrows","GLOBAL",1)~ THEN UNSOLVED_JOURNAL #49487 GOTO CDAratGaveArrows
END

// eliminates Captain Arat's flame arrow exploit, part 2/4
// new, arrows-already-given state
APPEND KPCAPT01
 IF ~~ THEN BEGIN CDAratGaveArrows SAY @107
IF ~~ THEN JOURNAL #20986 FLAGS 128 EXIT
 END
END

// eliminates Captain Arat's flame arrow exploit, part 3/4
// make sure arrows only given once; set tracking var
ADD_TRANS_ACTION KPCAPT01 BEGIN 11 END BEGIN END ~SetGlobal("CDAratGaveArrows","GLOBAL",1)~

// eliminates Captain Arat's flame arrow exploit, part 4/4
// intercept externs/gotos to state 11, redirect if arrows already given (see also kpcapt01, state 49)
EXTEND_BOTTOM NALIAJ 177
 IF ~Global("CDAratGaveArrows","GLOBAL",1)~ THEN EXTERN KPCAPT01 CDAratGaveArrows
END

 

This deprecates the previous fix, so this code is removed:

 

// eliminates Captain Arat's flame arrow exploit, part 1/2
EXTEND_BOTTOM KPCAPT01 11
IF ~!HasItem("arow08","kpcapt01")~ THEN JOURNAL #20986 FLAGS 128 EXIT
IF ~HasItem("arow08","kpcapt01")~  THEN DO ~GiveItemCreate("arow08",[PC],20,0,0) DestroyItem("arow08")~ JOURNAL #20986 FLAGS 128 GOTO CDAratGaveArrows
END

// eliminates Captain Arat's flame arrow exploit, part 2/2
APPEND KPCAPT01
IF ~~ THEN BEGIN CDAratGaveArrows SAY @108
 IF ~~ THEN EXIT
END
END

STRING_SET 39798 @107 // captain arat

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...