Difference between revisions of "MenuMate Tutorial"

111 bytes added ,  20:56, 7 December 2008
imported>Speedo
imported>Speedo
 
Line 15: Line 15:
scn BankDemoScript
scn BankDemoScript


int accountBalance ; player's account balance
int accountBalance


ref playerRef ; ref used to display the player's name
ref playerRef
int playerGold ; player's current gold
int playerGold
int minVar ; minimum amount for the counterbuttons
int minVar
int temp ; used for player input
int temp
int invert ; toggle for the inversion of the counterbuttons
int invert
 
int displayStatus
float fQuestDelayTime
 
begin MenuMode
  if (displayStatus)
    mmUpdate
  endif
end


begin GameMode
begin GameMode
  ; initialize the variables
   set fQuestDelayTime to 0.0001
   set playerRef to player
  set playerGold to player.GetItemCount Gold001
  set minVar to 0
  set temp to 0
  set invert to 0
    
    
   ; display the menu
   if (displayStatus == 0)   
  mmLoadMenu "demo.xml"
    set playerRef to player
   StopQuest BankDemo
    set playerGold to player.GetItemCount Gold001
    set minVar to 0
    set temp to 0
    set invert to 0
   
    if (mmLoadMenu "demo.xml")
      set displayStatus to 1
    else
      PrintC "menu failed to load"
      StopQuest BankDemo
    endif
   
   elseif (mmGetStatus == 1)
    set displayStatus to 0
    StopQuest BankDemo
  endif
end
end
</pre>
</pre>
Anonymous user