Language:
None specified     Change language:
Pastebin: 92288
Author: qfox
Subject: Untitled
Created: 2008-07-23 14:58:00
Download and save
Toggle line numbers
1local val, key; 
2local valA = 50; 
3local valB = 23; 
4local valStart = 0; 
5local valSelect = 93; 
6local valUp = 44; 
7local valDown = 24; 
8local valLeft = 73; 
9local valRight = 19; 
10 
11while (true) do 
12 --gui.drawbox(20, 20, 100, 100, "red"); 
13 key = {}; 
14 if (math.random(0, 100) > valUp)     then key.up = 1; end; 
15 if (math.random(0, 100) > valDown)   then key.down = 1; end; 
16 if (math.random(0, 100) > valLeft)   then key.left = 1; end; 
17 if (math.random(0, 100) > valRight)  then key.right = 1; end; 
18 if (math.random(0, 100) > valA)      then key.A = 1; end; 
19 if (math.random(0, 100) > valB)      then key.B = 1; end; 
20 if (math.random(0, 100) > valSelect) then key.select = 1; end; 
21 --if (math.random(0, 100) > valStart)  then key.start = 1; end; 
22 
23 joypad.set(1, key); 
24 -- next frame 
25 FCEU.frameadvance() 
26end 
Thread:
[92288] Untitled by qfox at 2008-07-23 14:58:00
Tip: Click the line numbers to toggle highliting on that line.

Paste followup:

Language:
Author:
Subject:


    Tabstop:     bigger biggest
Note: You can prefix a line with "@@@" to highlight it.