About: Take gold from a PC in a conversation and make sure he has enough to pay   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

This is fairly simple to do, the harder part seems to be getting the Conversation right. One thing to keep in mind when doing a conversation is that the line you don’t want displayed unless a certain condition is met comes before, lets call it the Default line. Take a look at the example. +Root NPC – Hello, it will be 50 gold for a slap in the face. PC – Ok. Pay 50 gold. NPC – You don’t have enough money. PC – [End Dialog] NPC – Great! PC – Thanks! [End Dialog] PC – No Way![End Dialog]

AttributesValues
rdfs:label
  • Take gold from a PC in a conversation and make sure he has enough to pay
rdfs:comment
  • This is fairly simple to do, the harder part seems to be getting the Conversation right. One thing to keep in mind when doing a conversation is that the line you don’t want displayed unless a certain condition is met comes before, lets call it the Default line. Take a look at the example. +Root NPC – Hello, it will be 50 gold for a slap in the face. PC – Ok. Pay 50 gold. NPC – You don’t have enough money. PC – [End Dialog] NPC – Great! PC – Thanks! [End Dialog] PC – No Way![End Dialog]
  • This is fairly simple to do, the harder part seems to be getting the Conversation right. One thing to keep in mind when doing a conversation is that the line you don't want displayed unless a certain condition is met comes before, lets call it the Default line. Take a look at the example. +Root NPC – Hello, it will be 50 gold for a slap in the face. PC – Ok. Pay 50 gold. NPC – You don’t have enough money. PC – [End Dialog] NPC – Great! PC – Thanks! [End Dialog] PC – No Way![End Dialog]
dcterms:subject
abstract
  • This is fairly simple to do, the harder part seems to be getting the Conversation right. One thing to keep in mind when doing a conversation is that the line you don’t want displayed unless a certain condition is met comes before, lets call it the Default line. Take a look at the example. +Root NPC – Hello, it will be 50 gold for a slap in the face. PC – Ok. Pay 50 gold. NPC – You don’t have enough money. PC – [End Dialog] NPC – Great! PC – Thanks! [End Dialog] PC – No Way![End Dialog] We don’t want the line NPC – You don’t have enough money. to appear unless he has enough gold to pay. So that’s were we will put the check, in the "Starting Condition" of the text node. Place this script in the "Text Appears When" hook of the text line you don’t want to show unless the PC don’t have enough money to pay. int StartingConditional() { object oPC = GetPCSpeaker(); if(GetGold(oPC) < 50) // Set the gold amount you want. { return TRUE; // Return TRUE if he has less than expected amount } return FALSE; // return FALSE otherwise. (do not display text) } If the above script is TRUE then that text node will show to the PC instead of the one below it. If it is FALSE, then the next text line will appear. Now we need to take the gold, if he has enough. In the “Actions Taken” script handle of the NPC – Greate! text node place the following script. //////////////////////////////////////////////////////// // Take Gold from PC //////////////////////////////////////////////////////// void main() { TakeGoldFromCreature(50, GetPCSpeaker(), TRUE); } //End This is a simple script from the script wizard. It takes 50 gold from the PC speaking to the NPC and then destroys it. If you want the NPC to keep the gold then change the TRUE to FALSE.
  • This is fairly simple to do, the harder part seems to be getting the Conversation right. One thing to keep in mind when doing a conversation is that the line you don't want displayed unless a certain condition is met comes before, lets call it the Default line. Take a look at the example. +Root NPC – Hello, it will be 50 gold for a slap in the face. PC – Ok. Pay 50 gold. NPC – You don’t have enough money. PC – [End Dialog] NPC – Great! PC – Thanks! [End Dialog] PC – No Way![End Dialog] We don't want the line NPC – You don't have enough money. to appear unless he has enough gold to pay. So that's were we will put the check, in the "Starting Condition" of the text node. Place this script in the "Text Appears When" hook of the text line you don't want to show unless the PC don't have enough money to pay. int StartingConditional() { object oPC = GetPCSpeaker(); if(GetGold(oPC) < 50) // Set the gold amount you want. { return TRUE; // Return TRUE if he has less than expected amount } return FALSE; // return FALSE otherwise. (do not display text) } If the above script is TRUE then that text node will show to the PC instead of the one below it. If it is FALSE, then the next text line will appear. Now we need to take the gold, if he has enough. In the “Actions Taken” script handle of the NPC – Greate! text node place the following script. //////////////////////////////////////////////////////// // Take Gold from PC //////////////////////////////////////////////////////// void main() { TakeGoldFromCreature(50, GetPCSpeaker(), TRUE); } //End This is a simple script from the script wizard. It takes 50 gold from the PC speaking to the NPC and then destroys it. If you want the NPC to keep the gold then change the TRUE to FALSE.
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software