Jump to content

Help with APPENDs


Troll

Recommended Posts

Weidu is rejecting this. It says the problem is near "END" at line 66. Anyone know why? Thanks. Btw, everything I do is based on the tutorials, but it dosn't always work.

 

APPEND BKORGAN

 

IF ~InParty("Larok")

See("Larok")

!StateCheck("Larok",STATE_SLEEPING)

Global("KorganLarokTalk","LOCALS",0)~ THEN BEGIN KorganLarok

SAY ~Yer bastard kind are good in a fight, Larok. What think ye of the glory battle and war?~

IF ~~ THEN DO ~SetGlobal("KorganLarokTalk","LOCALS",1)~ EXTERN LarokKorgan

END

END

 

IF ~~ THEN BEGIN LarokKorgan

SAY ~Battle can be glorious if you're fighting for the right cause. But war can be a vile-ruinous thing as well, especially when fought for gold-greed or power-lust.~

IF ~IsValidForPartyDialog("Korgan")~ THEN EXTERN BKORGAN KorganRespond

END

 

APPEND BKORGAN

 

IF ~~ THEN BEGIN KorganRespond

SAY ~Not the answer I'd expect from a tuskface like yerself. And here I was thinkin' I'd finally found someone with a dwarven gut fer fightin'. Yer just as slack-bladder'd as the longlegs and pointears what babysit ye.~

IF ~~ THEN EXIT

END

END

Link to comment
Weidu is rejecting this. It says the problem is near "END" at line 66. Anyone know why? Thanks. Btw, everything I do is based on the tutorials, but it dosn't always work.

 

It helps if you point out which line is the line 66. :down: You do have the line numbers showing in your text editor, right?

 

IF ~~ THEN DO ~SetGlobal("KorganLarokTalk","LOCALS",1)~ EXTERN LarokKorgan

 

You're missing your filename from your EXTERN? I think it should be EXTERN mydialoguefile LarokKorgan.

Link to comment

I guess CHAIN would be the smarter thing to use, but concerning your question above, there is an APPEND or something missing for the LarokKorgan dialogue block. I assume it belongs to Larok, so you could sort it like this:

 

APPEND BKORGAN //Put all Korgan lines in this append

 

IF ~InParty("Larok")

See("Larok")

!StateCheck("Larok",STATE_SLEEPING)

Global("KorganLarokTalk","LOCALS",0)~ THEN BEGIN KorganLarok

SAY ~Yer bastard kind are good in a fight, Larok. What think ye of the glory battle and war?~

IF ~~ THEN DO ~SetGlobal("KorganLarokTalk","LOCALS",1)~ EXTERN LarokKorgan

END

 

IF ~~ THEN BEGIN KorganRespond

SAY ~Not the answer I'd expect from a tuskface like yerself. And here I was thinkin' I'd finally found someone with a dwarven gut fer fightin'. Yer just as slack-bladder'd as the longlegs and pointears what babysit ye.~

IF ~~ THEN EXIT

END

 

END //APPEND BKORGAN

 

APPEND BLAROK

 

IF ~~ THEN BEGIN LarokKorgan

SAY ~Battle can be glorious if you're fighting for the right cause. But war can be a vile-ruinous thing as well, especially when fought for gold-greed or power-lust.~

IF ~IsValidForPartyDialog("Korgan")~ THEN EXTERN BKORGAN KorganRespond

END

 

END // APPEND BLAROK

 

This should work, as long as BLAROK.dlg already exists so the dialogue block can be appened to it.

Link to comment

IF ~~ THEN BEGIN KorganRespond

SAY ~Not the answer I'd expect from a tuskface like yerself. And here I was thinkin' I'd finally found someone with a dwarven gut fer fightin'. Yer just as slack-bladder'd as the longlegs and pointears what babysit ye.~

IF ~~ THEN EXIT

END

 

Ok, I found it. Weidu is rejecting - wait for it - the END in this code. Er... why!?

Link to comment
Weidu is rejecting this. It says the problem is near "END" at line 66. Anyone know why? Thanks. Btw, everything I do is based on the tutorials, but it dosn't always work.

 

APPEND BKORGAN

 

IF ~InParty("Larok")

See("Larok")

!StateCheck("Larok",STATE_SLEEPING)

Global("KorganLarokTalk","LOCALS",0)~ THEN BEGIN KorganLarok

SAY ~Yer bastard kind are good in a fight, Larok. What think ye of the glory battle and war?~

IF ~~ THEN DO ~SetGlobal("KorganLarokTalk","LOCALS",1)~ EXTERN LarokKorgan

END

END

 

IF ~~ THEN BEGIN LarokKorgan

SAY ~Battle can be glorious if you're fighting for the right cause. But war can be a vile-ruinous thing as well, especially when fought for gold-greed or power-lust.~

IF ~IsValidForPartyDialog("Korgan")~ THEN EXTERN BKORGAN KorganRespond

END

 

APPEND BKORGAN

 

IF ~~ THEN BEGIN KorganRespond

SAY ~Not the answer I'd expect from a tuskface like yerself. And here I was thinkin' I'd finally found someone with a dwarven gut fer fightin'. Yer just as slack-bladder'd as the longlegs and pointears what babysit ye.~

IF ~~ THEN EXIT

END

END

 

 

CHAIN (CHAIN3) is indeed better for a simple banter

 

In the above code you are missing three things:

 

1) After the EXTERN in the first block there should be a reference to the DLG file the game should use, I suppose it should be BLAROK

 

So 'EXTERN LarokKorgan' should be 'EXTERN BLAROK LarokKorgan'

 

2) The second block should start with APPEND BLAROK before the 'IF ~~ THEN BEGIN LarokKorgan' - without it weidu will not know to which DLG it has to add this block of dialogue.

 

3) Because of the added APPEND... the second block will also need an extra END

 

So it should look like this:

 

APPEND BLAROK

IF ~~ THEN BEGIN LarokKorgan

SAY ~Battle can be glorious if you're fighting for the right cause. But war can be a vile-ruinous thing as well, especially when fought for gold-greed or power-lust.~

IF ~IsValidForPartyDialog("Korgan")~ THEN EXTERN BKORGAN KorganRespond

END

END

 

Hope this helps.

Link to comment

Thanks Thauron, but it won't work. I'll give up on appends, I think. Now how do I activate a banter only when the party is in a specific area (in this case, the docks). I know the general commands like AreaType (CITY) but what about specific maps?

Link to comment

The trigger you are looking for is AreaCheck(""), you can find that (and list of the areas) among many other useful stuff in the IESDP.

 

Also, you'll want to get those appends mastered as it's likely you'll need them for other things. CHAIN is better for banters, though.

Link to comment

Strange, I traified this piece of banter and weidu does not come up with any errors - which means it is grammatically correct as far as I can see.

 

On a side note, did you start your d-file with BEGIN ~BLAROK~? - it is necessary for actually creating the corresponding dlg-file - without it, any references and appends to BLAROK won't work of course.

 

Besides, you will need APPEND I am afraid. At least I can't do without.

 

Anyway, a better format for this dialogue would be a CHAIN none the less.

 

Thanks Thauron, but it won't work. I'll give up on appends, I think. Now how do I activate a banter only when the party is in a specific area (in this case, the docks). I know the general commands like AreaType (CITY) but what about specific maps?

 

There are two ways to do that:

 

1) If you want a banter which fires as soon as all the necessary NPCs are in the right area you should create a CHAIN like this:

 

CHAIN3

IF ~InParty("Larok") See("Larok") !StateCheck("Larok",STATE_SLEEPING) Global("KorganLarokTalk","LOCALS",0) AreaCheck("ARXXXX") ~ THEN BKORGAN KorganLarokCityTalk

~BlahBlah~

== BLAROK ~...~

==...

 

2) If you want the dialogue the trigger when they reach a certain place on the map, have done something special,... I tend to trigger it through the ARXXXX.BCS script.

 

Correct me if I am wrong, anyone.

 

EDIT: hmm, I have been taking too long for my post again and Meira beat me to it.

Link to comment

Thanks. If I wanted Larok to just make a comment when he enters the docks, how would I do that? Something like this?

 

IF ~AreaCheck("AR0300")~ THEN Blarok LarokTell

~Ah, Athkatla docks! I have a client here by the name of Cromwell. He is craft-cunning and hammer-handy when dealing with exotic pelts and hides. He can make the most wondrous items from the strangest of things. I would suggest paying him a visit.~

IF ~~ THEN EXIT

 

Some other things I need to know as well. How would I go about adding some dialogue to Cromwell. I just want him to say hello to Larok before speaking, in the same way that Ribald greets Mazzy.

Link to comment
CHAIN3

IF ~InParty("Larok") See("Larok") !StateCheck("Larok",STATE_SLEEPING) Global("KorganLarokTalk","LOCALS",0) AreaCheck("ARXXXX") ~ THEN BKORGAN KorganLarokCityTalk

~BlahBlah~

== BLAROK ~...~

==...

 

PLEASE don't suggest to people that they use CHAIN3 as it leads to confusion as to what the different is between CHAIN and CHAIN3 (the answer being that there is none). And then they'll ask what CHAIN2 was and it all becomes extremely ridiculous.

Link to comment
IF ~AreaCheck("AR0300")~ THEN Blarok LarokTell

~Ah, Athkatla docks! I have a client here by the name of Cromwell. He is craft-cunning and hammer-handy when dealing with exotic pelts and hides. He can make the most wondrous items from the strangest of things. I would suggest paying him a visit.~

IF ~~ THEN EXIT

 

You'll also need a small section in his script in order to fire the banter, which will be something like this:

 

IF
AreaCheck("AR0300")
Global("SomeVariable","GLOBAL",0)
THEN
RESPONSE #100
SetGlobal("SomeVariable","GLOBAL",1)
Interact(Player1)
END

 

The variable "SomeVariable" is to make sure this section of script does not repeat. Similarly in the dialogue code you'll want:

 

IF ~AreaCheck("AR0300")
Global("SomeVariable","GLOBAL",1)~ THEN Blarok LarokTell
~Ah, Athkatla docks! I have a client here by the name of Cromwell. He is craft-cunning and hammer-handy when dealing with exotic pelts and hides. He can make the most wondrous items from the strangest of things. I would suggest paying him a visit.~
IF ~~ THEN DO ~SetGlobal("SomeVariable","GLOBAL",2)~ EXIT
END

 

The reason I go from "SomeVariable" 1 to 2 in the dialogue is to make sure that the dialogue block does not repeat. Otherwise, if someone tried to talk to him while in the docks area this talk could fire accidently (as it might be the first dialogue in his dialogue file with conditions that are true). Obviously we don't want this so we use a variable.

 

PS: Don't actually call it "SomeVariable"

 

Edit: You also want an END at the end of your dialogue block, which I've added.

Link to comment

Archived

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

×
×
  • Create New...