{Sx} and {Regx}

正在查看此主题的用户

Could someone direct me on how to use the {Sx} and {Regx} functions?
I am trying to make it so that when you talk to the bartender, you can pay to have your troops healed, but I don't know how to really use the {Sx} and {Regx} functions to accomplish working dialog and make it work...
 
{s0},{s1},{s2}....is string register.
for example,
(str_store_troop_name, s1, "$g_talk_troop"),

{reg0},{reg1},{reg2}....is global value register. This register is not local value. You want to know difference  between global value and local value, Search the word by google.

For example, If you want to display message,
插入代码块:
  # I didn't test it.
  [anyone|plyr, "tavernkeeper_talk", [], 
  "I want to you to heal us.", 
  "tavernkeeper_heal_us",[]],

  [anyone, "tavernkeeper_heal_us", 
  [
    (store_party_size_wo_prisoners, ":charge_for_wound_treatment", "p_main_party"),
    # you have to calculate the charge.
    (assign, reg5, ":charge_for_wound_treatment"),
  ],
  "Of course, {my lord/my lady}. I reckon {reg5} denars should be enough for that. What should I tell the lads?",
  "tavernkeeper_pretalk",[]],
 
That is local value, of course.

":local_value" is local value.
"$global_value" is global value.
reg0 is global value. (but you should use it only temporary.)
s0 is string register.
 
后退
顶部 底部