Un PNJ de quête dispose du fichier barbe.d suivant:
Code : Tout sélectionner
BEGIN ~Barbe~
IF ~ Global("barbespeech","LOCALS",1) ~ THEN BEGIN 0
SAY ~ blabla...~
IF ~~ THEN EXTERN BKIM pirate0
END
IF ~~THEN BEGIN 1
SAY ~ blabla~
IF ~~ THEN REPLY ~ aaaa~ GOTO 2
IF ~~ THEN REPLY ~ bbbb~* GOTO 3
IF ~~ THEN REPLY ~ cccc~ GOTO 4
END
IF ~~ THEN BEGIN 2
SAY ~ blabla~
IF ~~ THEN DO ~SetGlobal("barbespeech","LOCALS",1)~ EXIT
END
IF ~~ THEN BEGIN 3
SAY ~ blabla~
IF ~~ THEN DO ~SetGlobal("barbespeech","LOCALS",2)~ EXTERN BKIM pirate1
END
IF ~~ THEN BEGIN 4
SAY ~ blabla~
IF ~~ THEN REPLY ~ aaaa ~ GOTO 2
IF ~~ THEN REPLY ~ bbbb~ GOTO 5
END
IF ~~ THEN BEGIN 5
SAY ~ blabla~
IF ~~ THEN DO ~SetGlobal("barbespeech","LOCALS",2)~ EXIT
END
APPEND BKIM
IF ~~ THEN BEGIN pirate0
SAY ~ blabla~
IF ~~ THEN EXTERN BARBE 1
END
IF ~~ THEN BEGIN pirate1
SAY ~ blabla~
IF ~~ THEN DO ~LeaveParty()
GivePartyAllEquipment()
EscapeArea()~ EXIT
END
END