168 hours before I can say the same dialogue again... How?

正在查看此主题的用户

Scared ?

Regular
I use this script
# Maverick Companion Script Start #EPIC#
  #Gain 20000 gold randomly if cheat mode is on
  [anyone|plyr,"member_question_2", [(eq,"$cheat_mode",1)], "Cheat: Could you give me some cash from that large pot of gold?", "member_moneys",[]],
  #recruit troops for a price
  [anyone|plyr,"member_question_2", [], "Could you draft in some troops for me?", "member_draft_question",[]],



  [anyone, "member_moneys", [
    (call_script, "script_troop_add_gold", "trp_player", 20000),
], "Sure why not, there is plenty in here", "do_member_view_char",[]],

  [anyone, "member_draft_question", [], "So what kind of troops do you want?", "member_draft_troop",[]],
 
  [anyone|plyr,"member_draft_troop", [], "I would like some Caravan guards.", "member_draft_troop_question2",[ (assign, "$cost_draft", 400),(assign, "$draft_id", "trp_caravan_guard"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Watchmen.", "member_draft_troop_question2",[(assign, "$cost_draft", 200), (assign, "$draft_id", "trp_watchman")]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Huntresses.", "member_draft_troop_question2",[(assign, "$cost_draft", 200), (assign, "$draft_id", "trp_hunter_woman"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Slave Drivers.", "member_draft_troop_question2",[(assign, "$cost_draft", 200), (assign, "$draft_id", "trp_slave_driver"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Swadian recruits.", "member_draft_troop_question2",[(assign, "$cost_draft", 150), (assign, "$draft_id", "trp_swadian_recruit"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Veagir recruits.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_vaegir_recruit"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Khergit tribesmen.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_khergit_tribesman"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Nord recruits.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_nord_recruit"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Rhodok tribesmen.", "member_draft_troop_question2",[(assign, "$cost_draft", 100), (assign, "$draft_id", "trp_rhodok_tribesman"),]],
  [anyone|plyr,"member_draft_troop", [], "I would like some Looters.", "member_draft_troop_question2",[(assign, "$cost_draft", 50), (assign, "$draft_id", "trp_looter"),]],
  [anyone|plyr,"member_draft_troop", [], "Never mind.", "close_window",[]],
   
  [anyone, "member_draft_troop_question2", [], "How many troops do you want?", "member_draft_troop_2",[]],
 
  [anyone|plyr,"member_draft_troop_2", [], "I would like 10.", "member_draft_troop_3",[ (assign, "$draft_num", 10)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 9.", "member_draft_troop_3",[(assign, "$draft_num", 9)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 8.", "member_draft_troop_3",[(assign, "$draft_num", :cool:]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 7.", "member_draft_troop_3",[(assign, "$draft_num", 7)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 6.", "member_draft_troop_3",[(assign, "$draft_num", 6)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 5.", "member_draft_troop_3",[(assign, "$draft_num", 5)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 4.", "member_draft_troop_3",[(assign, "$draft_num", 4)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 3.", "member_draft_troop_3",[(assign, "$draft_num", 3)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 2.", "member_draft_troop_3",[(assign, "$draft_num", 2)]],
  [anyone|plyr,"member_draft_troop_2", [], "I would like 1.", "member_draft_troop_3",[(assign, "$draft_num", 1)]],
  [anyone|plyr,"member_draft_troop_2", [], "Never mind.", "close_window",[]],
 
  [anyone, "member_draft_troop_3", [
  (party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
    (val_min, "$draft_num", ":free_capacity"),
    (store_troop_gold, ":gold", "trp_player"),
    (store_div, ":gold_capacity", ":gold", "$cost_draft"),#denars relevant to the troop you are hiring
(val_min, "$draft_num", ":gold_capacity"),
    (party_add_members, "p_main_party", "$draft_id", "$draft_num"),# sets troop to the one you chose
    (store_mul, ":cost", "$draft_num", "$cost_draft"),
    (troop_remove_gold, "trp_player", ":cost"),
], "It didn't take much to convince them to join you, Hope they serve you well.", "do_member_view_char",[]],
#This new piece of script allows you to recruit from 1 to 10 troops rather than the previous locked 10 :grin:

# Maverick Companion Script End #EPIC#

and I want to make so it takes 168 hours before I can say the dialogue again.

If I add (store_current_hours, ":time"),(eq, ":time", "$next_recruit_time"), on the part "Could you draft in some troops for me"
Like this:
  [anyone|plyr,"member_question_2", [
    (store_current_hours, ":time"),
    (eq, ":time", "$next_recruit_time"),
    ], "Could you draft in some troops for me?", "member_draft_question",[]],

And (store_current_hours, "$next_recruit_time"),(val_add, "$next_recruit_time", 240), one the part "It didn't take much to convince them to join you, Hope they serve you well"
Like this:
  [anyone, "member_draft_troop_3", [
    (store_current_hours, "$next_recruit_time"),
    (val_add, "$next_recruit_time", 16:cool:,
  (party_get_free_companions_capacity, ":free_capacity", "p_main_party"),
    (val_min, "$draft_num", ":free_capacity"),
    (store_troop_gold, ":gold", "trp_player"),
    (store_div, ":gold_capacity", ":gold", "$cost_draft"),#denars relevant to the troop you are hiring
    (val_min, "$draft_num", ":gold_capacity"),
    (party_add_members, "p_main_party", "$draft_id", "$draft_num"),# sets troop to the one you chose
    (store_mul, ":cost", "$draft_num", "$cost_draft"),
    (troop_remove_gold, "trp_player", ":cost"), 
    ], "It didn't take much to convince them to join you, Hope they serve you well.", "do_member_view_char",[]],

And (assign, "$next_recruit_time", 0), at script_game_start.

Does it still not work  :sad:

I think I need to add something to module_simple_triggers but what and where?!

Please help!

Thanks  :smile:

EDIT: I fixed it  :smile:
 
You can use assing and eq, by example, create a variable like $recruit_time

Then, you add condition in dialog begin, (eq, "$recruit_time", 1). To end of that dialog or when you want that it dont load other time until 168 hours more late, use (assign, "$recruit_time", 0)

and you create a tigger in simple_tiggers with (assign, "$recruit_time", 1) that work each 168 hours.
 
Idibil 说:
You can use assing and eq, by example, create a variable like $recruit_time

Then, you add condition in dialog begin, (eq, "$recruit_time", 1). To end of that dialog or when you want that it dont load other time until 168 hours more late, use (assign, "$recruit_time", 0)

and you create a tigger in simple_tiggers with (assign, "$recruit_time", 1) that work each 168 hours.

Thanks for advice, but I already fixed it by changing (eq, ":time", "$next_recruit_time") to (ge, ":time", "$next_recruit_time")  :grin:
 
后退
顶部 底部