Seite 70 von 342 ErsteErste ... 20 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 120 170 ... LetzteLetzte
Zeige Ergebnis 2.071 bis 2.100 von 10238

Lua Programming Help Thread

This is a discussion on Lua Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Zitat von Grimfate126 put this: Code: math.randomseed(os.time()) at the VERY top of your code. itll work. i did and it ...

  
  1. #2071
    QJ Gamer Silver
    Points: 9.678, Level: 66
    Level completed: 7%, Points required for next Level: 372
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    The Migrant Fleet
    Beiträge
    908
    Points
    9.678
    Level
    66
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    put this:

    Code:
    math.randomseed(os.time())
    at the VERY top of your code. itll work.
    i did and it doesnt work



  2. #2072
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von montrob
    i did and it doesnt work

    did it give you an error?
    --------------------------------------------------------------------------------------

  3. #2073
    QJ Gamer Silver
    Points: 9.678, Level: 66
    Level completed: 7%, Points required for next Level: 372
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    The Migrant Fleet
    Beiträge
    908
    Points
    9.678
    Level
    66
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    did it give you an error?
    nope..

    heres what happens.. every time i start the program i get a diff. random number.. but it stays like that for the whole game

  4. #2074
    TheMarioKarters
    Guest

    Standard

    Zitat Zitat von montrob
    nope..

    heres what happens.. every time i start the program i get a diff. random number.. but it stays like that for the whole game
    That's what your code is supposed to do.

  5. #2075
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von montrob
    nope..

    heres what happens.. every time i start the program i get a diff. random number.. but it stays like that for the whole game

    umm.. thats kinda the point...

    p.s. dam, TMK beat me to it.
    --------------------------------------------------------------------------------------

  6. #2076
    QJ Gamer Silver
    Points: 9.678, Level: 66
    Level completed: 7%, Points required for next Level: 372
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    The Migrant Fleet
    Beiträge
    908
    Points
    9.678
    Level
    66
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von TheMarioKarters
    That's what your code is supposed to do.
    umm well could you read my post on the previous page..

  7. #2077
    TheMarioKarters
    Guest

    Standard

    Zitat Zitat von montrob
    umm well could you read my post on the previous page..
    I did...the code you posted does exactly what it's supposed to do.

  8. #2078
    QJ Gamer Silver
    Points: 11.326, Level: 70
    Level completed: 19%, Points required for next Level: 324
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    871
    Points
    11.326
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    I have a probleme:

    Code:
    if pad:cross() and Command == 1 then
    Select:play() Drawcard = 1
    end
    
    if Drawcard == 1 then
    drawCard() Points = Points+Pointstwo
    end
    but how do i make so that when i press X again it will do

    drawCardthree() Points = Points+Pointstwo+Pointsth ree
    and not
    drawCard() Points = Points+Pointstwo
    Geändert von ZereoX (05-06-2006 um 08:20 AM Uhr)

  9. #2079
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von ZereoX
    I have a probleme:
    if pad:cross() and Command == 1 then
    Selectlay() Drawcard = 1
    end

    if Drawcard == 1 then
    drawCard()
    end

    but how do i make so that when i press X again it will do

    drawCardthree() Points = Points+Pointstwo+Pointsth ree

    i dunt get a word ur saying... next time u post code, put it in the code tags, its much easieer to read.
    --------------------------------------------------------------------------------------

  10. #2080
    TheMarioKarters
    Guest

    Standard

    Zitat Zitat von ZereoX
    Code:
    I have a probleme:
    if pad:cross() and Command == 1 then
    Select:play() Drawcard = 1
    end
    
    if Drawcard == 1 then
    drawCard()
    end
    
    but how do i make so that when i press X again it will do 
    
    drawCardthree() Points = Points+Pointstwo+Pointsthree
    Next time post it like this.

  11. #2081
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von TheMarioKarters
    Next time post it like this.

    NOW i get it.

    try this:

    Code:
    if pad:cross() then
    Points = Points + Pointstwo + Pointsthree
    drawCardthree()
    end
    --------------------------------------------------------------------------------------

  12. #2082
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von ZereoX
    I have a probleme:

    Code:
    if pad:cross() and Command == 1 then
    Select:play() Drawcard = 1
    end
    
    if Drawcard == 1 then
    drawCard()
    end
    but how do i make so that when i press X again it will do

    drawCardthree() Points = Points+Pointstwo+Pointsth ree
    and not
    drawCard() Points = Points+Pointstwo
    include a second variable with

    Code:
    if Drawcard == 1 then
    drawCard()
    end
    Code:
    if Drawcard == 1 and variable == 1 then
    drawCard()
    end
    have the second variable keep changing everytime you press X.

    Code:
    if pad:cross() and Command == 1 then
    Select:play() Drawcard = 1 
    variable = variable + 1
    end
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  13. #2083
    QJ Gamer Silver
    Points: 11.326, Level: 70
    Level completed: 19%, Points required for next Level: 324
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    871
    Points
    11.326
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    i got it working but here is the problem
    Code:
    if pad:cross() and Command == 1 then
    Select:play() Drawcard = 1
    end
    
    if Drawcard == 1 then
    drawCard() Points = Points + Pointstwo
    Drawcardthree = 1
    end
    
    if pad:cross() and Command == 1 and Drawcardthree == 1 then
    Select:play()
    Drawcardthree = 2
    end
    
    if Drawcardthree == 2 then
    drawCardthree() Points = Points+Pointsthree
    end
    When you start the game the first card appears then when you press hit the second and the third for lke 5 milliesecond appears but when you press hit again you have to hold the x so that the third card stay's there.
    What can i do so it wont's dissapear when i let go X
    Geändert von ZereoX (05-06-2006 um 09:12 AM Uhr)

  14. #2084
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von ZereoX
    i got it working but here is the problem
    Code:
    if pad:cross() and Command == 1 then
    Select:play() Drawcard = 1
    end
    
    if Drawcard == 1 then
    drawCard() Points = Points + Pointstwo
    Drawcardthree = 1
    end
    
    if pad:cross() and Command == 1 and Drawcardthree == 1 then
    Select:play()
    Drawcardthree = 2
    end
    
    if Drawcardthree == 2 then
    drawCardthree() Points = Points+Pointsthree
    end
    When you start the game the first card appears then when you press hit the second and the third for lke 5 milliesecond appears but when you press hit again you have to hold the x so that the third card stay's there.
    What can i do so it wont's dissapear when i let go X
    another variable.
    lol
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  15. #2085
    QJ Gamer Silver
    Points: 11.326, Level: 70
    Level completed: 19%, Points required for next Level: 324
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    871
    Points
    11.326
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    what do you mean other variable LOL

    ??
    Example plz.

  16. #2086
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von ZereoX
    what do you mean other variable LOL

    ??
    Example plz.
    i need to see the part of your code where the actual blitting takes place.
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  17. #2087
    QJ Gamer Silver
    Points: 11.326, Level: 70
    Level completed: 19%, Points required for next Level: 324
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    871
    Points
    11.326
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Do you want me to give it all to you by msn or just post all my code.

  18. #2088
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von ZereoX
    Do you want me to give it all to you by msn or just post all my code.
    post it.
    i dont use instant messengers.
    a nasty virus came in from msn, so i dont use it anymore.
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  19. #2089
    QJ Gamer Silver
    Points: 11.326, Level: 70
    Level completed: 19%, Points required for next Level: 324
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    871
    Points
    11.326
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Code:
    -- FF IX Black Jack
    -- Author:Zereo_X
    
    -- Color Defenition
    red = Color.new(255,0,0)
    blue = Color.new(0,255,0)
    green = Color.new(0,0,255)
    white = Color.new(255,255,255)
    
    -- Image Load/Sound/Music/
    Table = Image.load("images/Table.png")
    PauseMenu = Image.load("images/Gamepaused.png")
    GameOver = Image.load("images/GameOver.png")
    Title = Image.load("images/TitleScreen.png")
    Selector = Image.load("images/Selector.png")
    Select = Sound.load("sounds/Select.wav",false)
    
    --Drawcardfunction
    function drawCard()
    if W == 1 then screen:blit(55, 165, Aceclover)
    elseif W == 2 then screen:blit(55, 165, Acediamond)
    elseif W == 3 then screen:blit(55, 165, Aceheart)
    elseif W == 4 then screen:blit(55, 165, Acespade)
    elseif W == 5 then screen:blit(55, 165, Twoclover)
    elseif W == 6 then screen:blit(55, 165, Twodiamond)
    elseif W == 7 then screen:blit(55, 165, Twoheart)
    elseif W == 8 then screen:blit(55, 165, Twospade)
    elseif W == 9 then screen:blit(55, 165, Threeclover)
    elseif W == 10 then screen:blit(55, 165, Threediamond)
    elseif W == 11 then screen:blit(55, 165, Threeheart)
    elseif W == 12 then screen:blit(55, 165, Threespade)
    elseif W == 13 then screen:blit(55, 165, Fourclover)
    elseif W == 14 then screen:blit(55, 165, Fourdiamond)
    elseif W == 15 then screen:blit(55, 165, Fourheart)
    elseif W == 16 then screen:blit(55, 165, Fourspade)
    elseif W == 17 then screen:blit(55, 165, Fiveclover)
    elseif W == 18 then screen:blit(55, 165, Fivediamond)
    elseif W == 19 then screen:blit(55, 165, Fiveheart)
    elseif W == 20 then screen:blit(55, 165, Fivespade)
    elseif W == 21 then screen:blit(55, 165, Sixclover)
    elseif W == 22 then screen:blit(55, 165, Sixdiamond)
    elseif W == 23 then screen:blit(55, 165, Sixheart)
    elseif W == 24 then screen:blit(55, 165, Sixspade)
    elseif W == 25 then screen:blit(55, 165, Sevenclover)
    elseif W == 26 then screen:blit(55, 165, Sevendiamond)
    elseif W == 27 then screen:blit(55, 165, Sevenheart)
    elseif W == 28 then screen:blit(55, 165, Sevenspade)
    elseif W == 29 then screen:blit(55, 165, eightclover)
    elseif W == 30 then screen:blit(55, 165, eightdiamond)
    elseif W == 31 then screen:blit(55, 165, eightheart)
    elseif W == 32 then screen:blit(55, 165, eightspade)
    elseif W == 33 then screen:blit(55, 165, Nineclover)
    elseif W == 34 then screen:blit(55, 165, Ninediamond)
    elseif W == 35 then screen:blit(55, 165, Nineheart)
    elseif W == 36 then screen:blit(55, 165, Ninespade)
    elseif W == 37 then screen:blit(55, 165, Tenclover)
    elseif W == 38 then screen:blit(55, 165, Tendiamond)
    elseif W == 39 then screen:blit(55, 165, Tenheart)
    elseif W == 40 then screen:blit(55, 165, Tenspade)
    elseif W == 41 then screen:blit(55, 165, Jackclover)
    elseif W == 42 then screen:blit(55, 165, Jackdiamond)
    elseif W == 43 then screen:blit(55, 165, Jackheart)
    elseif W == 44 then screen:blit(55, 165, Jackspade)
    elseif W == 45 then screen:blit(55, 165, Queenclover)
    elseif W == 46 then screen:blit(55, 165, Queendiamond)
    elseif W == 47 then screen:blit(55, 165, Queenheart)
    elseif W == 48 then screen:blit(55, 165, Queenspade)
    elseif W == 49 then screen:blit(55, 165, Kingclover)
    elseif W == 50 then screen:blit(55, 165, Kingdiamond)
    elseif W == 51 then screen:blit(55, 165, Kingheart)
    elseif W == 52 then screen:blit(55, 165, Kingspade)
    end
    end
    
    function drawCardthree()
    if V == 1 then screen:blit(70, 165, Aceclover)
    elseif V == 2 then screen:blit(70, 165, Acediamond)
    elseif V == 3 then screen:blit(70, 165, Aceheart)
    elseif V == 4 then screen:blit(70, 165, Acespade)
    elseif V == 5 then screen:blit(70, 165, Twoclover)
    elseif V == 6 then screen:blit(70, 165, Twodiamond)
    elseif V == 7 then screen:blit(70, 165, Twoheart)
    elseif V == 8 then screen:blit(70, 165, Twospade)
    elseif V == 9 then screen:blit(70, 165, Threeclover)
    elseif V == 10 then screen:blit(70, 165, Threediamond)
    elseif V == 11 then screen:blit(70, 165, Threeheart)
    elseif V == 12 then screen:blit(70, 165, Threespade)
    elseif V == 13 then screen:blit(70, 165, Fourclover)
    elseif V == 14 then screen:blit(70, 165, Fourdiamond)
    elseif V == 15 then screen:blit(70, 165, Fourheart)
    elseif V == 16 then screen:blit(70, 165, Fourspade)
    elseif V == 17 then screen:blit(70, 165, Fiveclover)
    elseif V == 18 then screen:blit(70, 165, Fivediamond)
    elseif V == 19 then screen:blit(70, 165, Fiveheart)
    elseif V == 20 then screen:blit(70, 165, Fivespade)
    elseif V == 21 then screen:blit(70, 165, Sixclover)
    elseif V == 22 then screen:blit(70, 165, Sixdiamond)
    elseif V == 23 then screen:blit(70, 165, Sixheart)
    elseif V == 24 then screen:blit(70, 165, Sixspade)
    elseif V == 25 then screen:blit(70, 165, Sevenclover)
    elseif V == 26 then screen:blit(70, 165, Sevendiamond)
    elseif V == 27 then screen:blit(70, 165, Sevenheart)
    elseif V == 28 then screen:blit(70, 165, Sevenspade)
    elseif V == 29 then screen:blit(70, 165, eightclover)
    elseif V == 30 then screen:blit(70, 165, eightdiamond)
    elseif V == 31 then screen:blit(70, 165, eightheart)
    elseif V == 32 then screen:blit(70, 165, eightspade)
    elseif V == 33 then screen:blit(70, 165, Nineclover)
    elseif V == 34 then screen:blit(70, 165, Ninediamond)
    elseif V == 35 then screen:blit(70, 165, Nineheart)
    elseif V == 36 then screen:blit(70, 165, Ninespade)
    elseif V == 37 then screen:blit(70, 165, Tenclover)
    elseif V == 38 then screen:blit(70, 165, Tendiamond)
    elseif V == 39 then screen:blit(70, 165, Tenheart)
    elseif V == 40 then screen:blit(70, 165, Tenspade)
    elseif V == 41 then screen:blit(70, 165, Jackclover)
    elseif V == 42 then screen:blit(70, 165, Jackdiamond)
    elseif V == 43 then screen:blit(70, 165, Jackheart)
    elseif V == 44 then screen:blit(70, 165, Jackspade)
    elseif V == 45 then screen:blit(70, 165, Queenclover)
    elseif V == 46 then screen:blit(70, 165, Queendiamond)
    elseif V == 47 then screen:blit(70, 165, Queenheart)
    elseif V == 48 then screen:blit(70, 165, Queenspade)
    elseif V == 49 then screen:blit(70, 165, Kingclover)
    elseif V == 50 then screen:blit(70, 165, Kingdiamond)
    elseif V == 51 then screen:blit(70, 165, Kingheart)
    elseif V == 52 then screen:blit(70, 165, Kingspade)
    end
    end
    
    --Funtion
    Command = 0
    math.randomseed(os.time() )
    V = math.random(1,52)
    W = math.random(1,52)
    Z = math.random(1,52)
    X = math.random(1,52)
    Y = math.random(1,52)
    Points = 0
    Pointstwo = 0
    Pointsthree = 0
    Dealerpoints = 0
    Drawcard = 0
    Drawcardthree = 0
    --Cards/Load
    Aceclover = Image.load("cards/AceClover.png")
    Acediamond = Image.load("cards/AceDiamond.png")
    Aceheart = Image.load("cards/Aceheart.png")
    Acespade = Image.load("cards/AceSpade.png")
    Twoclover = Image.load("cards/2Clover.png")
    Twodiamond = Image.load("cards/2Diamond.png")
    Twoheart = Image.load("cards/2Heart.png")
    Twospade = Image.load("cards/2Spade.png")
    Threeclover = Image.load("cards/3Clover.png")
    Threediamond = Image.load("cards/3Diamond.png")
    Threeheart = Image.load("cards/3Heart.png")
    threeSpade = Image.load("cards/3Spade.png")
    Fourclover = Image.load("cards/4Clover.png")
    Fourdiamond = Image.load("cards/4Diamond.png")
    Fourheart = Image.load("cards/4Heart.png")
    Fourspade = Image.load("cards/4Spade.png")
    Fiveclover = Image.load("cards/5Clover.png")
    Fivediamond = Image.load("cards/5Diamond.png")
    Fiveheart = Image.load("cards/5Heart.png")
    Fivespade = Image.load("cards/5Spade.png")
    Sixclover = Image.load("cards/6Clover.png")
    Sixdiamond = Image.load("cards/6Diamond.png")
    Sixheart = Image.load("cards/6Heart.png")
    Sixspade = Image.load("cards/6Spade.png")
    Sevenclover = Image.load("cards/7Clover.png")
    Sevendiamond = Image.load("cards/7Diamond.png")
    Sevenheart = Image.load("cards/7Heart.png")
    Sevenspade = Image.load("cards/7Spade.png")
    eightclover = Image.load("cards/8Clover.png")
    eightdiamond = Image.load("cards/8Diamond.png")
    eightheart = Image.load("cards/8heart.png")
    eightspade = Image.load("cards/8Spade.png")
    Nineclover = Image.load("cards/9Clover.png")
    Ninediamond = Image.load("cards/9Diamond.png")
    Nineheart = Image.load("cards/9Heart.png")
    Ninespade = Image.load("cards/9Spade.png")
    Tenclover = Image.load("cards/10Clover.png")
    Tendiamond = Image.load("cards/10Diamond.png")
    Tenheart = Image.load("cards/10Heart.png")
    Tenspade = Image.load("cards/10Spade.png")
    Jackclover = Image.load("cards/JackClover.png")
    Jackdiamond = Image.load("cards/JackDiamond.png")
    Jackheart = Image.load("cards/JackHeart.png")
    Jackspade = Image.load("cards/JackSpade.png")
    Queenclover = Image.load("cards/QueenClover.png")
    Queendiamond = Image.load("cards/QueenDiamond.png")
    Queenheart = Image.load("cards/QueenHeart.png")
    Queenspade = Image.load("cards/QueenSpade.png")
    Kingclover = Image.load("cards/QueenClover.png")
    Kingdiamond = Image.load("cards/KingDiamond.png")
    Kingheart = Image.load("cards/KingHeart.png")
    Kingspade = Image.load("cards/KingSpade.png")
    
    --Text
    while true do
    
    pad = Controls.read()
    
    
    screen:blit(0,0,Table)
    
    
    if X == 1 then screen:blit(40, 165, Aceclover) 
    elseif X == 2 then screen:blit(40, 165, Acediamond)
    elseif X == 3 then screen:blit(40, 165, Aceheart) 
    elseif X == 4 then screen:blit(40, 165, Acespade)
    elseif X == 5 then screen:blit(40, 165, Twoclover)
    elseif X == 6 then screen:blit(40, 165, Twodiamond)
    elseif X == 7 then screen:blit(40, 165, Twoheart)
    elseif X == 8 then screen:blit(40, 165, Twospade)
    elseif X == 9 then screen:blit(40, 165, Threeclover)
    elseif X == 10 then screen:blit(40, 165, Threediamond)
    elseif X == 11 then screen:blit(40, 165, Threeheart)
    elseif X == 12 then screen:blit(40, 165, Threespade)
    elseif X == 13 then screen:blit(40, 165, Fourclover)
    elseif X == 14 then screen:blit(40, 165, Fourdiamond)
    elseif X == 15 then screen:blit(40, 165, Fourheart)
    elseif X == 16 then screen:blit(40, 165, Fourspade)
    elseif X == 17 then screen:blit(40, 165, Fiveclover)
    elseif X == 18 then screen:blit(40, 165, Fivediamond)
    elseif X == 19 then screen:blit(40, 165, Fiveheart)
    elseif X == 20 then screen:blit(40, 165, Fivespade)
    elseif X == 21 then screen:blit(40, 165, Sixclover)
    elseif X == 22 then screen:blit(40, 165, Sixdiamond)
    elseif X == 23 then screen:blit(40, 165, Sixheart)
    elseif X == 24 then screen:blit(40, 165, Sixspade)
    elseif X == 25 then screen:blit(40, 165, Sevenclover)
    elseif X == 26 then screen:blit(40, 165, Sevendiamond)
    elseif X == 27 then screen:blit(40, 165, Sevenheart)
    elseif X == 28 then screen:blit(40, 165, Sevenspade)
    elseif X == 29 then screen:blit(40, 165, eightclover)
    elseif X == 30 then screen:blit(40, 165, eightdiamond)
    elseif X == 31 then screen:blit(40, 165, eightheart)
    elseif X == 32 then screen:blit(40, 165, eightspade)
    elseif X == 33 then screen:blit(40, 165, Nineclover)
    elseif X == 34 then screen:blit(40, 165, Ninediamond)
    elseif X == 35 then screen:blit(40, 165, Nineheart)
    elseif X == 36 then screen:blit(40, 165, Ninespade)
    elseif X == 37 then screen:blit(40, 165, Tenclover)
    elseif X == 38 then screen:blit(40, 165, Tendiamond)
    elseif X == 39 then screen:blit(40, 165, Tenheart)
    elseif X == 40 then screen:blit(40, 165, Tenspade)
    elseif X == 41 then screen:blit(40, 165, Jackclover)
    elseif X == 42 then screen:blit(40, 165, Jackdiamond)
    elseif X == 43 then screen:blit(40, 165, Jackheart)
    elseif X == 44 then screen:blit(40, 165, Jackspade)
    elseif X == 45 then screen:blit(40, 165, Queenclover)
    elseif X == 46 then screen:blit(40, 165, Queendiamond)
    elseif X == 47 then screen:blit(40, 165, Queenheart)
    elseif X == 48 then screen:blit(40, 165, Queenspade)
    elseif X == 49 then screen:blit(40, 165, Kingclover)
    elseif X == 50 then screen:blit(40, 165, Kingdiamond)
    elseif X == 51 then screen:blit(40, 165, Kingheart)
    elseif X == 52 then screen:blit(40, 165, Kingspade)
    end
    
    if Y == 1 then screen:blit(40, 30, Aceclover)
    elseif Y == 2 then screen:blit(40, 30, Acediamond)
    elseif Y == 3 then screen:blit(40, 30, Aceheart)
    elseif Y == 4 then screen:blit(40, 30, Acespade)
    elseif Y == 5 then screen:blit(40, 30, Twoclover)
    elseif Y == 6 then screen:blit(40, 30, Twodiamond)
    elseif Y == 7 then screen:blit(40, 30, Twoheart)
    elseif Y == 8 then screen:blit(40, 30, Twospade)
    elseif Y == 9 then screen:blit(40, 30, Threeclover)
    elseif Y == 10 then screen:blit(40, 30, Threediamond)
    elseif Y == 11 then screen:blit(40, 30, Threeheart)
    elseif Y == 12 then screen:blit(40, 30, Threespade)
    elseif Y == 13 then screen:blit(40, 30, Fourclover)
    elseif Y == 14 then screen:blit(40, 30, Fourdiamond)
    elseif Y == 15 then screen:blit(40, 30, Fourheart)
    elseif Y == 16 then screen:blit(40, 30, Fourspade)
    elseif Y == 17 then screen:blit(40, 30, Fiveclover)
    elseif Y == 18 then screen:blit(40, 30, Fivediamond)
    elseif Y == 19 then screen:blit(40, 30, Fiveheart)
    elseif Y == 20 then screen:blit(40, 30, Fivespade)
    elseif Y == 21 then screen:blit(40, 30, Sixclover)
    elseif Y == 22 then screen:blit(40, 30, Sixdiamond)
    elseif Y == 23 then screen:blit(40, 30, Sixheart)
    elseif Y == 24 then screen:blit(40, 30, Sixspade)
    elseif Y == 25 then screen:blit(40, 30, Sevenclover)
    elseif Y == 26 then screen:blit(40, 30, Sevendiamond)
    elseif Y == 27 then screen:blit(40, 30, Sevenheart)
    elseif Y == 28 then screen:blit(40, 30, Sevenspade)
    elseif Y == 29 then screen:blit(40, 30, eightclover)
    elseif Y == 30 then screen:blit(40, 30, eightdiamond)
    elseif Y == 31 then screen:blit(40, 30, eightheart)
    elseif Y == 32 then screen:blit(40, 30, eightspade)
    elseif Y == 33 then screen:blit(40, 30, Nineclover)
    elseif Y == 34 then screen:blit(40, 30, Ninediamond)
    elseif Y == 35 then screen:blit(40, 30, Nineheart)
    elseif Y == 36 then screen:blit(40, 30, Ninespade)
    elseif Y == 37 then screen:blit(40, 30, Tenclover)
    elseif Y == 38 then screen:blit(40, 30, Tendiamond)
    elseif Y == 39 then screen:blit(40, 30, Tenheart)
    elseif Y == 40 then screen:blit(40, 30, Tenspade)
    elseif Y == 41 then screen:blit(40, 30, Jackclover)
    elseif Y == 42 then screen:blit(40, 30, Jackdiamond)
    elseif Y == 43 then screen:blit(40, 30, Jackheart)
    elseif Y == 44 then screen:blit(40, 30, Jackspade)
    elseif Y == 45 then screen:blit(40, 30, Queenclover)
    elseif Y == 46 then screen:blit(40, 30, Queendiamond)
    elseif Y == 47 then screen:blit(40, 30, Queenheart)
    elseif Y == 48 then screen:blit(40, 30, Queenspade)
    elseif Y == 49 then screen:blit(40, 30, Kingclover)
    elseif Y == 50 then screen:blit(40, 30, Kingdiamond)
    elseif Y == 51 then screen:blit(40, 30, Kingheart)
    elseif Y == 52 then screen:blit(40, 30, Kingspade)
    end
    
    if X == 1 then Points = 1 
    elseif X == 2 then Points = 1 
    elseif X == 3 then Points = 1
    elseif X == 4 then Points = 1
    elseif X == 5 then Points = 2
    elseif X == 6 then Points = 2
    elseif X == 7 then Points = 2
    elseif X == 8 then Points = 2
    elseif X == 9 then Points = 3
    elseif X == 10 then Points = 3
    elseif X == 11 then Points = 3
    elseif X == 12 then Points = 3
    elseif X == 13 then Points = 4
    elseif X == 14 then Points = 4
    elseif X == 15 then Points = 4
    elseif X == 16 then Points = 4
    elseif X == 17 then Points = 5
    elseif X == 18 then Points = 5
    elseif X == 19 then Points = 5
    elseif X == 20 then Points = 5
    elseif X == 21 then Points = 6
    elseif X == 22 then Points = 6
    elseif X == 23 then Points = 6
    elseif X == 24 then Points = 6
    elseif X == 25 then Points = 7
    elseif X == 26 then Points = 7
    elseif X == 27 then Points = 7
    elseif X == 28 then Points = 7
    elseif X == 29 then Points = 8
    elseif X == 30 then Points = 8
    elseif X == 31 then Points = 8
    elseif X == 32 then Points = 8
    elseif X == 33 then Points = 9
    elseif X == 34 then Points = 9
    elseif X == 35 then Points = 9
    elseif X == 36 then Points = 9
    elseif X == 37 then Points = 10
    elseif X == 38 then Points = 10
    elseif X == 39 then Points = 10
    elseif X == 40 then Points = 10
    elseif X == 41 then Points = 10
    elseif X == 42 then Points = 10
    elseif X == 43 then Points = 10
    elseif X == 44 then Points = 10
    elseif X == 45 then Points = 10
    elseif X == 46 then Points = 10
    elseif X == 47 then Points = 10
    elseif X == 48 then Points = 10
    elseif X == 49 then Points = 10
    elseif X == 50 then Points = 10
    elseif X == 51 then Points = 10
    elseif X == 52 then Points = 10
    end
    
    if X == 1 then Dealerpoints = 1 
    elseif Y == 2 then Dealerpoints = 1 
    elseif Y == 3 then Dealerpoints = 1
    elseif Y == 4 then Dealerpoints = 1
    elseif Y == 5 then Dealerpoints = 2
    elseif Y == 6 then Dealerpoints = 2
    elseif Y == 7 then Dealerpoints = 2
    elseif Y == 8 then Dealerpoints = 2
    elseif Y == 9 then Dealerpoints = 3
    elseif Y == 10 then Dealerpoints = 3
    elseif Y == 11 then Dealerpoints = 3
    elseif Y == 12 then Dealerpoints = 3
    elseif Y == 13 then Dealerpoints = 4
    elseif Y == 14 then Dealerpoints = 4
    elseif Y == 15 then Dealerpoints = 4
    elseif Y == 16 then Dealerpoints = 4
    elseif Y == 17 then Dealerpoints = 5
    elseif Y == 18 then Dealerpoints = 5
    elseif Y == 19 then Dealerpoints = 5
    elseif Y == 20 then Dealerpoints = 5
    elseif Y == 21 then Dealerpoints = 6
    elseif Y == 22 then Dealerpoints = 6
    elseif Y == 23 then Dealerpoints = 6
    elseif Y == 24 then Dealerpoints = 6
    elseif Y == 25 then Dealerpoints = 7
    elseif Y == 26 then Dealerpoints = 7
    elseif Y == 27 then Dealerpoints = 7
    elseif Y == 28 then Dealerpoints = 7
    elseif Y == 29 then Dealerpoints = 8
    elseif Y == 30 then Dealerpoints = 8
    elseif Y == 31 then Dealerpoints = 8
    elseif Y == 32 then Dealerpoints = 8
    elseif Y == 33 then Dealerpoints = 9
    elseif Y == 34 then Dealerpoints = 9
    elseif Y == 35 then Dealerpoints = 9
    elseif Y == 36 then Dealerpoints = 9
    elseif Y == 37 then Dealerpoints = 10
    elseif Y == 38 then Dealerpoints = 10
    elseif Y == 39 then Dealerpoints = 10
    elseif Y == 40 then Dealerpoints = 10
    elseif Y == 41 then Dealerpoints = 10
    elseif Y == 42 then Dealerpoints = 10
    elseif Y == 43 then Dealerpoints = 10
    elseif Y == 44 then Dealerpoints = 10
    elseif Y == 45 then Dealerpoints = 10
    elseif Y == 46 then Dealerpoints = 10
    elseif Y == 47 then Dealerpoints = 10
    elseif Y == 48 then Dealerpoints = 10
    elseif Y == 49 then Dealerpoints = 10
    elseif Y == 50 then Dealerpoints = 10
    elseif Y == 51 then Dealerpoints = 10
    elseif Y == 52 then Dealerpoints = 10
    end
    
    if W == 1 then Pointstwo = 1 
    elseif W == 2 then Pointstwo = 1 
    elseif W == 3 then Pointstwo = 1
    elseif W == 4 then Pointstwo = 1
    elseif W == 5 then Pointstwo = 2
    elseif W == 6 then Pointstwo = 2
    elseif W == 7 then Pointstwo = 2
    elseif W == 8 then Pointstwo = 2
    elseif W == 9 then Pointstwo = 3
    elseif W == 10 then Pointstwo = 3
    elseif W == 11 then Pointstwo = 3
    elseif W == 12 then Pointstwo = 3
    elseif W == 13 then Pointstwo = 4
    elseif W == 14 then Pointstwo = 4
    elseif W == 15 then Pointstwo = 4
    elseif W == 16 then Pointstwo = 4
    elseif W == 17 then Pointstwo = 5
    elseif W == 18 then Pointstwo = 5
    elseif W == 19 then Pointstwo = 5
    elseif W == 20 then Pointstwo = 5
    elseif W == 21 then Pointstwo = 6
    elseif W == 22 then Pointstwo = 6
    elseif W == 23 then Pointstwo = 6
    elseif W == 24 then Pointstwo = 6
    elseif W == 25 then Pointstwo = 7
    elseif W == 26 then Pointstwo = 7
    elseif W == 27 then Pointstwo = 7
    elseif W == 28 then Pointstwo = 7
    elseif W == 29 then Pointstwo = 8
    elseif W == 30 then Pointstwo = 8
    elseif W == 31 then Pointstwo = 8
    elseif W == 32 then Pointstwo = 8
    elseif W == 33 then Pointstwo = 9
    elseif W == 34 then Pointstwo = 9
    elseif W == 35 then Pointstwo = 9
    elseif W == 36 then Pointstwo = 9
    elseif W == 37 then Pointstwo = 10
    elseif W == 38 then Pointstwo = 10
    elseif W == 39 then Pointstwo = 10
    elseif W == 40 then Pointstwo = 10
    elseif W == 41 then Pointstwo = 10
    elseif W == 42 then Pointstwo = 10
    elseif W == 43 then Pointstwo = 10
    elseif W == 44 then Pointstwo = 10
    elseif W == 45 then Pointstwo = 10
    elseif W == 46 then Pointstwo = 10
    elseif W == 47 then Pointstwo = 10
    elseif W == 48 then Pointstwo = 10
    elseif W == 49 then Pointstwo = 10
    elseif W == 50 then Pointstwo = 10
    elseif W == 51 then Pointstwo = 10
    elseif W == 52 then Pointstwo = 10
    end
    
    if V == 1 then Pointsthree = 1 
    elseif V == 2 then Pointsthree = 1 
    elseif V == 3 then Pointsthree = 1
    elseif V == 4 then Pointsthree = 1
    elseif V == 5 then Pointsthree = 2
    elseif V == 6 then Pointsthree = 2
    elseif V == 7 then Pointsthree = 2
    elseif V == 8 then Pointsthree = 2
    elseif V == 9 then Pointsthree = 3
    elseif V == 10 then Pointsthree = 3
    elseif V == 11 then Pointsthree = 3
    elseif V == 12 then Pointsthree = 3
    elseif V == 13 then Pointsthree = 4
    elseif V == 14 then Pointsthree = 4
    elseif V == 15 then Pointsthree = 4
    elseif V == 16 then Pointsthree = 4
    elseif V == 17 then Pointsthree = 5
    elseif V == 18 then Pointsthree = 5
    elseif V == 19 then Pointsthree = 5
    elseif V == 20 then Pointsthree = 5
    elseif V == 21 then Pointsthree = 6
    elseif V == 22 then Pointsthree = 6
    elseif V == 23 then Pointsthree = 6
    elseif V == 24 then Pointsthree = 6
    elseif V == 25 then Pointsthree = 7
    elseif V == 26 then Pointsthree = 7
    elseif V == 27 then Pointsthree = 7
    elseif V == 28 then Pointsthree = 7
    elseif V == 29 then Pointsthree = 8
    elseif V == 30 then Pointsthree = 8
    elseif V == 31 then Pointsthree = 8
    elseif V == 32 then Pointsthree = 8
    elseif V == 33 then Pointsthree = 9
    elseif V == 34 then Pointsthree = 9
    elseif V == 35 then Pointsthree = 9
    elseif V == 36 then Pointsthree = 9
    elseif V == 37 then Pointsthree = 10
    elseif V == 38 then Pointsthree = 10
    elseif V == 39 then Pointsthree = 10
    elseif V == 40 then Pointsthree = 10
    elseif V == 41 then Pointsthree = 10
    elseif V == 42 then Pointsthree = 10
    elseif V == 43 then Pointsthree = 10
    elseif V == 44 then Pointsthree = 10
    elseif V == 45 then Pointsthree = 10
    elseif V == 46 then Pointsthree = 10
    elseif V == 47 then Pointsthree = 10
    elseif V == 48 then Pointsthree = 10
    elseif V == 49 then Pointsthree = 10
    elseif V == 50 then Pointsthree = 10
    elseif V == 51 then Pointsthree = 10
    elseif V == 52 then Pointsthree = 10
    end
    
    if pad:up() and oldpad:up() ~= pad:up() then
    Command = Command-1
    end
    
    if pad:down() and oldpad:down() ~= pad:down() then 
    Command = Command+1
    end
    
    if Command > 3 then
    Command = 0
    end
    
    if Command < 0 then
    Command = 3
    end
    
    if Command == 0  then
    screen:blit(350,175,Selector)
    else
    if Command == 1  then
    screen:blit(360,195,Selector)
    else
    if Command == 2  then
    screen:blit(343,215,Selector)
    else
    if Command == 3  then
    screen:blit(350,235,Selector)
    end
    end
    end
    end
    
    if pad:cross() and Command == 0 then
    Select:play()
    end
    
    if pad:cross() and Command == 1 then
    Select:play() Drawcard = 1
    end
    
    if Drawcard == 1 then
    drawCard() Points = Points + Pointstwo
    end
    
    Drawcardthree = 1
    
    if pad:cross() and Command == 1 and Drawcardthree == 1 then
    Select:play()
    Drawcardthree = 2
    end
    
    if Drawcardthree == 2 then
    drawCardthree() Points = Points+Pointsthree
    end
    
    if pad:cross() and Command == 2 then
    Select:play() 
    end
    
    if pad:cross() and Command == 3 then
    Select:play() 
    end
    
    battlvl = System.powerGetBatteryLifePercent()
    screen:print(107, 264, battlvl, white)
    screen:print(125, 264, "%", white)	
    screen:print(5, 264, "BatteryPower:", white)
    screen:print(55, 20,"Dealer", white)
    screen:print(65, 155,"You", white)
    screen:print(13, 210,Points, white)
    screen:print(9, 200,"PTS", white)
    screen:print(13, 75,Dealerpoints, white)
    screen:print(9, 65,"PTS", white)
    
    screen.waitVblankStart()
    screen.flip()
    oldpad = pad
    end

  20. #2090
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von ZereoX
    Code:
    -- FF IX Black Jack
    -- Author:Zereo_X
    
    --new variables
    drawingCard = false
    drawingThreeCards = false
    
    -- Color Defenition
    red = Color.new(255,0,0)
    blue = Color.new(0,255,0)
    green = Color.new(0,0,255)
    white = Color.new(255,255,255)
    
    -- Image Load/Sound/Music/
    Table = Image.load("images/Table.png")
    PauseMenu = Image.load("images/Gamepaused.png")
    GameOver = Image.load("images/GameOver.png")
    Title = Image.load("images/TitleScreen.png")
    Selector = Image.load("images/Selector.png")
    Select = Sound.load("sounds/Select.wav",false)
    
    --Drawcardfunction
    --function drawCard()
    if drawingCard == true then
    if W == 1 then screen:blit(55, 165, Aceclover)
    elseif W == 2 then screen:blit(55, 165, Acediamond)
    elseif W == 3 then screen:blit(55, 165, Aceheart)
    elseif W == 4 then screen:blit(55, 165, Acespade)
    elseif W == 5 then screen:blit(55, 165, Twoclover)
    elseif W == 6 then screen:blit(55, 165, Twodiamond)
    elseif W == 7 then screen:blit(55, 165, Twoheart)
    elseif W == 8 then screen:blit(55, 165, Twospade)
    elseif W == 9 then screen:blit(55, 165, Threeclover)
    elseif W == 10 then screen:blit(55, 165, Threediamond)
    elseif W == 11 then screen:blit(55, 165, Threeheart)
    elseif W == 12 then screen:blit(55, 165, Threespade)
    elseif W == 13 then screen:blit(55, 165, Fourclover)
    elseif W == 14 then screen:blit(55, 165, Fourdiamond)
    elseif W == 15 then screen:blit(55, 165, Fourheart)
    elseif W == 16 then screen:blit(55, 165, Fourspade)
    elseif W == 17 then screen:blit(55, 165, Fiveclover)
    elseif W == 18 then screen:blit(55, 165, Fivediamond)
    elseif W == 19 then screen:blit(55, 165, Fiveheart)
    elseif W == 20 then screen:blit(55, 165, Fivespade)
    elseif W == 21 then screen:blit(55, 165, Sixclover)
    elseif W == 22 then screen:blit(55, 165, Sixdiamond)
    elseif W == 23 then screen:blit(55, 165, Sixheart)
    elseif W == 24 then screen:blit(55, 165, Sixspade)
    elseif W == 25 then screen:blit(55, 165, Sevenclover)
    elseif W == 26 then screen:blit(55, 165, Sevendiamond)
    elseif W == 27 then screen:blit(55, 165, Sevenheart)
    elseif W == 28 then screen:blit(55, 165, Sevenspade)
    elseif W == 29 then screen:blit(55, 165, eightclover)
    elseif W == 30 then screen:blit(55, 165, eightdiamond)
    elseif W == 31 then screen:blit(55, 165, eightheart)
    elseif W == 32 then screen:blit(55, 165, eightspade)
    elseif W == 33 then screen:blit(55, 165, Nineclover)
    elseif W == 34 then screen:blit(55, 165, Ninediamond)
    elseif W == 35 then screen:blit(55, 165, Nineheart)
    elseif W == 36 then screen:blit(55, 165, Ninespade)
    elseif W == 37 then screen:blit(55, 165, Tenclover)
    elseif W == 38 then screen:blit(55, 165, Tendiamond)
    elseif W == 39 then screen:blit(55, 165, Tenheart)
    elseif W == 40 then screen:blit(55, 165, Tenspade)
    elseif W == 41 then screen:blit(55, 165, Jackclover)
    elseif W == 42 then screen:blit(55, 165, Jackdiamond)
    elseif W == 43 then screen:blit(55, 165, Jackheart)
    elseif W == 44 then screen:blit(55, 165, Jackspade)
    elseif W == 45 then screen:blit(55, 165, Queenclover)
    elseif W == 46 then screen:blit(55, 165, Queendiamond)
    elseif W == 47 then screen:blit(55, 165, Queenheart)
    elseif W == 48 then screen:blit(55, 165, Queenspade)
    elseif W == 49 then screen:blit(55, 165, Kingclover)
    elseif W == 50 then screen:blit(55, 165, Kingdiamond)
    elseif W == 51 then screen:blit(55, 165, Kingheart)
    elseif W == 52 then screen:blit(55, 165, Kingspade)
    end
    end
    
    --function drawCardthree()
    if drawingThreeCards == true then
    if V == 1 then screen:blit(70, 165, Aceclover)
    elseif V == 2 then screen:blit(70, 165, Acediamond)
    elseif V == 3 then screen:blit(70, 165, Aceheart)
    elseif V == 4 then screen:blit(70, 165, Acespade)
    elseif V == 5 then screen:blit(70, 165, Twoclover)
    elseif V == 6 then screen:blit(70, 165, Twodiamond)
    elseif V == 7 then screen:blit(70, 165, Twoheart)
    elseif V == 8 then screen:blit(70, 165, Twospade)
    elseif V == 9 then screen:blit(70, 165, Threeclover)
    elseif V == 10 then screen:blit(70, 165, Threediamond)
    elseif V == 11 then screen:blit(70, 165, Threeheart)
    elseif V == 12 then screen:blit(70, 165, Threespade)
    elseif V == 13 then screen:blit(70, 165, Fourclover)
    elseif V == 14 then screen:blit(70, 165, Fourdiamond)
    elseif V == 15 then screen:blit(70, 165, Fourheart)
    elseif V == 16 then screen:blit(70, 165, Fourspade)
    elseif V == 17 then screen:blit(70, 165, Fiveclover)
    elseif V == 18 then screen:blit(70, 165, Fivediamond)
    elseif V == 19 then screen:blit(70, 165, Fiveheart)
    elseif V == 20 then screen:blit(70, 165, Fivespade)
    elseif V == 21 then screen:blit(70, 165, Sixclover)
    elseif V == 22 then screen:blit(70, 165, Sixdiamond)
    elseif V == 23 then screen:blit(70, 165, Sixheart)
    elseif V == 24 then screen:blit(70, 165, Sixspade)
    elseif V == 25 then screen:blit(70, 165, Sevenclover)
    elseif V == 26 then screen:blit(70, 165, Sevendiamond)
    elseif V == 27 then screen:blit(70, 165, Sevenheart)
    elseif V == 28 then screen:blit(70, 165, Sevenspade)
    elseif V == 29 then screen:blit(70, 165, eightclover)
    elseif V == 30 then screen:blit(70, 165, eightdiamond)
    elseif V == 31 then screen:blit(70, 165, eightheart)
    elseif V == 32 then screen:blit(70, 165, eightspade)
    elseif V == 33 then screen:blit(70, 165, Nineclover)
    elseif V == 34 then screen:blit(70, 165, Ninediamond)
    elseif V == 35 then screen:blit(70, 165, Nineheart)
    elseif V == 36 then screen:blit(70, 165, Ninespade)
    elseif V == 37 then screen:blit(70, 165, Tenclover)
    elseif V == 38 then screen:blit(70, 165, Tendiamond)
    elseif V == 39 then screen:blit(70, 165, Tenheart)
    elseif V == 40 then screen:blit(70, 165, Tenspade)
    elseif V == 41 then screen:blit(70, 165, Jackclover)
    elseif V == 42 then screen:blit(70, 165, Jackdiamond)
    elseif V == 43 then screen:blit(70, 165, Jackheart)
    elseif V == 44 then screen:blit(70, 165, Jackspade)
    elseif V == 45 then screen:blit(70, 165, Queenclover)
    elseif V == 46 then screen:blit(70, 165, Queendiamond)
    elseif V == 47 then screen:blit(70, 165, Queenheart)
    elseif V == 48 then screen:blit(70, 165, Queenspade)
    elseif V == 49 then screen:blit(70, 165, Kingclover)
    elseif V == 50 then screen:blit(70, 165, Kingdiamond)
    elseif V == 51 then screen:blit(70, 165, Kingheart)
    elseif V == 52 then screen:blit(70, 165, Kingspade)
    end
    end
    
    --Funtion
    Command = 0
    math.randomseed(os.time() )
    V = math.random(1,52)
    W = math.random(1,52)
    Z = math.random(1,52)
    X = math.random(1,52)
    Y = math.random(1,52)
    Points = 0
    Pointstwo = 0
    Pointsthree = 0
    Dealerpoints = 0
    Drawcard = 0
    Drawcardthree = 0
    --Cards/Load
    Aceclover = Image.load("cards/AceClover.png")
    Acediamond = Image.load("cards/AceDiamond.png")
    Aceheart = Image.load("cards/Aceheart.png")
    Acespade = Image.load("cards/AceSpade.png")
    Twoclover = Image.load("cards/2Clover.png")
    Twodiamond = Image.load("cards/2Diamond.png")
    Twoheart = Image.load("cards/2Heart.png")
    Twospade = Image.load("cards/2Spade.png")
    Threeclover = Image.load("cards/3Clover.png")
    Threediamond = Image.load("cards/3Diamond.png")
    Threeheart = Image.load("cards/3Heart.png")
    threeSpade = Image.load("cards/3Spade.png")
    Fourclover = Image.load("cards/4Clover.png")
    Fourdiamond = Image.load("cards/4Diamond.png")
    Fourheart = Image.load("cards/4Heart.png")
    Fourspade = Image.load("cards/4Spade.png")
    Fiveclover = Image.load("cards/5Clover.png")
    Fivediamond = Image.load("cards/5Diamond.png")
    Fiveheart = Image.load("cards/5Heart.png")
    Fivespade = Image.load("cards/5Spade.png")
    Sixclover = Image.load("cards/6Clover.png")
    Sixdiamond = Image.load("cards/6Diamond.png")
    Sixheart = Image.load("cards/6Heart.png")
    Sixspade = Image.load("cards/6Spade.png")
    Sevenclover = Image.load("cards/7Clover.png")
    Sevendiamond = Image.load("cards/7Diamond.png")
    Sevenheart = Image.load("cards/7Heart.png")
    Sevenspade = Image.load("cards/7Spade.png")
    eightclover = Image.load("cards/8Clover.png")
    eightdiamond = Image.load("cards/8Diamond.png")
    eightheart = Image.load("cards/8heart.png")
    eightspade = Image.load("cards/8Spade.png")
    Nineclover = Image.load("cards/9Clover.png")
    Ninediamond = Image.load("cards/9Diamond.png")
    Nineheart = Image.load("cards/9Heart.png")
    Ninespade = Image.load("cards/9Spade.png")
    Tenclover = Image.load("cards/10Clover.png")
    Tendiamond = Image.load("cards/10Diamond.png")
    Tenheart = Image.load("cards/10Heart.png")
    Tenspade = Image.load("cards/10Spade.png")
    Jackclover = Image.load("cards/JackClover.png")
    Jackdiamond = Image.load("cards/JackDiamond.png")
    Jackheart = Image.load("cards/JackHeart.png")
    Jackspade = Image.load("cards/JackSpade.png")
    Queenclover = Image.load("cards/QueenClover.png")
    Queendiamond = Image.load("cards/QueenDiamond.png")
    Queenheart = Image.load("cards/QueenHeart.png")
    Queenspade = Image.load("cards/QueenSpade.png")
    Kingclover = Image.load("cards/QueenClover.png")
    Kingdiamond = Image.load("cards/KingDiamond.png")
    Kingheart = Image.load("cards/KingHeart.png")
    Kingspade = Image.load("cards/KingSpade.png")
    
    --Text
    while true do
    
    pad = Controls.read()
    
    
    screen:blit(0,0,Table)
    
    
    if X == 1 then screen:blit(40, 165, Aceclover) 
    elseif X == 2 then screen:blit(40, 165, Acediamond)
    elseif X == 3 then screen:blit(40, 165, Aceheart) 
    elseif X == 4 then screen:blit(40, 165, Acespade)
    elseif X == 5 then screen:blit(40, 165, Twoclover)
    elseif X == 6 then screen:blit(40, 165, Twodiamond)
    elseif X == 7 then screen:blit(40, 165, Twoheart)
    elseif X == 8 then screen:blit(40, 165, Twospade)
    elseif X == 9 then screen:blit(40, 165, Threeclover)
    elseif X == 10 then screen:blit(40, 165, Threediamond)
    elseif X == 11 then screen:blit(40, 165, Threeheart)
    elseif X == 12 then screen:blit(40, 165, Threespade)
    elseif X == 13 then screen:blit(40, 165, Fourclover)
    elseif X == 14 then screen:blit(40, 165, Fourdiamond)
    elseif X == 15 then screen:blit(40, 165, Fourheart)
    elseif X == 16 then screen:blit(40, 165, Fourspade)
    elseif X == 17 then screen:blit(40, 165, Fiveclover)
    elseif X == 18 then screen:blit(40, 165, Fivediamond)
    elseif X == 19 then screen:blit(40, 165, Fiveheart)
    elseif X == 20 then screen:blit(40, 165, Fivespade)
    elseif X == 21 then screen:blit(40, 165, Sixclover)
    elseif X == 22 then screen:blit(40, 165, Sixdiamond)
    elseif X == 23 then screen:blit(40, 165, Sixheart)
    elseif X == 24 then screen:blit(40, 165, Sixspade)
    elseif X == 25 then screen:blit(40, 165, Sevenclover)
    elseif X == 26 then screen:blit(40, 165, Sevendiamond)
    elseif X == 27 then screen:blit(40, 165, Sevenheart)
    elseif X == 28 then screen:blit(40, 165, Sevenspade)
    elseif X == 29 then screen:blit(40, 165, eightclover)
    elseif X == 30 then screen:blit(40, 165, eightdiamond)
    elseif X == 31 then screen:blit(40, 165, eightheart)
    elseif X == 32 then screen:blit(40, 165, eightspade)
    elseif X == 33 then screen:blit(40, 165, Nineclover)
    elseif X == 34 then screen:blit(40, 165, Ninediamond)
    elseif X == 35 then screen:blit(40, 165, Nineheart)
    elseif X == 36 then screen:blit(40, 165, Ninespade)
    elseif X == 37 then screen:blit(40, 165, Tenclover)
    elseif X == 38 then screen:blit(40, 165, Tendiamond)
    elseif X == 39 then screen:blit(40, 165, Tenheart)
    elseif X == 40 then screen:blit(40, 165, Tenspade)
    elseif X == 41 then screen:blit(40, 165, Jackclover)
    elseif X == 42 then screen:blit(40, 165, Jackdiamond)
    elseif X == 43 then screen:blit(40, 165, Jackheart)
    elseif X == 44 then screen:blit(40, 165, Jackspade)
    elseif X == 45 then screen:blit(40, 165, Queenclover)
    elseif X == 46 then screen:blit(40, 165, Queendiamond)
    elseif X == 47 then screen:blit(40, 165, Queenheart)
    elseif X == 48 then screen:blit(40, 165, Queenspade)
    elseif X == 49 then screen:blit(40, 165, Kingclover)
    elseif X == 50 then screen:blit(40, 165, Kingdiamond)
    elseif X == 51 then screen:blit(40, 165, Kingheart)
    elseif X == 52 then screen:blit(40, 165, Kingspade)
    end
    
    if Y == 1 then screen:blit(40, 30, Aceclover)
    elseif Y == 2 then screen:blit(40, 30, Acediamond)
    elseif Y == 3 then screen:blit(40, 30, Aceheart)
    elseif Y == 4 then screen:blit(40, 30, Acespade)
    elseif Y == 5 then screen:blit(40, 30, Twoclover)
    elseif Y == 6 then screen:blit(40, 30, Twodiamond)
    elseif Y == 7 then screen:blit(40, 30, Twoheart)
    elseif Y == 8 then screen:blit(40, 30, Twospade)
    elseif Y == 9 then screen:blit(40, 30, Threeclover)
    elseif Y == 10 then screen:blit(40, 30, Threediamond)
    elseif Y == 11 then screen:blit(40, 30, Threeheart)
    elseif Y == 12 then screen:blit(40, 30, Threespade)
    elseif Y == 13 then screen:blit(40, 30, Fourclover)
    elseif Y == 14 then screen:blit(40, 30, Fourdiamond)
    elseif Y == 15 then screen:blit(40, 30, Fourheart)
    elseif Y == 16 then screen:blit(40, 30, Fourspade)
    elseif Y == 17 then screen:blit(40, 30, Fiveclover)
    elseif Y == 18 then screen:blit(40, 30, Fivediamond)
    elseif Y == 19 then screen:blit(40, 30, Fiveheart)
    elseif Y == 20 then screen:blit(40, 30, Fivespade)
    elseif Y == 21 then screen:blit(40, 30, Sixclover)
    elseif Y == 22 then screen:blit(40, 30, Sixdiamond)
    elseif Y == 23 then screen:blit(40, 30, Sixheart)
    elseif Y == 24 then screen:blit(40, 30, Sixspade)
    elseif Y == 25 then screen:blit(40, 30, Sevenclover)
    elseif Y == 26 then screen:blit(40, 30, Sevendiamond)
    elseif Y == 27 then screen:blit(40, 30, Sevenheart)
    elseif Y == 28 then screen:blit(40, 30, Sevenspade)
    elseif Y == 29 then screen:blit(40, 30, eightclover)
    elseif Y == 30 then screen:blit(40, 30, eightdiamond)
    elseif Y == 31 then screen:blit(40, 30, eightheart)
    elseif Y == 32 then screen:blit(40, 30, eightspade)
    elseif Y == 33 then screen:blit(40, 30, Nineclover)
    elseif Y == 34 then screen:blit(40, 30, Ninediamond)
    elseif Y == 35 then screen:blit(40, 30, Nineheart)
    elseif Y == 36 then screen:blit(40, 30, Ninespade)
    elseif Y == 37 then screen:blit(40, 30, Tenclover)
    elseif Y == 38 then screen:blit(40, 30, Tendiamond)
    elseif Y == 39 then screen:blit(40, 30, Tenheart)
    elseif Y == 40 then screen:blit(40, 30, Tenspade)
    elseif Y == 41 then screen:blit(40, 30, Jackclover)
    elseif Y == 42 then screen:blit(40, 30, Jackdiamond)
    elseif Y == 43 then screen:blit(40, 30, Jackheart)
    elseif Y == 44 then screen:blit(40, 30, Jackspade)
    elseif Y == 45 then screen:blit(40, 30, Queenclover)
    elseif Y == 46 then screen:blit(40, 30, Queendiamond)
    elseif Y == 47 then screen:blit(40, 30, Queenheart)
    elseif Y == 48 then screen:blit(40, 30, Queenspade)
    elseif Y == 49 then screen:blit(40, 30, Kingclover)
    elseif Y == 50 then screen:blit(40, 30, Kingdiamond)
    elseif Y == 51 then screen:blit(40, 30, Kingheart)
    elseif Y == 52 then screen:blit(40, 30, Kingspade)
    end
    
    if X == 1 then Points = 1 
    elseif X == 2 then Points = 1 
    elseif X == 3 then Points = 1
    elseif X == 4 then Points = 1
    elseif X == 5 then Points = 2
    elseif X == 6 then Points = 2
    elseif X == 7 then Points = 2
    elseif X == 8 then Points = 2
    elseif X == 9 then Points = 3
    elseif X == 10 then Points = 3
    elseif X == 11 then Points = 3
    elseif X == 12 then Points = 3
    elseif X == 13 then Points = 4
    elseif X == 14 then Points = 4
    elseif X == 15 then Points = 4
    elseif X == 16 then Points = 4
    elseif X == 17 then Points = 5
    elseif X == 18 then Points = 5
    elseif X == 19 then Points = 5
    elseif X == 20 then Points = 5
    elseif X == 21 then Points = 6
    elseif X == 22 then Points = 6
    elseif X == 23 then Points = 6
    elseif X == 24 then Points = 6
    elseif X == 25 then Points = 7
    elseif X == 26 then Points = 7
    elseif X == 27 then Points = 7
    elseif X == 28 then Points = 7
    elseif X == 29 then Points = 8
    elseif X == 30 then Points = 8
    elseif X == 31 then Points = 8
    elseif X == 32 then Points = 8
    elseif X == 33 then Points = 9
    elseif X == 34 then Points = 9
    elseif X == 35 then Points = 9
    elseif X == 36 then Points = 9
    elseif X == 37 then Points = 10
    elseif X == 38 then Points = 10
    elseif X == 39 then Points = 10
    elseif X == 40 then Points = 10
    elseif X == 41 then Points = 10
    elseif X == 42 then Points = 10
    elseif X == 43 then Points = 10
    elseif X == 44 then Points = 10
    elseif X == 45 then Points = 10
    elseif X == 46 then Points = 10
    elseif X == 47 then Points = 10
    elseif X == 48 then Points = 10
    elseif X == 49 then Points = 10
    elseif X == 50 then Points = 10
    elseif X == 51 then Points = 10
    elseif X == 52 then Points = 10
    end
    
    if X == 1 then Dealerpoints = 1 
    elseif Y == 2 then Dealerpoints = 1 
    elseif Y == 3 then Dealerpoints = 1
    elseif Y == 4 then Dealerpoints = 1
    elseif Y == 5 then Dealerpoints = 2
    elseif Y == 6 then Dealerpoints = 2
    elseif Y == 7 then Dealerpoints = 2
    elseif Y == 8 then Dealerpoints = 2
    elseif Y == 9 then Dealerpoints = 3
    elseif Y == 10 then Dealerpoints = 3
    elseif Y == 11 then Dealerpoints = 3
    elseif Y == 12 then Dealerpoints = 3
    elseif Y == 13 then Dealerpoints = 4
    elseif Y == 14 then Dealerpoints = 4
    elseif Y == 15 then Dealerpoints = 4
    elseif Y == 16 then Dealerpoints = 4
    elseif Y == 17 then Dealerpoints = 5
    elseif Y == 18 then Dealerpoints = 5
    elseif Y == 19 then Dealerpoints = 5
    elseif Y == 20 then Dealerpoints = 5
    elseif Y == 21 then Dealerpoints = 6
    elseif Y == 22 then Dealerpoints = 6
    elseif Y == 23 then Dealerpoints = 6
    elseif Y == 24 then Dealerpoints = 6
    elseif Y == 25 then Dealerpoints = 7
    elseif Y == 26 then Dealerpoints = 7
    elseif Y == 27 then Dealerpoints = 7
    elseif Y == 28 then Dealerpoints = 7
    elseif Y == 29 then Dealerpoints = 8
    elseif Y == 30 then Dealerpoints = 8
    elseif Y == 31 then Dealerpoints = 8
    elseif Y == 32 then Dealerpoints = 8
    elseif Y == 33 then Dealerpoints = 9
    elseif Y == 34 then Dealerpoints = 9
    elseif Y == 35 then Dealerpoints = 9
    elseif Y == 36 then Dealerpoints = 9
    elseif Y == 37 then Dealerpoints = 10
    elseif Y == 38 then Dealerpoints = 10
    elseif Y == 39 then Dealerpoints = 10
    elseif Y == 40 then Dealerpoints = 10
    elseif Y == 41 then Dealerpoints = 10
    elseif Y == 42 then Dealerpoints = 10
    elseif Y == 43 then Dealerpoints = 10
    elseif Y == 44 then Dealerpoints = 10
    elseif Y == 45 then Dealerpoints = 10
    elseif Y == 46 then Dealerpoints = 10
    elseif Y == 47 then Dealerpoints = 10
    elseif Y == 48 then Dealerpoints = 10
    elseif Y == 49 then Dealerpoints = 10
    elseif Y == 50 then Dealerpoints = 10
    elseif Y == 51 then Dealerpoints = 10
    elseif Y == 52 then Dealerpoints = 10
    end
    
    if W == 1 then Pointstwo = 1 
    elseif W == 2 then Pointstwo = 1 
    elseif W == 3 then Pointstwo = 1
    elseif W == 4 then Pointstwo = 1
    elseif W == 5 then Pointstwo = 2
    elseif W == 6 then Pointstwo = 2
    elseif W == 7 then Pointstwo = 2
    elseif W == 8 then Pointstwo = 2
    elseif W == 9 then Pointstwo = 3
    elseif W == 10 then Pointstwo = 3
    elseif W == 11 then Pointstwo = 3
    elseif W == 12 then Pointstwo = 3
    elseif W == 13 then Pointstwo = 4
    elseif W == 14 then Pointstwo = 4
    elseif W == 15 then Pointstwo = 4
    elseif W == 16 then Pointstwo = 4
    elseif W == 17 then Pointstwo = 5
    elseif W == 18 then Pointstwo = 5
    elseif W == 19 then Pointstwo = 5
    elseif W == 20 then Pointstwo = 5
    elseif W == 21 then Pointstwo = 6
    elseif W == 22 then Pointstwo = 6
    elseif W == 23 then Pointstwo = 6
    elseif W == 24 then Pointstwo = 6
    elseif W == 25 then Pointstwo = 7
    elseif W == 26 then Pointstwo = 7
    elseif W == 27 then Pointstwo = 7
    elseif W == 28 then Pointstwo = 7
    elseif W == 29 then Pointstwo = 8
    elseif W == 30 then Pointstwo = 8
    elseif W == 31 then Pointstwo = 8
    elseif W == 32 then Pointstwo = 8
    elseif W == 33 then Pointstwo = 9
    elseif W == 34 then Pointstwo = 9
    elseif W == 35 then Pointstwo = 9
    elseif W == 36 then Pointstwo = 9
    elseif W == 37 then Pointstwo = 10
    elseif W == 38 then Pointstwo = 10
    elseif W == 39 then Pointstwo = 10
    elseif W == 40 then Pointstwo = 10
    elseif W == 41 then Pointstwo = 10
    elseif W == 42 then Pointstwo = 10
    elseif W == 43 then Pointstwo = 10
    elseif W == 44 then Pointstwo = 10
    elseif W == 45 then Pointstwo = 10
    elseif W == 46 then Pointstwo = 10
    elseif W == 47 then Pointstwo = 10
    elseif W == 48 then Pointstwo = 10
    elseif W == 49 then Pointstwo = 10
    elseif W == 50 then Pointstwo = 10
    elseif W == 51 then Pointstwo = 10
    elseif W == 52 then Pointstwo = 10
    end
    
    if V == 1 then Pointsthree = 1 
    elseif V == 2 then Pointsthree = 1 
    elseif V == 3 then Pointsthree = 1
    elseif V == 4 then Pointsthree = 1
    elseif V == 5 then Pointsthree = 2
    elseif V == 6 then Pointsthree = 2
    elseif V == 7 then Pointsthree = 2
    elseif V == 8 then Pointsthree = 2
    elseif V == 9 then Pointsthree = 3
    elseif V == 10 then Pointsthree = 3
    elseif V == 11 then Pointsthree = 3
    elseif V == 12 then Pointsthree = 3
    elseif V == 13 then Pointsthree = 4
    elseif V == 14 then Pointsthree = 4
    elseif V == 15 then Pointsthree = 4
    elseif V == 16 then Pointsthree = 4
    elseif V == 17 then Pointsthree = 5
    elseif V == 18 then Pointsthree = 5
    elseif V == 19 then Pointsthree = 5
    elseif V == 20 then Pointsthree = 5
    elseif V == 21 then Pointsthree = 6
    elseif V == 22 then Pointsthree = 6
    elseif V == 23 then Pointsthree = 6
    elseif V == 24 then Pointsthree = 6
    elseif V == 25 then Pointsthree = 7
    elseif V == 26 then Pointsthree = 7
    elseif V == 27 then Pointsthree = 7
    elseif V == 28 then Pointsthree = 7
    elseif V == 29 then Pointsthree = 8
    elseif V == 30 then Pointsthree = 8
    elseif V == 31 then Pointsthree = 8
    elseif V == 32 then Pointsthree = 8
    elseif V == 33 then Pointsthree = 9
    elseif V == 34 then Pointsthree = 9
    elseif V == 35 then Pointsthree = 9
    elseif V == 36 then Pointsthree = 9
    elseif V == 37 then Pointsthree = 10
    elseif V == 38 then Pointsthree = 10
    elseif V == 39 then Pointsthree = 10
    elseif V == 40 then Pointsthree = 10
    elseif V == 41 then Pointsthree = 10
    elseif V == 42 then Pointsthree = 10
    elseif V == 43 then Pointsthree = 10
    elseif V == 44 then Pointsthree = 10
    elseif V == 45 then Pointsthree = 10
    elseif V == 46 then Pointsthree = 10
    elseif V == 47 then Pointsthree = 10
    elseif V == 48 then Pointsthree = 10
    elseif V == 49 then Pointsthree = 10
    elseif V == 50 then Pointsthree = 10
    elseif V == 51 then Pointsthree = 10
    elseif V == 52 then Pointsthree = 10
    end
    
    if pad:up() and oldpad:up() ~= pad:up() then
    Command = Command-1
    end
    
    if pad:down() and oldpad:down() ~= pad:down() then 
    Command = Command+1
    end
    
    if Command > 3 then
    Command = 0
    end
    
    if Command < 0 then
    Command = 3
    end
    
    if Command == 0  then
    screen:blit(350,175,Selector)
    else
    if Command == 1  then
    screen:blit(360,195,Selector)
    else
    if Command == 2  then
    screen:blit(343,215,Selector)
    else
    if Command == 3  then
    screen:blit(350,235,Selector)
    end
    end
    end
    end
    
    if pad:cross() and Command == 0 then
    Select:play()
    end
    
    if pad:cross() and Command == 1 then
    Select:play() Drawcard = 1
    end
    
    if Drawcard == 1 then
    --drawCard() 
    drawingCard = true
    Points = Points + Pointstwo
    end
    
    Drawcardthree = 1
    
    if pad:cross() and Command == 1 and Drawcardthree == 1 then
    Select:play()
    Drawcardthree = 2
    end
    
    if Drawcardthree == 2 then
    --drawCardthree() 
    Points = Points+Pointsthree
    drawingThreeCards = true
    end
    
    if pad:cross() and Command == 2 then
    Select:play() 
    end
    
    if pad:cross() and Command == 3 then
    Select:play() 
    end
    
    battlvl = System.powerGetBatteryLifePercent()
    screen:print(107, 264, battlvl, white)
    screen:print(125, 264, "%", white)	
    screen:print(5, 264, "BatteryPower:", white)
    screen:print(55, 20,"Dealer", white)
    screen:print(65, 155,"You", white)
    screen:print(13, 210,Points, white)
    screen:print(9, 200,"PTS", white)
    screen:print(13, 75,Dealerpoints, white)
    screen:print(9, 65,"PTS", white)
    
    screen.waitVblankStart()
    screen.flip()
    oldpad = pad
    end
    Try this to see what happens.
    I changed the functions into variables.
    Geändert von EminentJonFrost (05-06-2006 um 10:05 AM Uhr)
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  21. #2091
    QJ Gamer Silver
    Points: 11.326, Level: 70
    Level completed: 19%, Points required for next Level: 324
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    871
    Points
    11.326
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Found anything except that i have to make it smaller

  22. #2092
    QJ Gamer Blue
    Points: 5.174, Level: 46
    Level completed: 12%, Points required for next Level: 176
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Beiträge
    125
    Points
    5.174
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    Hey , can someone tell me how i can do sinus/cosinus operations in lua pls? and an example would be great too

    thanks

  23. #2093
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von agashka
    Hey , can someone tell me how i can do sinus/cosinus operations in lua pls? and an example would be great too

    thanks
    Last time I checked, they were called "Sine" and "Cosine".

    These are the commands you're looking for:
    Code:
    math.cos()
    math.sin()
    math.tan()
    In the parantheses, you put the values you want for Luaplayer to solve.
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  24. #2094
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    ZereoX, check back a few posts.

    I know that wont solve your problem, but its a different way to look at it.

    The problem is: that the functions dont continue. they end right when you release 'X'. If they had a 'while true do' loop in them, the cards would stay, but the controls you put outside in the MAIN 'while true do' loop wont be in effect.
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  25. #2095
    QJ Gamer Silver
    Points: 11.326, Level: 70
    Level completed: 19%, Points required for next Level: 324
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    871
    Points
    11.326
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Eminent il just add the win and lose for now and make a release to show everyone max 2 cards so first acrd then hit then you have to stand.

  26. #2096
    Points: 4.110, Level: 40
    Level completed: 80%, Points required for next Level: 40
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Beiträge
    20
    Points
    4.110
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von EminentJonFrost
    Last time I checked, they were called "Sine" and "Cosine".

    These are the commands you're looking for:
    Code:
    math.cos()
    math.sin()
    math.tan()
    In the parantheses, you put the values you want for Luaplayer to solve.
    Also, it's important to note that Lua takes input for Trig functions in RADIANS ONLY. So, if you want to supply a value in degrees, you'll also have to convert it to radians with math.rad(). Therefore, your code might look something like:

    math.sin(math.rad(45))

  27. #2097
    noob

    Points: 11.654, Level: 71
    Level completed: 1%, Points required for next Level: 396
    Overall activity: 99,0%

    Registriert seit
    Jun 2005
    Beiträge
    220
    Points
    11.654
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    Code:
    		if pad:r() and oldpad:r() ~= pad:r() then
    			varPlayer = 2
    			enemyhealth = enemyhealth - VarPlayerrage * .1
    			varPlayerrage = 0
    		end
    When I press R, the first two lines under the if statement happen... the third one dosen't. Anyone know why and could help me?

  28. #2098
    QJ Gamer Gold
    Points: 18.627, Level: 86
    Level completed: 56%, Points required for next Level: 223
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    LOLWUT
    Beiträge
    2.625
    Points
    18.627
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Spiritbeast
    Code:
    		
    if pad:r() and oldpad:r() ~= pad:r() then
    			varPlayer = 2
    			enemyhealth = enemyhealth - VarPlayerrage * .1
    			varPlayerrage = 0
    		end
    When I press R, the first two lines under the if statement happen... the third one dosen't. Anyone know why and could help me?
    Hold up, is the v in VarPlayerrage supposed to be in capital? beacuse the next one is not.

  29. #2099
    QJ Gamer Blue
    Points: 5.174, Level: 46
    Level completed: 12%, Points required for next Level: 176
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Beiträge
    125
    Points
    5.174
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von EminentJonFrost
    Last time I checked, they were called "Sine" and "Cosine".

    These are the commands you're looking for:
    Code:
    math.cos()
    math.sin()
    math.tan()
    In the parantheses, you put the values you want for Luaplayer to solve.


    Thanks alot EminentJonFrost , if your interested take a look at what this served to me here:

    http://forums.qj.net/psp-development-forum/50097-gta2-port-psp.html#post624074

    thanks!!!

  30. #2100
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von agashka
    Thanks alot EminentJonFrost , if your interested take a look at what this served to me here:

    http://forums.qj.net/showthread.php?p=624074#post624074

    thanks!!!
    already did! :)
    your welcome!
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]


 

Tags for this Thread

Forumregeln

  • Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
  • Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
  • Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
  • Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.
  •  





Alle Zeitangaben in WEZ -8. Es ist jetzt 09:01 PM Uhr.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © , Caputo Media, LLC. All Rights Reserved. Cluster .