Now I'm stuck with another bit of code. I'm trying to create a slave-trader NPC who would be able to sell slaves via conversation options. AFAIK there is no way to do it via usual slave-trade screens, or at least I haven't found any.
My conversation code compiles, but it doesn't *work* as far as adding prisoners to the party is concerned. As this is my first attempt at using operations, I suppose I misused them. What's wrong here:
[trp_mrash_the_slaver|plyr,"mrash_talk", [], "I want to buy some slaves.", "mrash_slaves",[]],
[trp_mrash_the_slaver,"mrash_slaves", [], "Right. How many?", "mrash_slaves2", [(store_num_free_prisoner_stacks, reg(1), "p_main_party"), (store_troop_gold, reg(2), "trp_player"), (val_mul, reg(1), 10), (store_num_free_prisoner_stacks, reg(3), "p_main_party")]],
[trp_mrash_the_slaver|plyr,"mrash_slaves2", [], "Stock me up full.", "mrash_slaves3",[]],
[trp_mrash_the_slaver,"mrash_slaves3", [(ge,reg(2),reg(1))], "That's what I want to hear.", "mrash_pretalk", [
(troop_remove_gold, "trp_player", reg(1)),
(party_add_prisoners, "p_main_party", "trp_refugee", reg(3)),
]],
[trp_mrash_the_slaver,"mrash_slaves3", [], "You don't have that much money on you.", "mrash_pretalk", []],
[trp_mrash_the_slaver|plyr,"mrash_slaves2", [], "Five of them.", "mrash_slaves4",[]],
[trp_mrash_the_slaver,"mrash_slaves4", [(ge,reg(1),5), (ge,reg(2),50)], "Good.", "mrash_slaves", [
(troop_remove_gold, "trp_player", 50),
(party_add_prisoners, "p_main_party", "trp_refugee", 5),
]],
[trp_mrash_the_slaver,"mrash_slaves4", [(ge,reg(1),5)], "You don't have that much money on you.", "mrash_pretalk", []],
[trp_mrash_the_slaver,"mrash_slaves4", [], "You can't lead that many prisoners.", "mrash_pretalk", []],
[trp_mrash_the_slaver|plyr,"mrash_slaves2", [], "Another slave.", "mrash_slaves5",[]],
[trp_mrash_the_slaver,"mrash_slaves5", [(ge,reg(1),1), (ge,reg(2),10)], "As you wish.", "mrash_slaves", [
(troop_remove_gold, "trp_player", 10),
(party_add_prisoners, "p_main_party", "trp_refugee", 1),
]],
[trp_mrash_the_slaver,"mrash_slaves5", [(ge,reg(1),1)], "You don't have that much money on you.", "mrash_pretalk", []],
[trp_mrash_the_slaver,"mrash_slaves5", [], "You can't lead that many prisoners.", "mrash_pretalk", []],
[trp_mrash_the_slaver|plyr,"mrash_slaves2", [], "Never mind.", "mrash_pretalk",[]],
I hope the options are pretty self-explanatory.
Thanks in advance,
SC.