DESOLATION

Help manual · Cre

Conversation

This file covers conversation options that can go into a creatures setup.

set_hello

This call happens when a creature first greets the player. arg can be either a string or a function pointer.

 set_hello(mixed arg);

set_start

This sets the dialog start options that a player can begin to talk to a NPC about.

 set_start( ({ "lumps", "roulette", "test" }) );

set_responses

In the example below, the “roulette” triggers a pre-made function, which returns the string that the NPC will say or do.

In “lumps”, notice that the response is also an array. It delivers the first string and then runs the function in the second argument.

In “test”, the first portion is the message. The second portion (following the @@) is the list of conversation options to add. A “-” means to not add any conversation options. The final portion is the list of conversation options to close to the player. If the final portion is “BYE” (case sensitive), all options are removed.

   set_responses( ([
       "roulette" : ({ (: attack_random() :) }),
           "lumps" : ({ "NO MORE COMBAT TEST!  DIE #@$#@ER!", (: AttackPerson :) }),
           "test" : "Yeah. Bye.  Whatever@@-@@BYE"
   ]) );
       

Selling items through dialog.

The function add_dialog_sell allows your NPCs to sell items easily through dialog. The first argument is the set_response tag to respond to, the mapping after it has the following REQUIRED arguments:

   add_dialog_sell("beer",
       ([
           "item"  : "/wiz/lucus/areas/leone/gear/beverages/chongo_beer_bottle",
           "cost"  : 9.50,
           "poor"  : "We don't take credit pal. If you wanna drink, you have to pay.@@-@@BYE",
           "give"  : "$N $vpull a bottle of Chongo Beer from under the bar and hands it to $t.",
           "drop"  : "$N $vpull a bottle of Chongo Beer from under the bar and sets it on the counter in front of you.",
           "done"  : "@@-@@BYE"
       ])          
   );  

Category:Cre