Advertisement
Drakonas

Untitled

Apr 19th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.52 KB | None | 0 0
  1. --[[ Lua code. See documentation: http://berserk-games.com/knowledgebase/scripting/ --]]
  2.  
  3. --[[ The OnLoad function. This is called after everything in the game save finishes loading.
  4. Most of your script code goes here. --]]
  5. function onload()
  6.   StartToken = getObjectFromGUID('bfb417')
  7.  
  8.   StartToken.clearButtons()
  9.   StartToken.createButton({['click_function'] = 'StartGame', ['label'] = 'Start', ['function_owner'] = Global, ['position'] = {StartToken.  getPosition()['x']+0.02, StartToken.    getPosition()['y']-1.7, StartToken. getPosition()['z']-3.6}, ['rotation'] =  {0, 180, 0}, ['width'] = 500, ['height'] = 500, ['font_size'] = 250})
  10. end
  11.  
  12. function StartGame()
  13.   StartToken = getObjectFromGUID('bfb417')
  14.   print('Querying Cards...')
  15.   dollar1 = getObjectFromGUID('65c992')
  16.   dollar5 = getObjectFromGUID('708f1d')
  17.   dollar10 = getObjectFromGUID('4da4a3')
  18.   dollar20= getObjectFromGUID('f71f05')
  19.   dollar50 = getObjectFromGUID('69d718')
  20.   dollar100 = getObjectFromGUID('93edd0')
  21.   dollar500 = getObjectFromGUID('5c9338')
  22.   questionBlock = getObjectFromGUID('4539f9')
  23.   coinBlock = getObjectFromGUID('b5bfc2')
  24.  
  25.   print('Dealing Cards...')
  26.   dollar1.  dealToAll(5)
  27.   dollar5.dealToAll(5)
  28.   dollar10.dealToAll(5)
  29.   dollar20.dealToAll(6)
  30.   dollar50.dealToAll(2)
  31.   dollar100.dealToAll(2)
  32.   dollar500.dealToAll(2)
  33.  
  34.   print('Shuffling Block Cards')
  35.   questionBlock.shuffle()
  36.   coinBlock.shuffle()
  37. end
  38.  
  39. --[[ The Update function. This is called once per frame. --]]
  40. function update ()
  41.     --[[ print('Update loop!') --]]
  42. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement