Results 1 to 6 of 6

Thread: Minas Tirith's script.but something wrong need fix

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Minas Tirith's script.but something wrong need fix

    Spoiler Alert, click show to read: 


    ;who is Rohan's king

    declare_counter rohansking
    set_counter rohansking 0

    monitor_event FactionTurnStart FactionType milan
    and IsFactionLeader
    and I_SettlementOwner Helms-Deep = milan
    and I_SettlementOwner Kings-Land = milan
    and DiplomaticStanceFromFaction england = AtWar

    if FactionLeaderTrait Theoden = 1
    set_counter rohansking 1
    terminate_monitor
    end_if

    if FactionLeaderTrait Theoden = 0
    set_counter rohansking 2
    terminate_monitor
    end_if

    end_monitor

    ;===Player = Gondor===

    monitor_event FactionTurnStart FactionType sicily
    and not IsFactionAIControlled
    and I_LocalFaction sicily
    and I_SettlementUnderSiege Anorien
    and I_SettlementOwner Anorien = sicily
    and DiplomaticStanceFromFaction england = AtWar
    and DiplomaticStanceFromFaction milan = Allied

    if I_EventCounter rohansking = 1
    spawn_army
    faction milan
    character Theoden, named character, male, age 70, x 243, y 133, portrait Theoden2, hero_ability The_Heart_of_the_Lion
    traits GoodCommander 3 , PoliticsSkill 2 , GoodAdministrator 2 , Austere 1 , GoodCavalryGeneral 1 , ReligionStarter 1 , Brave 1
    ancillaries commander_eor, herugrim, rohan_horn, rohan_armour, rider_rohan
    army
    unit rohan bodyguards exp 9 armour 0 weapon_lvl 0
    unit Royal Guard exp 5 armour 0 weapon_lvl 0
    unit Royal Guard exp 5 armour 0 weapon_lvl 0
    unit Royal Guard exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan scouts exp 5 armour 0 weapon_lvl 0
    unit rohan scouts exp 5 armour 0 weapon_lvl 0
    unit rohan scouts exp 5 armour 0 weapon_lvl 0
    unit rohan scouts exp 5 armour 0 weapon_lvl 0
    unit Rohan Heavy Horsearchers exp 5 armour 0 weapon_lvl 0
    unit Rohan Heavy Horsearchers exp 5 armour 0 weapon_lvl 0
    unit Rohan Heavy Horsearchers exp 5 armour 0 weapon_lvl 0
    unit Rohan Heavy Horsearchers exp 5 armour 0 weapon_lvl 0
    end_if

    if I_EventCounter rohansking = 2
    faction milan
    character random_name, named character, male, age 70, x 243, y 133, hero_ability The_Heart_of_the_Lion
    traits GoodCommander 3 , PoliticsSkill 2 , GoodAdministrator 2 , Austere 1 , GoodCavalryGeneral 1 , ReligionStarter 1 , Brave 1
    ancillaries commander_eor, rohan_horn, rohan_armour, rider_rohan
    army
    unit rohan bodyguards exp 9 armour 0 weapon_lvl 0
    unit Royal Guard exp 5 armour 0 weapon_lvl 0
    unit Royal Guard exp 5 armour 0 weapon_lvl 0
    unit Royal Guard exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan scouts exp 5 armour 0 weapon_lvl 0
    unit rohan scouts exp 5 armour 0 weapon_lvl 0
    unit rohan scouts exp 5 armour 0 weapon_lvl 0
    unit rohan scouts exp 5 armour 0 weapon_lvl 0
    unit Rohan Heavy Horsearchers exp 5 armour 0 weapon_lvl 0
    unit Rohan Heavy Horsearchers exp 5 armour 0 weapon_lvl 0
    unit Rohan Heavy Horsearchers exp 5 armour 0 weapon_lvl 0
    unit Rohan Heavy Horsearchers exp 5 armour 0 weapon_lvl 0
    end_if

    end_monitor
    ;===Player = Mordor===

    monitor_event FactionTurnStart FactionType england
    and not IsFactionAIControlled
    and I_LocalFaction england
    and I_SettlementUnderSiege Anorien
    and I_SettlementOwner Anorien = sicily
    and DiplomaticStanceFromFaction sicily = AtWar

    if I_EventCounter rohansking = 1
    spawn_army
    faction milan
    character Theoden, named character, male, age 70, x 243, y 133, portrait Theoden2, hero_ability The_Heart_of_the_Lion
    traits GoodCommander 3 , PoliticsSkill 2 , GoodAdministrator 2 , Austere 1 , GoodCavalryGeneral 1 , ReligionStarter 1 , Brave 1
    ancillaries commander_eor, herugrim, rohan_horn, rohan_armour, rider_rohan
    army
    unit rohan bodyguards exp 9 armour 0 weapon_lvl 0
    unit Royal Guard exp 5 armour 0 weapon_lvl 0
    unit Royal Guard exp 5 armour 0 weapon_lvl 0
    unit Royal Guard exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan scouts exp 5 armour 0 weapon_lvl 0
    unit rohan scouts exp 5 armour 0 weapon_lvl 0
    unit rohan scouts exp 5 armour 0 weapon_lvl 0
    unit rohan scouts exp 5 armour 0 weapon_lvl 0
    unit Rohan Heavy Horsearchers exp 5 armour 0 weapon_lvl 0
    unit Rohan Heavy Horsearchers exp 5 armour 0 weapon_lvl 0
    unit Rohan Heavy Horsearchers exp 5 armour 0 weapon_lvl 0
    unit Rohan Heavy Horsearchers exp 5 armour 0 weapon_lvl 0
    end_if

    if I_EventCounter rohansking = 2
    faction milan
    character random_name, named character, male, age 70, x 243, y 133, hero_ability The_Heart_of_the_Lion
    traits GoodCommander 3 , PoliticsSkill 2 , GoodAdministrator 2 , Austere 1 , GoodCavalryGeneral 1 , ReligionStarter 1 , Brave 1
    ancillaries commander_eor, rohan_horn, rohan_armour, rider_rohan
    army
    unit rohan bodyguards exp 9 armour 0 weapon_lvl 0
    unit Royal Guard exp 5 armour 0 weapon_lvl 0
    unit Royal Guard exp 5 armour 0 weapon_lvl 0
    unit Royal Guard exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan rider exp 5 armour 0 weapon_lvl 0
    unit rohan scouts exp 5 armour 0 weapon_lvl 0
    unit rohan scouts exp 5 armour 0 weapon_lvl 0
    unit rohan scouts exp 5 armour 0 weapon_lvl 0
    unit rohan scouts exp 5 armour 0 weapon_lvl 0
    unit Rohan Heavy Horsearchers exp 5 armour 0 weapon_lvl 0
    unit Rohan Heavy Horsearchers exp 5 armour 0 weapon_lvl 0
    unit Rohan Heavy Horsearchers exp 5 armour 0 weapon_lvl 0
    unit Rohan Heavy Horsearchers exp 5 armour 0 weapon_lvl 0
    end_if

    end_monitor



    I finished the script but I think something was wrong. I cant find the miss.

  2. #2

    Default Re: Minas Tirith's script.but something wrong need fix

    First of all , you used 'terminate_monitor' in an if statement , wich is not allowed afaik .
    I think that 'and IsFactionLeader' requires a General condition , not a Faction condition , but apart from that , you can really make it easier . Since i assume you want to know if Theoden exists and is factionleader , this would be easier imo :

    Code:
    ; If Theoden is leader
    monitor_conditions I_CharacterExists Theoden
      and IsFactionLeader
      and I_SettlementOwner Helms-Deep = milan
      and I_SettlementOwner Kings-Land = milan
      and DiplomaticStanceFromFaction england = AtWar
    
    set_counter blahblah
    
    terminate_monitor
    end_monitor
    
    ; if theoden isn't leader
    monitor_conditions I_CharacterExists Theoden
      and not IsFactionLeader
      and I_SettlementOwner Helms-Deep = milan
      and I_SettlementOwner Kings-Land = milan
      and DiplomaticStanceFromFaction england = AtWar
    
    set_counter blahblah
    
    terminate_monitor
    end_monitor
    
    ; rest of script

  3. #3
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Minas Tirith's script.but something wrong need fix

    monitor_event FactionTurnStart I_CharacterExists Theoden
    and IsFactionLeader
    and I_SettlementOwner Helms-Deep = milan
    and I_SettlementOwner Kings-Land = milan
    and DiplomaticStanceFromFaction england = AtWar

    set_counter blahblah

    end_monitor
    Do not terminate the monitor as it will otherwise not run again if the conditions are met!










  4. #4

    Default Re: Minas Tirith's script.but something wrong need fix

    EDIT : Oh , i see , sorry for the mistake

  5. #5

    Default Re: Minas Tirith's script.but something wrong need fix

    I'm sorry for my mistake. thank you all.

  6. #6
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Minas Tirith's script.but something wrong need fix

    One is glad to be of service










Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •