Jump to content

Eirik's tp2


EiriktheScald

Recommended Posts

This is the BAF I use to get the dialogue to trigger. I'm not worried about which of the scrolls the PC finds. As the first bounty notice the pc finds is likely to be Karlat's in Beregost, I'm all right with no timer.

 

/* if the bounty notice is found on an opponent */
IF
InParty(Myself)
Global("B!GavinBountyNotice","GLOBAL",0) //Checkvariable
CombatCounter(0)
!See([ENEMY])
!StateCheck(Player1,STATE_SLEEPING)
OR(4)							   //There are actually 4 bounty notices
PartyHasItem("_SCRLKAR")
PartyHasItem("_SCRLNEI")
PartyHasItem("_SCRL3B")
PartyHasItem("_SCRLTAR")
!StateCheck(Myself,CD_STATE_NOTVALID)
InMyArea(Player1)
THEN
RESPONSE #100
SetGlobal("B!GavinBountyNotice","GLOBAL",1)
StartDialogueNoSet(Player1)
END

 

And this is in the D (J file)

 

// Bounty Notice

CHAIN
IF ~Global("B!GavinBountyNotice","GLOBAL",1)~ THEN ~B!GAVINJ~ BGavinBountyNotice
~Is this a bounty notice? Why would someone want you dead badly enough to put up this kind of gold?~
DO ~SetGlobal("B!GavinBountyNotice","GLOBAL",2)~
= ~We're going to have to work harder to keep you safe.~
EXIT

Link to comment

You can always check a global variable by typing in

CLUAConsole:GetGlobal("ESTarneshScroll","GLOBAL")

 

If you're curious, you can set it by typing in

CLUAConsold:SetGlobal("ESTarneshScroll","GLOBAL",3) //or any other number you like :)

Link to comment
That was the problem; should use 'GlobalTimerExpired()' instead.

If you use RealSetGlobalTimer("whatever","GLOBAL",###), you must use RealGlobalTimerExpired("whatever","GLOBAL"). If you use SetGlobalTimer("whatever","GLOBAL",###), then you would use GlobalTimerExpired("whatever","GLOBAL").

The scroll was not put into Eirik's inventory though. Another thing I thought about: what if another npc picked up the scroll instead? I would have to check each character to see who has it. More trouble than it's worth?

Yeah, I thought that might be a problem. Might as well forget it. It would have been a nice touch, and it probably is possible, but it would have been a pain in the neck, for very little payback.

Link to comment

Then you must be using SetGlobalTimer instead of RealSetGlobalTimer.

 

No big deal, if you're satisfied with the result.

 

Yeah, anything that is a condition for something else to happen is a trigger, the thing that happens is an action. Which explains why you couldn't find it under actions.

 

Anyway, have fun storming the castle. I'm off to sleep.

Link to comment

No, here is the script:

 

/* Tarnesh's spellbook */
IF
Global("ESTarneshScroll","GLOBAL",0)
CombatCounter(0)
!See([ENEMY])
PartyHasItem("_SCRLTAR")
//	Dead("tarnesh")
InParty(Myself)
!StateCheck(Myself,CD_STATE_NOTVALID)
THEN
RESPONSE #100
	SetGlobal("ESTarneshScroll","GLOBAL",1)
	RealSetGlobalTimer("ESCommentBookTime","GLOBAL",60)
END

IF
GlobalTimerExpired("ESCommentBookTime","GLOBAL")
Global("ESTarneshScroll","GLOBAL",1)
InParty(Myself)
InMyArea(Player1)
!StateCheck(Myself,CD_STATE_NOTVALID)
!StateCheck(Player1,CD_STATE_NOTVALID)
THEN
RESPONSE #100
	SetGlobal("ESTarneshScroll","GLOBAL",2)
	StartDialogueNoSet(Player1)
END

 

As you can see, it's using RealSetGlobalTimer(). It wasn't advancing the variable using RealGlobalTimerExpired(), so I changed it to GlobalTimerExpired() and it is working now. Go figure.

Link to comment

I'd really like to see someone else weigh in on this phenomenon. That timer expiry shouldn't work. I wonder why it does.

 

Hey, if you wouldn't mind, maybe you could email me a copy of the alpha and I could see if I could get it to install on my machine? I can handle the setup.exe part, since you're on a Mac, it's different, obviously. But I'd like to have a peek at it's installation and debug, if it's all right with you. I am really curious about that one.

Link to comment

Archived

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

×
×
  • Create New...