• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
  • entries
    23
  • comments
    30
  • views
    54319

LSL Casino Games Code

Sign in to follow this  
Followers 0
RLS0812

1274 views

Here are the LSL scripts for several of my casino games I wrote a long-long time ago.
The following is the original SL forum post ( spelling mistakes and all ) under my user name "Shippou Oud" .[quote]

Since the ban on advertising casino related items, I can no longer sell the items these were in, so I'm releasing the scripts here on the forums so folks can learn how certain items work.
My theorie on scripting, is keep it simple, and understandable. No need to over complicate it.[/quote]
[quote]1 prim slots This was a fun script to wright. Notice how I use numbers to make a symbol, and for each symbol is assigned a value, so when added up, the machine knows what is landed on, and if it is a winner or not. This also keeps track of payin, last player and total winnings. Also has a progressive jack pot. CODE
[/quote]list null= ["OK"];string name = "The Fruit Machine";string f1 = " banana ";string f2 = " cherry ";string f3 = " apple ";integer cha;integer f1a = 50;integer f2a = 60;integer f3a = 70;string LP;integer JP;integer ttpi;integer po;vector col = <0>;default{on_rez(integer x){ llResetScript();}state_entry(){llSetObjectName(name);cha = (integer) llFrand(999999998) + 1;llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);llSetPayPrice(PAY_HIDE, [10, PAY_HIDE, PAY_HIDE, PAY_HIDE]);JP = 1000;llSetText(name +" \n Last Player: " + LP + "\n Jack Pot $L" + (string) JP + "\n Total Pay Out $L" + (string) po,col,1);}touch_start(integer x){llInstantMessage(llDetectedKey(0),"Current Pay outs are 3 " + f1 + "$L" + (string) f1a + " , 3 " + f2 + "$L" + (string) f2a + " , 3 " + f3 + "$L" + (string) f3a + " . Only $L10 to play");if (llDetectedKey(0) == llGetOwner()){ llInstantMessage(llGetOwner(),"---- $L" + (string) ttpi);}}money(key play, integer mon){ttpi = ttpi + mon;JP = JP + 1;string w1;string w2;string w3;integer win1;integer win2;integer win3;integer a1 = (integer) llFrand(3) + 1;if (a1 == 1){w1 = f1;win1 = win1 + 1;}else if (a1 == 2){w1 = f2;win2 = win2 + 1;}else if (a1 == 3){w1 = f3;win3 = win3 + 1;}integer a2 = (integer) llFrand(3) + 1;if (a2 == 1){w2 = f1;win1 = win1 + 1;}else if (a2 == 2){w2 = f2;win2 = win2 + 1;}else if (a2 == 3){w2 = f3;win3 = win3 + 1;}integer a3 = (integer) llFrand(3) + 1;if (a3 == 1){w3 = f1;win1 = win1 + 1;}else if (a3 == 2){w3 = f2;win2 = win2 + 1;}else if (a3 == 3){w3 = f3;win3 = win3 + 1;}integer ww = (integer) llFrand(4) + 1;integer ww1 = (integer) llFrand(4) + 1;integer wmu = (integer) llFrand(25) + 1;integer wmu1 = (integer) llFrand(25) + 1;LP = llKey2Name(play);llInstantMessage(play,"Thank you " + LP + " . Good luck !");llDialog( play , " " + w1 + w2 + w3, null ,cha);if (ww == ww1){llDialog( play ,"You Won $L5", null ,cha);llGiveMoney(play,5);po = po + 5;}if (win1 == 3){llDialog( play ,"You Won $L" + (string) f1a, null ,cha);llGiveMoney(play, f1a);po = po + f1a;}else if (win2 == 3){llDialog( play ,"You Won $L" + (string) f2a, null ,cha);llGiveMoney(play, f2a);po = po + f2a;}else if (win3 == 3){llDialog( play ,"You Won $L" + (string) f3a, null ,cha);llGiveMoney(play, f3a);po = po + f3a;}integer Jack1 = (integer) llFrand(3000) + 1;integer Jack2 = (integer) llFrand(3000) + 1;{ if (Jack1 == Jack2) { llDialog( play ,"You Won The Jackpot of $L" + (string) JP, null ,cha);llGiveMoney(play, JP);po = po + JP;JP = 1000; }win1 = 0;win2 = 0;win3 = 0;llSetText(name +" \n Last Player: " + LP + "\n Jack Pot $L" + (string) JP + "\n Total Pay Out $L" + (string) po,col,1);}}run_time_permissions(integer perm){ if (PERMISSION_DEBIT & perm) { } else { llInstantMessage(llGetOwner(),"Sorry, you must click 'yes' to operate this. ");llRequestPermissions(llGetOwner(), PERMISSION_DEBIT); }}}[quote] $L Picker This game is unique. I came up with the idea a while ago, and developed this as one of my first sucessfull games. It works liek this. pay from 1 to 10. that becomes your number the script randomly generates a number from 1 to 10..if it matched win 4x bet. if it is 1 off, win 2x bet. CODE
[/quote]integer ttp;integer payin;default{ on_rez(integer x) { llResetScript(); } state_entry() { llSetTimerEvent(1); llSetText("$L Picker \n Click for info \n Pay $L1 to $L10 to play" + "\n" + "Total Payout $L" + (string) ttp,<.5,1,1>,1); llRequestPermissions(llGetOwner(), PERMISSION_DEBIT); } touch_start(integer x) { if (llDetectedKey(0) == llGetOwner()) { llInstantMessage(llGetOwner(),"$L" + (string) payin + " has been bet."); } if (llDetectedKey(0) != llGetOwner()) { llInstantMessage(llDetectedKey(0),"This game is simple. Bet from $L1 to $L10 if the computer picks your bet you win 4x the amount. if the computer is off by 1, you win 2x bet. \n Lets say you bet $L5 and the computer randomly picks 5, you'll win $L20. Now lets say you bet $L8 and the computer picks 7, you win $L16. \n 10 is considered to be the number below below 1, and 1 the number above 10, so if you bet $L10 and the computer picks 1, you'll win $L20."); } } money(key giver, integer amount) { payin = payin + amount; if (amount > 10) { llInstantMessage(giver,"Sorry, but I can only bet up to $L10 at a time, here is $L" + (string) amount + " back. "); llGiveMoney(giver,amount); payin = payin - amount; return; } float Winnum = llFrand(10); integer W2 = (integer) Winnum + 1; integer w2x = amount * 2; integer w4x = amount * 4; llInstantMessage(giver,"You bet " + (string) amount + " !"); llInstantMessage(giver,"The computer picks " + (string) W2 + " !" + "\n "); if (amount == W2) { llGiveMoney(giver,amount * 4); llSay(0,"Won $L" + (string) w4x + " !"); ttp = ttp + w4x; } if (amount == W2 + 1) { llGiveMoney(giver,amount * 2); llSay(0,"Won $L" + (string) w2x + " !"); ttp = ttp + w2x; } if (amount == W2 - 1) { llGiveMoney(giver,amount * 2); llSay(0,"Won $L"+ (string) w2x + " !"); ttp = ttp + w2x; } if (W2 - 9 == amount) { llGiveMoney(giver,amount * 2); llSay(0,"Won $L" + (string) w2x + " !"); ttp = ttp + w2x; } if (W2 + 9 == amount) { llGiveMoney(giver,amount * 2); llSay(0,"Won $L" + (string) w2x + " !"); ttp = ttp + w2x; } } timer() { llSetText("$L Picker \n Click for info \n Pay $L1 to $L10 to play" + "\n" + "Total Payout $L" + (string) ttp,<.5,1,1>,1);}run_time_permissions(integer perm){ if (PERMISSION_DEBIT & perm) { } else { llInstantMessage(llGetOwner(),"Sorry, you must click 'yes' to operate this. ");llRequestPermissions(llGetOwner(), PERMISSION_DEBIT); }} }[quote]Lucky Orb This script let the palyer to bet from 1 to 100. If the 2 numebrs from 1 to 3 matches that are generated, they win bet x 2. CODE
[/quote]integer pi;integer po;string wnnr;integer pyo;default{ on_rez(integer x) { llResetScript(); } state_entry() { pi = 0; po = 0; llRequestPermissions(llGetOwner(), PERMISSION_DEBIT); llSetTextureAnim(SMOOTH | LOOP | ANIM_ON, ALL_SIDES,0,0,0,0,.25); llSetText("Double your $L \n Bet from $L1 to $L100 \n " + wnnr + " has won $L" + (string) pyo + " \n Total Payout $L" + (string) po,<0>,1); } touch_start(integer total_number) { if (llDetectedKey(0) == llGetOwner()) { llInstantMessage(llGetOwner(),"Total Pay In $L" + (string) pi); } } money(key player, integer mon) { if (mon > 100) { integer df = mon - 100; llGiveMoney(player,df); llInstantMessage(player,"Sorry that was too much, here is $L" + (string) df + " in change."); mon = 100; } pi = pi + mon; llInstantMessage(player,"Good Luck!"); integer wn1 = (integer) llFrand(3) + 1; integer wn2 = (integer) llFrand(3) + 1; if (wn1 == wn2) { pyo = mon * 2; llGiveMoney(player, pyo); llInstantMessage(player,"You Won $L" + (string) pyo); po = po + pyo; wnnr = llKey2Name(player); } llSetText("Double your $L \n Bet from $L1 to $L100 \n " + wnnr + " has won $L" + (string) pyo + " \n Total Payout $L" + (string) po,<0>,1); llInstantMessage(player,"Thank you for playing.");}run_time_permissions(integer perm){ if (PERMISSION_DEBIT & perm) { } else { llInstantMessage(llGetOwner(),"Sorry, you must click 'yes' to operate this. ");llRequestPermissions(llGetOwner(), PERMISSION_DEBIT); }}}[quote]randon $L giver For this script, pay in 10-100, and get something back every time. The script picks a number , and determins the pay scale. 1.8 x bet is the max. CODE
[/quote]integer pi;integer po;string wnnr;integer pyo;default{ on_rez(integer x) { llResetScript(); } state_entry() { pi = 0; po = 0; llRequestPermissions(llGetOwner(), PERMISSION_DEBIT); llSetTextureAnim(SMOOTH | LOOP | ANIM_ON, ALL_SIDES,0,0,0,0,.25); llSetText("Win Random $L \n Bet from $L10 to $L100 \n " + wnnr + " has won $L" + (string) pyo + " \n Total Payout $L" + (string) po,<.1,1,.5>,1); } touch_start(integer x) { if (llDetectedKey(0) == llGetOwner()) { llInstantMessage(llGetOwner(),"Total Pay In $L" + (string) pi); } } money(key player, integer mon) { if (mon > 100) { llInstantMessage(player,"Sorry this is too much, here is your refund"); llGiveMoney(player,mon); } else if (mon < 10) { llInstantMessage(player,"Sorry this is not enough. Please bet $L10 or more, here is your refund"); llGiveMoney(player,mon); } else { pi = pi + mon; llInstantMessage(player,"Good Luck"); integer wun = mon * 2 - 2; integer wun1 = (integer)llFrand(wun) + 1; llGiveMoney(player,wun1); wnnr = llKey2Name(player); pyo = wun1; po = po + wun1; llInstantMessage(player, "Congradulations, you won $L" + (string) wun1); llSetText("Win Random $L \n Bet from $L10 to $L100 \n " + wnnr + " has won $L" + (string) pyo + " \n Total Payout $L" + (string) po,<.1,1,.5>,1); llInstantMessage(player,"Thank you for playing.");}}run_time_permissions(integer perm){ if (PERMISSION_DEBIT & perm) { } else { llInstantMessage(llGetOwner(),"Sorry, you must click 'yes' to operate this. ");llRequestPermissions(llGetOwner(), PERMISSION_DEBIT); }}}[quote] betting orbs this is one of my more feature laden gaming scripts. I put it to change the object name, due to the fact I made a lot of different dominations of orbs, and was getting them confused. Made it very eayy to tell which one was which. CODE
[/quote]integer p1 = 10;integer p2;string lpl;integer tpi;integer tpo;integer tpp;default{ on_rez(integer x) { llResetScript(); } state_entry() { p2 = p1 * 10; tpi = 0; tpo = 0; tpp = 0; lpl = ""; llSetObjectName("Betting Orb $L" + (string) p1); llSetText("Bet $L" + (string) p1+ " - Win $L" + (string) p2 + "\n Last Player: " + lpl,<1>,1); llRequestPermissions(llGetOwner(), PERMISSION_DEBIT); llSetPayPrice(PAY_HIDE, [p1, PAY_HIDE, PAY_HIDE, PAY_HIDE]); }touch_start(integer x){ if (llDetectedKey(0) != llGetOwner()) { llInstantMessage(llDetectedKey(0),"Please pay $L" + (string) p1 + " to play. \n You can win $L" + (string) p2); } if (llDetectedKey(0) == llGetOwner()) { llInstantMessage(llGetOwner()," \n Total pay in - $L" + (string) tpi + "\n Total pay out - $L" + (string) tpo + " \n Total times played - " + (string) tpp); }}money(key pla, integer mon){ tpp = tpp + 1; tpi = tpi + mon; lpl = llKey2Name(pla); llInstantMessage(pla,"Good luck, " + lpl + "."); integer num1 = (integer) llFrand(14) + 1; integer num2 = (integer) llFrand(14) + 1; if (num1 == num2) { llInstantMessage(pla,"You won $L" + (string) p2 + " !"); llGiveMoney(pla,p2); tpo = tpo + p2; } llInstantMessage(pla,"Thank you for playing."); llSetText("Bet $L" + (string) p1+ " - Win $L" + (string) p2 + "\n Last Player: " + lpl,<1>,1);} run_time_permissions(integer perm){ if (PERMISSION_DEBIT & perm) { } else { llInstantMessage(llGetOwner(),"Sorry, you must click 'yes' to operate this. ");llRequestPermissions(llGetOwner(), PERMISSION_DEBIT); } }}

0
Sign in to follow this  
Followers 0


0 Comments


There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now