[Lua] Russian roulette Item. Do you dare? menu

User Tag List

Results 1 to 13 of 13
  1. #1
    slade1000's Avatar Active Member

    Reputation
    66
    Join Date
    Jun 2008
    Posts
    99
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Lua] Russian roulette Item. Do you dare?


    This is a script that simulates the game russian roulette, If you miss you die and if you dont you get some gold so ye its pretty simple to understand basicly there are six bullets and you start the game you might win you might not.

    This did not have any errors when I ran it but its untested in game I would appreciate someone who could test this for me thanks


    http://pastebin.com/m1bc00ad1 ---Updated

    Have fun

    Last edited by slade1000; 12-31-2009 at 01:11 PM.

    [Lua] Russian roulette Item. Do you dare?
  2. #2
    stoneharry's Avatar Moderator Harry

    Authenticator enabled
    Reputation
    1613
    Join Date
    Sep 2007
    Posts
    4,554
    Thanks G/R
    151/146
    Trade Feedback
    0 (0%)
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    You should test your scripts before you release them; the item:CastSpell will bug, you should get the player to cast it. Apart from that looks good, interesting use of the tables.
    Last edited by stoneharry; 12-31-2009 at 07:43 AM.

  3. #3
    Dynashock's Avatar Contributor

    Reputation
    176
    Join Date
    Nov 2007
    Posts
    203
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why not use metatables instead of keys? Such as RR = {bullet = 6}, access the number with RR.bullet - allows for less errors and easier on the eye.

    Besides that, this script won't even work if you did change that item:CastSpell thing. I'll just point the errors out (not correct them as you need to learn from it and I'm lazy :P):
    - what's up with all the ifs and elseifs? if (ReturnBulletCount() == 2 or 3 or 4 or 6) is ran and it's a match then the others won't be even ran, it's entirely pointless to have the "elseif (ReturnBulletCount() == 4) then" and the like later on. Either remove the or's or remove the later elseifs.
    - then there's your math.random(). Its syntax is math.random(startnumber, endnumber), in the way you're currently using it will only return the number you entered, totally nullifying the point of "random".
    - You call the function "UpdateBulletCount", however it doesn't even exist, as it's called AdjustBulletCount
    - Why do you even have a "gold" index in that table?
    - what happens when the bulletcount is 1 (happens when bullet count is 2, you win and the count gets updated) - any way to reset the game?
    - incorrect usage of 'or' - if something == 5 or 6 or 7 or 9 doesn't work. It isn't comparing the 6, 7 and 9 to something, it's only comparing the something to 5, and then it's just 'if 6', or 'if 7' etc. Correct usage would be: if something == 5 or something == 6 or something == 7 or something == 9.
    - your logic with the randomisation is wrong too, I think: if I have 4 bullets and there's 6 places for bullets in a gun, I have 16.7*4% chance to get the bullet. Not 25% as it is with your current math.random(1, 4).
    Last edited by Dynashock; 12-31-2009 at 08:31 AM.

  4. #4
    slade1000's Avatar Active Member

    Reputation
    66
    Join Date
    Jun 2008
    Posts
    99
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have no way to test them stoneharry sadly as I am on a mac and I will fix the item cast spell


    Update: I fiixed the item cast spell to player cast spell
    Last edited by slade1000; 12-31-2009 at 01:11 PM.

  5. #5
    Hellgawd's Avatar Account not activated by Email
    Reputation
    710
    Join Date
    Jun 2007
    Posts
    2,480
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It might be worth paying 18$ a month to get a basic VPS where you can test scripts on, (just connect using RDP) or, you can always Boot Camp windows (like I do.)

    There's plenty of solutions, you can also try using ArceMux (I posted it in the programs section a while ago, just do a search for 'ArceMux') it's an ArcEmu - for Mac OSX.

    As for the script, it's a basic but intriguing idea. Keep em up!

    Cheers,
    hellgawd

  6. #6
    Mr.Ice.Cold's Avatar Active Member
    Reputation
    26
    Join Date
    Apr 2007
    Posts
    166
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rather than "You have lost the game, try again if you dare!" you should have put "BOOM HEADSHOT!" Anyway nice script slade, +rep

  7. #7
    slade1000's Avatar Active Member

    Reputation
    66
    Join Date
    Jun 2008
    Posts
    99
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Haha ok I will do that

  8. #8
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This idea is brilliant, easy and brilliant.
    Why do I need a signature?

  9. #9
    slade1000's Avatar Active Member

    Reputation
    66
    Join Date
    Jun 2008
    Posts
    99
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you Im glad you thought so

  10. #10
    RyeRye's Avatar Contributor
    Reputation
    240
    Join Date
    Aug 2008
    Posts
    996
    Thanks G/R
    0/1
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, if they lose you could make them loose some health, or make them die or something.



  11. #11
    slade1000's Avatar Active Member

    Reputation
    66
    Join Date
    Jun 2008
    Posts
    99
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if they lose they do die

  12. #12
    facka138b's Avatar Member
    Reputation
    10
    Join Date
    Mar 2008
    Posts
    37
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Usefull. I will add this to my server with credits!

  13. #13
    slade1000's Avatar Active Member

    Reputation
    66
    Join Date
    Jun 2008
    Posts
    99
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice hope you like it and it works well

Similar Threads

  1. Unlimited Limited Items (If you don't mind killing reputation)
    By Bugger00 in forum World of Warcraft Exploits
    Replies: 6
    Last Post: 04-23-2009, 01:38 PM
  2. [LUA]Warp/Teleport item.
    By Medzii in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 02-09-2009, 11:31 AM
  3. [Lua] Teleport/Warp Item?
    By Pretzal in forum WoW EMU Questions & Requests
    Replies: 3
    Last Post: 09-29-2008, 09:17 PM
  4. Wants a Gm item when you wake up! well here!
    By lilsavalex in forum World of Warcraft Bots and Programs
    Replies: 19
    Last Post: 03-18-2007, 07:10 PM
  5. Get as many limited supply Items as you want
    By Romeboat in forum World of Warcraft Exploits
    Replies: 10
    Last Post: 11-26-2006, 06:05 PM
All times are GMT -5. The time now is 07:10 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search