Guest User

Untitled

a guest
Apr 23rd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 8.92 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE Contract SYSTEM "../xml/contract.dtd">
  3.  
  4. <Contract>
  5.     <Key name="component1" value="getComponent1"/>
  6.     <Key name="component2" value="getComponent2"/>
  7.     <Key name="component3" value="getComponent3"/>
  8.    
  9.     <Key name="reward1" value="getReward1"/>
  10.     <Key name="reward2" value="getReward2"/>
  11.     <Key name="reward3" value="getReward3"/>
  12.    
  13.     <!--
  14.     Steps:
  15.          0: Parlez à Thor
  16.          1: Parlez à Odin
  17.          2: Rapportez 1 composant électronique à Odin
  18.          3: Rapportez 20 eau pure à Odin
  19.          4: Rapportez 5 mémos disque à Odin
  20.          5: Retournez voir Odin quand il est prêt
  21.          6: Détruisez le pirate et récupérez la console Mnémos
  22.          7: Rapportez la console Mnémos à Thor
  23.          8: Récupérez la récompense auprès de Thor
  24.      -->
  25.    
  26.     <!-- Thor mécontent -->
  27.     <Variable name="grumpy" scope="attendee" type="boolean" default="false"/>
  28.     <!-- Date à laquelle tous les composants ont été livrés à Odin -->
  29.     <Variable name="deliverDate" scope="attendee" type="long" default="0"/>
  30.    
  31.     <Dialog npc="thor">
  32.         <Initialization>
  33.             <Target entry="reward">
  34.                 <Conditions>
  35.                     <AssertStep step="8" operator="superiorEquals"/>
  36.                 </Conditions>
  37.             </Target>
  38.             <Target entry="package">
  39.                 <Conditions>
  40.                     <AssertStep step="1" operator="superiorEquals"/>
  41.                 </Conditions>
  42.             </Target>
  43.             <Target entry="grump">
  44.                 <Conditions>
  45.                     <AssertVar name="grumpy" operator="equals" value="false"/>
  46.                 </Conditions>
  47.             </Target>
  48.             <Target entry="hello"/>
  49.         </Initialization>
  50.        
  51.         <!-- Bonjour -->
  52.         <Entry name="hello">
  53.             <Answer><Target entry="searchOdin"/></Answer>
  54.             <Answer><Target entry="&eod;"/></Answer>
  55.             <Answer>
  56.                 <Target entry="&eod;">
  57.                     <Actions>
  58.                         <SetVar name="grumpy" value="true"/>
  59.                     </Actions>
  60.                 </Target>
  61.             </Answer>
  62.         </Entry>
  63.        
  64.         <!-- Bonjour quand Thor n'est pas content -->
  65.         <Entry name="grump">
  66.             <Answer><Target entry="searchOdin"/></Answer>
  67.             <Answer><Target entry="&eod;"/></Answer>
  68.         </Entry>
  69.        
  70.         <!-- Va parler à Odin -->
  71.         <Entry name="searchOdin">
  72.             <Answer>
  73.                 <Target entry="&eod;">
  74.                     <Actions>
  75.                         <SetStep step="1"/>
  76.                     </Actions>
  77.                 </Target>
  78.             </Answer>
  79.         </Entry>
  80.        
  81.         <!-- Thor veut sa console mnémos -->
  82.         <Entry name="package">
  83.             <Answer>
  84.                 <Target entry="reward">
  85.                     <Actions>
  86.                         <TakeResources type="88" count="1"/>
  87.                         <SetStep step="8"/>
  88.                     </Actions>
  89.                 </Target>
  90.             </Answer>
  91.             <Answer><Target entry="&eod;"/></Answer>
  92.         </Entry>
  93.        
  94.         <!-- Récompense -->
  95.         <Entry name="reward">
  96.             <Answer>
  97.                 <Target entry="&eod;">
  98.                     <Actions>
  99.                         <GiveResources type="86" count="1"/>
  100.                         <ContractEnd success="true"/>
  101.                     </Actions>
  102.                 </Target>
  103.             </Answer>
  104.             <Answer><Target entry="&eod;"/></Answer>
  105.         </Entry>
  106.     </Dialog>
  107.    
  108.     <Dialog npc="odin">
  109.         <Initialization>
  110.             <Target entry="pirateAgain">
  111.                 <Conditions>
  112.                     <AssertStep step="6" operator="superiorEquals"/>
  113.                 </Conditions>
  114.             </Target>
  115.             <Target entry="pirate">
  116.                 <Conditions>
  117.                     <AssertStep step="5" operator="equals"/>
  118.                     <AssertVar name="deliverDate" operator="inferiorEquals" value="now()-2*60"/>
  119.                 </Conditions>
  120.             </Target>
  121.             <Target entry="wait">
  122.                 <Conditions>
  123.                     <AssertStep step="5" operator="equals"/>
  124.                 </Conditions>
  125.             </Target>
  126.             <Target entry="thirdComponentAgain">
  127.                 <Conditions>
  128.                     <AssertStep step="4" operator="equals"/>
  129.                 </Conditions>
  130.             </Target>
  131.             <Target entry="secondComponentAgain">
  132.                 <Conditions>
  133.                     <AssertStep step="3" operator="equals"/>
  134.                 </Conditions>
  135.             </Target>
  136.             <Target entry="firstComponentAgain">
  137.                 <Conditions>
  138.                     <AssertStep step="2" operator="equals"/>
  139.                 </Conditions>
  140.             </Target>
  141.             <Target entry="tool">
  142.                 <Conditions>
  143.                     <AssertStep step="1" operator="equals"/>
  144.                 </Conditions>
  145.             </Target>
  146.             <Target entry="hello"/>
  147.         </Initialization>
  148.        
  149.         <!-- Bonjour quand le joueur n'a pas parlé à Thor -->
  150.         <Entry name="hello">
  151.             <Answer><Target entry="&eod;"/></Answer>
  152.         </Entry>
  153.        
  154.         <!-- J'ai besoin d'aide -->
  155.         <Entry name="tool">
  156.             <Answer>
  157.                 <Target entry="components">
  158.                     <Actions>
  159.                         <SetStep step="2"/>
  160.                     </Actions>
  161.                 </Target>
  162.             </Answer>
  163.             <Answer><Target entry="&eod;"/></Answer>
  164.         </Entry>
  165.        
  166.         <!-- Trouve le composant 1 -->
  167.         <Entry name="firstComponent">
  168.             <Answer>
  169.                 <Target entry="secondComponent">
  170.                     <Actions>
  171.                         <TakeResources type="60" count="1"/>
  172.                         <SetStep step="3"/>
  173.                     </Actions>
  174.                 </Target>
  175.             </Answer>
  176.             <Answer><Target entry="helpFirstComponent"/></Answer>
  177.             <Answer><Target entry="helpSecondComponent"/></Answer>
  178.             <Answer><Target entry="helpThirdComponent"/></Answer>
  179.             <Answer><Target entry="&eod;"/></Answer>
  180.         </Entry>
  181.        
  182.         <!-- As-tu trouvé le composant 1 ? -->
  183.         <Entry name="firstComponentAgain">
  184.             <Answer>
  185.                 <Target entry="secondComponent">
  186.                     <Actions>
  187.                         <TakeResources type="60" count="1"/>
  188.                         <SetStep step="3"/>
  189.                     </Actions>
  190.                 </Target>
  191.             </Answer>
  192.             <Answer><Target entry="helpFirstComponent"/></Answer>
  193.             <Answer><Target entry="helpSecondComponent"/></Answer>
  194.             <Answer><Target entry="helpThirdComponent"/></Answer>
  195.             <Answer><Target entry="&eod;"/></Answer>
  196.         </Entry>
  197.        
  198.         <!-- Merci et trouve le composant 2 -->
  199.         <Entry name="secondComponent">
  200.             <Answer>
  201.                 <Target entry="secondComponent">
  202.                     <Actions>
  203.                         <TakeResources type="50" count="20"/>
  204.                         <SetStep step="4"/>
  205.                     </Actions>
  206.                 </Target>
  207.             </Answer>
  208.             <Answer><Target entry="helpSecondComponent"/></Answer>
  209.             <Answer><Target entry="helpThirdComponent"/></Answer>
  210.             <Answer><Target entry="&eod;"/></Answer>
  211.         </Entry>
  212.        
  213.         <!-- As-tu trouvé le composant 2 ? -->
  214.         <Entry name="secondComponentAgain">
  215.             <Answer>
  216.                 <Target entry="secondComponent">
  217.                     <Actions>
  218.                         <TakeResources type="50" count="20"/>
  219.                         <SetStep step="4"/>
  220.                     </Actions>
  221.                 </Target>
  222.             </Answer>
  223.             <Answer><Target entry="helpSecondComponent"/></Answer>
  224.             <Answer><Target entry="helpThirdComponent"/></Answer>
  225.             <Answer><Target entry="&eod;"/></Answer>
  226.         </Entry>
  227.        
  228.         <!-- Merci et trouve le composant 3 -->
  229.         <Entry name="thirdComponent">
  230.             <Answer>
  231.                 <Target entry="thanks">
  232.                     <Actions>
  233.                         <TakeResources type="87" count="5"/>
  234.                         <SetVar name="deliverDate" value="now()"/>
  235.                         <SetStep step="5"/>
  236.                     </Actions>
  237.                 </Target>
  238.             </Answer>
  239.             <Answer><Target entry="helpThirdComponent"/></Answer>
  240.             <Answer><Target entry="&eod;"/></Answer>
  241.         </Entry>
  242.        
  243.         <!-- As-tu trouvé le composant 3 ? -->
  244.         <Entry name="thirdComponentAgain">
  245.             <Answer>
  246.                 <Target entry="thanks">
  247.                     <Actions>
  248.                         <TakeResources type="87" count="5"/>
  249.                         <SetVar name="deliverDate" value="now()"/>
  250.                         <SetStep step="5"/>
  251.                     </Actions>
  252.                 </Target>
  253.             </Answer>
  254.             <Answer><Target entry="helpThirdComponent"/></Answer>
  255.             <Answer><Target entry="&eod;"/></Answer>
  256.         </Entry>
  257.        
  258.         <!-- Où se trouve le composant 1 ? -->
  259.         <Entry name="helpFirstComponent">
  260.             <Answer hidden="true">
  261.                 <Target entry="helpSecondComponent">
  262.                     <Conditions>
  263.                         <AssertStep step="3" operator="inferiorEquals"/>
  264.                     </Conditions>
  265.                 </Target>
  266.             </Answer>
  267.             <Answer hidden="true">
  268.                 <Target entry="helpThirdComponent">
  269.                     <Conditions>
  270.                         <AssertStep step="4" operator="inferiorEquals"/>
  271.                     </Conditions>
  272.                 </Target>
  273.             </Answer>
  274.             <Answer><Target entry="&eod;"/></Answer>
  275.         </Entry>
  276.        
  277.         <!-- Où se trouve le composant 2 ? -->
  278.         <Entry name="helpSecondComponent">
  279.             <Answer hidden="true">
  280.                 <Target entry="helpFirstComponent">
  281.                     <Conditions>
  282.                         <AssertStep step="2" operator="inferiorEquals"/>
  283.                     </Conditions>
  284.                 </Target>
  285.             </Answer>
  286.             <Answer hidden="true">
  287.                 <Target entry="helpThirdComponent">
  288.                     <Conditions>
  289.                         <AssertStep step="4" operator="inferiorEquals"/>
  290.                     </Conditions>
  291.                 </Target>
  292.             </Answer>
  293.             <Answer><Target entry="&eod;"/></Answer>
  294.         </Entry>
  295.        
  296.         <!-- Où se trouve le composant 3 ? -->
  297.         <Entry name="helpThirdComponent">
  298.             <Answer hidden="true">
  299.                 <Target entry="helpFirstComponent">
  300.                     <Conditions>
  301.                         <AssertStep step="2" operator="inferiorEquals"/>
  302.                     </Conditions>
  303.                 </Target>
  304.             </Answer>
  305.             <Answer hidden="true">
  306.                 <Target entry="helpSecondComponent">
  307.                     <Conditions>
  308.                         <AssertStep step="3" operator="inferiorEquals"/>
  309.                     </Conditions>
  310.                 </Target>
  311.             </Answer>
  312.             <Answer><Target entry="&eod;"/></Answer>
  313.         </Entry>
  314.        
  315.         <!-- Pas encore prêt -->
  316.         <Entry name="wait">
  317.             <Answer><Target entry="&eod;"/></Answer>
  318.         </Entry>
  319.        
  320.         <!-- Pas encore prêt -->
  321.         <Entry name="pirate">
  322.             <Answer>
  323.                 <Target entry="&eod;">
  324.                     <Actions>
  325.                         <RunScript name="spawnPirate"/>
  326.                         <SetStep step="6"/>
  327.                     </Actions>
  328.                 </Target>
  329.             </Answer>
  330.         </Entry>
  331.        
  332.         <!-- Depêche toi -->
  333.         <Entry name="pirateAgain">
  334.             <Answer><Target entry="&eod;"/></Answer>
  335.         </Entry>
  336.     </Dialog>
  337. </Contract>
Add Comment
Please, Sign In to add comment