Paste #7212: war

Date: 2014/07/20 16:24:34 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


LeaderHelper:
  type: assignment 
  interact scripts: 
  - 100 LeaderInfo
  actions: 
    on assignment: 
    - trigger name:click toggle:true 
    - health toggle:false
LeaderInfo:
  type: interact 
  steps: 
    1: 
      click trigger: 
        script: 
          - chat '&b Hello what you here for?'
          - wait 10t
          - chat '&bYou can declare war and create npcs or get info about both.'
          - zap 'step:decision1' 
    'decision1':
      chat trigger:  
       'NpcCreation':
         trigger: "I want to create a /npc/."
         script:
         - zap 'step:Npc Creation'
       'war':
         trigger: "I want to declare /war/."
         script:
         - zap 'step:War'
       'info':
         trigger: "I want some /info/."
         script:
         - zap 'step:Info' 
    'Npc Creation':
         click trigger:
            script:  
            - if <player.in_group[TownLeader]> || <player.in_group[Lord]> || <player.in_group[HighLord]> {  
              - chat "&4 Welcome to the npc creation process choose Citizen:$100 or sentry:$1000 for a npc type"
              - zap 'step:SentryOrCitizen'
              } else {  
                - chat "you aren't a leader or a lord come back when you are."  
                }
    'SentryOrCitizen':
      chat trigger:  
       'Citizen':
         trigger: "i want a /citizen/."
         script:
         - if <player.money> >= 100 {
           - take money qty:100
           - create player "Citizen" <player.location> traits:builder|sentry save:npccreation 
           - narrate "A npc is created in front of you"
           - execute as_server "npc:<entry[npccreation].created_npc> owner <player.name>"
           - assignment set script:Citizen npc:<entry[npccreation].created_npc> 
           - zap step:1
           } else {
           - chat "come back when you have enough gold"
           - zap step:1
           }
       'Sentry':
         trigger: "i want a /sentry/."
         script:
         - if <player.money> >= 1000 {
           - take money qty:1000
           - create player "Sentry" <player.location> traits:builder|sentry save:npccreation 
           - narrate "A npc is created in front of you" 
           - adjust <entry[npccreation].created_npc> owner:<player.name>   
           - assignment set script:Sentry npc:<entry[npccreation].created_npc> 
           - zap step:1
           } else {
           - chat "come back when you have enough gold"
           - zap step:1
           }
    'War':
      click trigger:
        script:
        - chat "&c Welcome to the war center to declare just tell me the name of the town you want to declare on however we have made it as realistic so it will cost you 50 gold and 5 bread."
        - chat "Current factions to declare war on are 'NeoGenisisDraco' or 'OreoVille'"
     chat trigger:
       'declare':
         trigger: "I to declare on /Regex:.+/"
         script:
         - if <player.chat_history> == NeoGenisisDraco {
           - foreach <server.list_online_players> { 
             - if <player_in_group[NeoGenisisDraco] { 
               - narrate "You have begun to declare on NeoGenisisDraco "
               - if <player.money> >= 50 && player.inventory.contains[<297>].qty[5] {
                 - take money qty:50
                 - take item:297 qty:5
                 - announce "<player.name>'s faction has declared on <player.chat_history> get ready."
                 - zap step:1
                 } else {
                 - chat "come back when you have enough gold and bread"
                 - zap step:1
                 }
               } else {
               - chat "There is currently no one online in that faction please try again."
               }
           } else if <player.chat_history> == OreoVille {
             - foreach <server.list_online_players> { 
               - if <player_in_group[OreoVille] { 
                 - narrate "You have begun to declare on NeoGenisDraco"
                 - if <player.money> >= 50 && player.inventory.contains[297].qty[5] {
                   - take money qty:50
                   - take item:297 qty:5
                   - announce "<player.name>'s faction has declared on <player.chat_history> get ready."
                   - zap step:1
                   } else {
                   - chat "come back when you have enough gold and bread"
                   - zap step:1
                   }
                 } else {
                 - chat "There is currently no one online in that faction please try again."
                 }
               }
    'Info':
      click trigger:
        script:
        - chat "You can currently create one type on npc a citizen sentries aren't currently functional. With citizens theres three types of npcs miner,farmer and merchant builder is in the process of being made. Sentries will cost 1k and citizens cost $100. Citizens have a nice feature which allow you to get taxes from them every server month(30 minecraft days or every 720 minutes or every 12 hours)we've added this feature for there to be a point in citizens."
        - wait 7seconds
        - chat "Welcome to our unique of our idea of player warfare:We currently support raiding and griefing however no tnt is to be used. To declare war you must first provide me with 100 gold and 30 steak to make war realistic because it always has costs. We allow you to colonize a city and take 20% of their resources every 12 hours for 24 hours then you must withdraw and the city will be under peacetime for 48 hours. To declare war you and your enemy must both be online thank you for your cooperation enjoy."
        - zap step:1