Results 1 to 6 of 6

Thread: Is there any reason why this script won't work?

Hybrid View

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

    Default Is there any reason why this script won't work?

    Can't seem to get it to work...

    Spoiler Alert, click show to read: 

    ;;;;;;;;;;;;;;;;;;;;;;Light of Earendil Script;;;;;;;;;;;;;;;;;;;;
    declare_counter Light_Earendil

    monitor_event FactionTurnStart FactionType egypt
    and I_LocalFaction egypt
    and I_TurnNumber = 2


    event counter Light_Earendil_accepted
    event counter Light_Earendil_declined

    historic_event Light_Earendil true factions { egypt }

    end_monitor
    ;;;;;;;;;;;;;;;;;;;;;;;Accepts Light of Earendil;;;;;;;;;;;;;;;;;;
    monitor_conditions I_EventCounter Light_Earendil_accepted == 1
    add_money egypt -8000;removes 8k for research
    historic_event Light_Earendil_accepted factions { egypt, } ;message should appear saying it is accepted...
    console_command create_building Imladris light_earendil

    end_monitor
    ;;;;;;;;;;;;;;;;;;;;;;;Declines Light of Earendil;;;;;;;;;;;;;;;;
    monitor_conditions I_EventCounter Light_Earendil_declined == 1
    historic_event Light_Earendil_declined factions { egypt, } ;Message appears saying it is declined...

    end_monitor

  2. #2

    Icon1 Re: Is there any reason why this script won't work?

    Toryn: Try this:

    Spoiler Alert, click show to read: 
    Code:
    ;;;;;;;;;;;;;;;;;;;;;;Light of Earendil Script;;;;;;;;;;;;;;;;;;;;
    
    declare_counter Light_Earendil
    
    	monitor_event FactionTurnStart FactionType egypt
    		and I_LocalFaction egypt
    		and I_TurnNumber = 2
    		add_events
    		event 	counter Light_Earendil_accepted
    		event 	counter Light_Earendil_declined
    	 	date	0
    	 	end_add_events
    		historic_event Light_Earendil true
    	end_monitor


    Or this:
    Spoiler Alert, click show to read: 
    Code:
    ;;;;;;;;;;;;;;;;;;;;;;Light of Earendil Script;;;;;;;;;;;;;;;;;;;;
    
    declare_counter Light_Earendil
    
    	monitor_event FactionTurnStart FactionIsLocal
    		and FactionType egypt
    		and I_TurnNumber = 2
    		historic_event Light_Earendil true
    	end_monitor

  3. #3

    Default Re: Is there any reason why this script won't work?

    Quote Originally Posted by Toryn View Post
    Can't seem to get it to work...


    ;;;;;;;;;;;;;;;;;;;;;;Light of Earendil Script;;;;;;;;;;;;;;;;;;;;
    declare_counter Light_Earendil

    monitor_event FactionTurnStart FactionType egypt
    and I_LocalFaction egypt
    and I_TurnNumber = 2

    add_events
    event counter Light_Earendil_accepted
    event counter Light_Earendil_declined
    date 0
    end_add_events


    historic_event Light_Earendil true factions { egypt }

    end_monitor
    ;;;;;;;;;;;;;;;;;;;;;;;Accepts Light of Earendil;;;;;;;;;;;;;;;;;;
    monitor_conditions I_EventCounter Light_Earendil_accepted = 1
    add_money egypt -8000;removes 8k for research
    historic_event Light_Earendil_accepted factions { egypt, } ;message should appear saying it is accepted...
    console_command create_building Imladris light_earendil

    end_monitor
    ;;;;;;;;;;;;;;;;;;;;;;;Declines Light of Earendil;;;;;;;;;;;;;;;;
    monitor_conditions I_EventCounter Light_Earendil_declined = 1
    historic_event Light_Earendil_declined factions { egypt, } ;Message appears saying it is declined...

    end_monitor
    Fixed.
    Last edited by Ishan; August 06, 2010 at 12:25 AM.

  4. #4

    Default Re: Is there any reason why this script won't work?

    Worked! Thanks guys...I had thought that the 'add event' wasn't required anymore in kingdoms...

    Scripting is complicated...

  5. #5

    Default Re: Is there any reason why this script won't work?

    Glad to help friend.

  6. #6

    Default Re: Is there any reason why this script won't work?

    Worked! Thanks guys...I had thought that the 'add event' wasn't required anymore in kingdoms...

    Scripting is complicated...
    monitor_event FactionTurnStart FactionType egypt
    and I_LocalFaction egypt
    and I_TurnNumber = 2


    event counter Light_Earendil_accepted
    event counter Light_Earendil_declined


    historic_event Light_Earendil true factions { egypt }

    end_monitor
    Id like to add my 2 cents
    you dont need the add event end add events... the above can be simplified to

    monitor_event FactionTurnStart FactionType egypt
    and I_LocalFaction egypt
    and I_TurnNumber = 2

    historic_event Light_Earendil true factions { egypt }
    end_monitor


    the following lines...
    event counter Light_Earendil_accepted
    event counter Light_Earendil_declined

    ...are simply 'declaring' these event counters. Event counters do not need to be declared. Therefore, they are not needed. BUT with that said, if you for whatever reason wish to declare them, then you are required to use the add_events and end_add_events command lines... such as
    add_events
    event counter Light_Earendil_accepted
    event counter Light_Earendil_declined

    date 0
    end_add_events


    All events can be called this same way.
    historic_event Light_Earendil true factions { egypt }
    historic_event = tells the game engine this is a historic event
    Light_Earendil = the name of the event which is also used in other files.
    true = determines that this event is an accept/decline event (optional)
    factions { egypt }= determines which factions recieve the event (optional)
    both true and factions are optional. the event would fire without them in the script (but not as an accept decline event).
    ...longbows, in skilled hands, could reach further than trebuchets...

Posting Permissions

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