<?xml version="1.0"?><data> <dialogue npc_id="PINN"> <firstname>Pinn</firstname> <lastname>Derkhan</lastname> <unknown>A little kid</unknown> <image>pin_derkhan.jpg</image> <greetings> <morning>The boy looks up to you: "Hello".</morning> <day>The boy looks up to you: "Hello".</day> <evening>The boy looks up to you: "Hello".</evening> <night>The boy looks up to you: "Hello".</night> </greetings> <byes> <morning>"Bye!" the boy says</morning> <day>"Bye!" the boy says</day> <evening>"Bye!" the boy says</evening> <night>"Bye!" the boy says</night> </byes> <start> <text>As you approach, the little blonde-haired kid turns away from you, hiding its toy from view. Seems like he is not very fond of talking to strangers.</text> <option target="DOING">What are you doing here, little one?</option> </start> <byeknown>#BY#</byeknown> <byeunknown>The boy doesn't answer and just continues playing.</byeunknown> <greeting>Pinn is still playing with his toy. As he sees you he only looks up briefly before he continues playing. #GR#</greeting> <node id="DOING"> <text>The boy doesn't look up. "Playing...", he mumbles.</text> <option target="ALONE">Playing? All alone? Doesn't it get boring after a while?</option> <option target="NAME">My name is #PY#. And how are you called?</option> </node> <node id="ALONE"> <text>"Naaah...," the boy answers alound to make his point.</text> </node> <node id="BIG_FISH"> <text>"Yeah!" Pinn nods, very sure of this. "Or exploring! Find new islands and gold!"</text> </node> <node id="NAME" now_known="true"> <text>The boy looks up so that you see the blue bright eyes in his round face. Though still a bit shy, the boy says triumphantly: "I'm Pinn!" Then he smiles at you before returning his attention to his toy. You look over his shoulder, seeing that he's playing with a miniature ship.</text> <option target="SHIP">Lovely ship you've got there, Pinn!</option> <option target="TENDRIM_KAHLOF">Do you happen to know a man called Tendrim Kahlof living here in Nepris?</option> </node> <node id="SHIP"> <text>Pinn nods vehemently. "That's a triton ship! People go out catching big large fish with the triton! And exploring!"</text> <option target="BIG_FISH">"Would you like to hunt big fish as well when you're big?"</option> </node> <node id="TENDRIM_KAHLOF"> <text>Pinn looks a bit unsure at you with his big eyes. Then suddenly he seems to remember. "That's Uncle Tenni!"</text> <option target="UNCLE_TENNI">"Well, can you tell me where to find Uncle Tenni, Pinn?"</option> <keyword>Tendrim Kahlof</keyword> </node> <node id="UNCLE_TENNI"> <text>The boy thinks a bit, then quickly shakes his head and gets back to playing.</text> <option target="UNCLE_TENNI_SURE">Are you sure you can't lead me to Uncle Tenni? Say, if I give you a candy?</option> </node> <node id="UNCLE_TENNI_SURE"> <text>"Mom says, don't follow strangers!" He moves away a bit from you. "And never take candy from them!"</text> </node> </dialogue></data>
//morning,day,evening,nightvar GRMorning = "greetings/morning";var GRDay = "greetings/day";var GREvening = "greetings/evening";var GRNight = "greetings/night";var BYMorning = "byes/morning";var BYDay = "byes/day";var BYEvening = "byes/evening";var BYNight = "byes/night";var NPC_NAME = "npc_id";//UNIQUE IN THE WHOLE GAME - NO SPACESvar FirstName = "dialogue/firstname";var LastName = "dialogue/lastname";//TEMPLATE STARTS HEREvar Greeting = "";var GoodBye = "";var FullName = "";//Either UNKNOWN or KNOWNvar PName = "~<c:#00BFFF>" + ActivePlayer.Name + ": ~<>";//{QUESTION POOL}//{TEMPORARY VALUES}//{KEYWORDS}//{FUNCTIONS}//Miscellaneous variablesvar do_loop = true;var discuss_about = false;function save_dlg(){ //{SAVE_DLG} if(_+node.id) GlobalPer(NPC_NAME + "_node.id") = true;}function load_dlg(){ //{LOAD_DLG} if( GlobalPer(NPC_NAME + "_node.id") == true) _node.id = true; GlobalRem(NPC_NAME + "_node.id");}function OnDialog(){ Load(1,"dialogue/image"); //GREETING if (GlobalPer("$TheTime") == "morning"){ Greeting = GRMorning; GoodBye = BYMorning; } else if (GlobalPer("$TheTime") == "day"){ Greeting = GRDay; GoodBye = BYDay; } else if (GlobalPer("$TheTime") == "evening"){ Greeting = GREvening; GoodBye = BYEvening; } else if (GlobalPer("$TheTime") == "night"){ Greeting = GRNight; GoodBye = BYNight; } if (Switch(NPC_NAME + "_KNOWN") >= 1 ){ Echo("" + "dialogue/greeting");//GREETINGKNOWN FullName = FirstName + " " + LastName + ": "; } else{ FullName = "dialogue/unknown: "; } if (Switch("PINN_START_DIALOG") >= 1){ SetSwitch("PINN_START_DIALOG",0); Echo(""+ "dialogue/start/text"); //{START_OPTIONS} _+start/option/target = true; _+start/option/target = true; } load_dlg(); //load_keys(); do_loop = true; while (do_loop){ ClearOptions(); //{LOOP} if (_node.id) AddOption(0,"?","node.id()",""); if (_BYE) AddOption(0,"Bye!","do_loop = false",""); ProcessOptions(); } //GOODBYE if (Switch(NPC_NAME + "_KNOWN") == 0){ Echo(""+ "dialogue/byeunknown");//BYEUNKNOWN } else{ AlterVisibility(0,false); AlterVisibility(0,true); //BYEKNOWN Echo("" + "dialogue/byeknown"); } save_dlg(); Load(1,"logo.jpg");}
The Santharian Dream Webmaster - Let Fantasy Dreams come true!World Development Admin - The Forum where Worlds are born...