Difference between revisions of "MenuMate Tutorial"

Jump to navigation Jump to search
75 bytes added ,  20:55, 7 December 2008
imported>Speedo
(created)
 
imported>Speedo
Line 44: Line 44:


<menu>
<menu>
   <start>main</start>
   <start name="main"/>
   <dialog>deposit</dialog>
   <dialog name="deposit"/>
   <dialog>withdraw</dialog>
   <dialog name="withdraw"/>
  <dialog name="buttondemo"/>
</menu>
</menu>


<main>
<main>
   <text format="Greetings %n!%rYour balance is %.0f gold, what do you wish to do?">
   <text format="Greetings %n!%rYour balance is %.0f gold, what do you wish to do?">
     <param>playerRef</param>
     <param name="playerRef"/>
     <param>accountBalance</param>
     <param name="accountBalance"/>
   </text>
   </text>
    
    
Line 68: Line 69:
</main>
</main>


<!-- This dialog inverts its counterbuttons via a togglebutton + toggle variable -->
<deposit>
<deposit>
   <text format="Deposit Amount: %.0f%rYou have %.0f gold">
   <text format="Deposit Amount: %.0f%rYou have %.0f gold">
     <param>temp</param>
     <param name="temp"/>
     <param>playerGold</param>
     <param name="playerGold"/>
   </text>
   </text>
    
    
Line 97: Line 99:
     <text format="Finish"/>
     <text format="Finish"/>
     <script>
     <script>
       set BankDemo.accountBalance to BankDemo.accountBalance + BankDemo.temp &amp;#10;
       set BankDemo.accountBalance to BankDemo.accountBalance + BankDemo.temp &#10;
       player.RemoveItem 0000000F BankDemo.temp &amp;#10;
       player.RemoveItem 0000000F BankDemo.temp &#10;
       MessageBox "Your new balance is %.0f gold" BankDemo.accountBalance
       MessageBox "Your new balance is %.0f gold" BankDemo.accountBalance
     </script>
     </script>
Line 108: Line 110:
</deposit>
</deposit>


<!-- This dialog makes use of the toggle key(s) to invert its counters -->
<withdraw>
<withdraw>
   <text format="Withdraw Amount: %.0f%rYour balance is %.0f gold">
   <text format="Withdraw Amount: %.0f%rYour balance is %.0f gold%r%rHold one of these keys to decrease the amount: [INVERTKEYS]">
     <param>temp</param>
     <param name="temp"/>
     <param>accountBalance</param>
     <param name="accountBalance"/>
   </text>
   </text>
    
    
  <togglebutton targetvar="invert" truetext="subtracting" falsetext="adding">
   <counterbutton targetvar="temp" amount="1" maxvar="accountBalance" minvar="minVar" usekeyinvert="1">
    <text format="Toggle Add/Subtract%r(currently [STATE])"/>
  </togglebutton>
 
   <counterbutton targetvar="temp" amount="1" invertvar="invert" maxvar="accountBalance" minvar="minVar">
     <text format="[STATE]"/>
     <text format="[STATE]"/>
   </counterbutton>
   </counterbutton>
    
    
   <counterbutton targetvar="temp" amount="10" invertvar="invert" maxvar="accountBalance" minvar="minVar">
   <counterbutton targetvar="temp" amount="10" maxvar="accountBalance" minvar="minVar" usekeyinvert="1">
     <text format="[STATE]"/>
     <text format="[STATE]"/>
   </counterbutton>
   </counterbutton>
    
    
   <counterbutton targetvar="temp" amount="100" invertvar="invert" maxvar="accountBalance" minvar="minVar">
   <counterbutton targetvar="temp" amount="100" maxvar="accountBalance" minvar="minVar" usekeyinvert="1">
     <text format="[STATE]"/>
     <text format="[STATE]"/>
   </counterbutton>
   </counterbutton>
    
    
   <counterbutton targetvar="temp" amount="1000" invertvar="invert" maxvar="accountBalance" minvar="minVar">
   <counterbutton targetvar="temp" amount="1000" maxvar="accountBalance" minvar="minVar" usekeyinvert="1">
     <text format="[STATE]"/>
     <text format="[STATE]"/>
   </counterbutton>
   </counterbutton>
Line 137: Line 136:
     <text format="Finish"/>
     <text format="Finish"/>
     <script>
     <script>
       set BankDemo.accountBalance to BankDemo.accountBalance - BankDemo.temp &amp;#10;
       set BankDemo.accountBalance to BankDemo.accountBalance - BankDemo.temp &#10;
       player.AddItem 0000000F BankDemo.temp &amp;#10;
       player.AddItem 0000000F BankDemo.temp &#10;
       MessageBox "Your new balance is %.0f gold" BankDemo.accountBalance
       MessageBox "Your new balance is %.0f gold" BankDemo.accountBalance
     </script>
     </script>
Anonymous user

Navigation menu