Case X Call CasinoDiceGame(index) Exit Sub
Sub ScriptedItem(index, Script) Select Case Script Case X Call CasinoDiceGame(index) Exit SubEnd Select End Sub
'****************************************************************'Dice Script, ©Dinand Mentink - ILNAIR!!!!!'****************************************************************Sub CasinoDiceGame(index)Dim diceroll1Dim diceroll2Dim dicerollDim prevrollDim itemDim itemvalueDim itemslotDim jackpotDim costDim prevrollercost = Int(1)item = Int(83)itemslot = Int(GetPlayerInvItemSlot(index, item))If itemslot = 0 Then Call PlayerMsg(index, "You do not have any Game Coins!", 12) Exit SubEnd Ifitemvalue = Int(GetPlayerInvItemValue(index, itemslot))If itemvalue < cost Then Call PlayerMsg(index, "You do not have enough Game Coins to play!", 12) Exit SubElse prevroller = GetVar("vars.ini", "Dice", "prevroller") If prevroller = GetPlayerName(index) Then Call PlayerMsg(index, "Give someone else a chance!", 12) Exit Sub End If Call PutVar("vars.ini", "Dice", "prevroller", GetPlayerName(index)) prevroll = Int(GetVar("vars.ini", "Dice", "prevroll")) jackpot = Int(GetVar("vars.ini", "Dice", "jackpot")) diceroll1 = Int((6 - 1 + 1) * Rnd) + 1 diceroll2 = Int((6 - 1 + 1) * Rnd) + 1 diceroll = Int(diceroll1 + diceroll2) If diceroll > prevroll Then Call GlobalMsg(GetPlayerName(index) & " rolls the powerdice and" & " rolls a " & diceroll1 & " and a " & diceroll2 & "! This is " & diceroll & " in total and wins!", 10) Else Call GlobalMsg(GetPlayerName(index) & " rolls the powerdice and" & " rolls a " & diceroll1 & " and a " & diceroll2 & "! This is " & diceroll & " in total and loses!", 12) jackpot = Int(jackpot + cost) Call PutVar("vars.ini", "Dice", "jackpot", "" & jackpot) Call GlobalMsg("The jackpot is " & Int(jackpot * 0.6) + 1 & " Game Coins for a " & prevroll + 1 & "!", 14) If itemvalue = cost Then Call SetPlayerInvItemNum(index, itemslot, 0) Call SetPlayerInvItemValue(index, itemslot, 0) Call SendInventoryUpdate(index, itemslot) Else Call SetPlayerInvItemValue(index, itemslot, itemvalue - cost) Call SendInventoryUpdate(index, itemslot) End If Exit Sub End If itemslot = GetPlayerInvItemSlot(index, item) If itemslot = 0 Then itemslot = GetPlayerInvItemSlot(index, item) Call SetPlayerInvItemNum(index, itemslot, item) Call SetPlayerInvItemValue(index, itemslot, Int(jackpot * 0.6) + 1) Call SendInventoryUpdate(index, itemslot) Else Call SetPlayerInvItemValue(index, itemslot, itemvalue + Int(jackpot * 0.6)) Call SendInventoryUpdate(index, itemslot) End If prevroll = Int((11 - 5 + 1) * Rnd) + 5 Call PutVar("vars.ini", "Dice", "prevroll", "" & prevroll) jackpot = Int((3 - 1 + 1) * Rnd) + 1 Call PutVar("vars.ini", "Dice", "jackpot", "" & jackpot) Call GlobalMsg("The jackpot is " & Int(jackpot * 0.6) + 1 & " Game Coins for a " & prevroll + 1 & "!", 14) End IfEnd SUb'****************************************************************'End of Dice Script!, ©Dinand Mentink - ILNAIR!!!!!'****************************************************************
[Dice]jackpot=1prevroll=6prevroller=Ilnair
"With it we will all find peace and love, and learn to accept each other for who we are, because we all have one common purpose in life, and that is to enjoy its taste"