oclipper
09-21-2014, 21:38
This script is very simple, I created the ElfBot Casino Script, so this one is very look like.
There is 2 versions of Casino Script:
1- With Dice
Tested on otserver 8.6
Put 1 (just one) dice inside your open backpack
2- Without Dice (easy)
For newer Tibia versions that you cant roll Die (dice) on Depot;
Generate a Randon number between 1-6.
Casino accept 3 crystal and payout 5. You can edit values but you may have some trouble, than PM me.
Do exactly as image below:
http://i.imgur.com/RWcOLn7.png
1- With Dice
#define pay and payout
SetLootOff
fastExiva _pay = 3
fastExiva _payout = 5
fastExiva _message2 = Come and play on BlackdBot Casino! Play 30k
# default pay = 3 crystals (30k), payout = 5 crystals (50k)
:start
fastExiva _message1 = $randomnumber:1>50$
fastExiva _crystalid = E3 0B
fastExiva _count1 = $countitems:{$_crystalid$}$
sayMessage Exiva > 78 $numbertohex2:{$numericalexp:{$myx$}+1$}$ $numbertohex2:{$numericalexp:{$myy$}-1$}$ $numbertohex1:{$myz$}$ E3 0B 01 FF FF 05 00 00 $numbertohex1:{$_pay$}$
waitX 1
fastExiva _count2 = $countitems:{$_crystalid$}$
fastExiva _count3 = $numericalexp:{$_count2$}-{$_count1$}$
IfTrue ($_count3$#number=#$_pay$) Goto $nlineoflabel:run$
IfTrue ($_message1$#number=#1) Goto $nlineoflabel:message$
gotoScriptLine $nlineoflabel:start$
:run
sayMessage exiva > 78 FF FF 05 00 00 $hex-equiped-item:05$ 00 FF FF 03 00 00 $numbertohex1:{$_pay$}$
sayMessage Say "hi" to continue
:hi
IfTrue ($lastmsg$#string=#hi) Goto $nlineoflabel:check$
gotoScriptLine $nlineoflabel:hi$
:check
sayMessage Say "high" or "low"
:horl
IfTrue ($lastmsg$#string=#low) Goto $nlineoflabel:dicelow$
IfTrue ($lastmsg$#string=#high) Goto $nlineoflabel:dicehigh$
gotoScriptLine $nlineoflabel:horl$
:dicelow
:ll
fastExiva _dice1id = A0 16
fastExiva _dice2id = A1 16
fastExiva _dice3id = A2 16
fastExiva _dice4id = A3 16
fastExiva _dice5id = A4 16
fastExiva _dice6id = A5 16
fastExiva _dice1 = $countitems:{$_dice1id$}$
fastExiva _dice2 = $countitems:{$_dice2id$}$
fastExiva _dice3 = $countitems:{$_dice3id$}$
fastExiva _dice4 = $countitems:{$_dice4id$}$
fastExiva _dice5 = $countitems:{$_dice5id$}$
fastExiva _dice6 = $countitems:{$_dice6id$}$
IfTrue ($_dice1$#number>#0) Goto $nlineoflabel:llow1$
IfTrue ($_dice2$#number>#0) Goto $nlineoflabel:llow2$
IfTrue ($_dice3$#number>#0) Goto $nlineoflabel:llow3$
IfTrue ($_dice4$#number>#0) Goto $nlineoflabel:llow4$
IfTrue ($_dice5$#number>#0) Goto $nlineoflabel:llow5$
IfTrue ($_dice6$#number>#0) Goto $nlineoflabel:llow6$
gotoScriptLine $nlineoflabel:ll$
:dicehigh
:hh
fastExiva _dice1id = A0 16
fastExiva _dice2id = A1 16
fastExiva _dice3id = A2 16
fastExiva _dice4id = A3 16
fastExiva _dice5id = A4 16
fastExiva _dice6id = A5 16
fastExiva _dice1 = $countitems:{$_dice1id$}$
fastExiva _dice2 = $countitems:{$_dice2id$}$
fastExiva _dice3 = $countitems:{$_dice3id$}$
fastExiva _dice4 = $countitems:{$_dice4id$}$
fastExiva _dice5 = $countitems:{$_dice5id$}$
fastExiva _dice6 = $countitems:{$_dice6id$}$
IfTrue ($_dice1$#number>#0) Goto $nlineoflabel:hhigh1$
IfTrue ($_dice2$#number>#0) Goto $nlineoflabel:hhigh2$
IfTrue ($_dice3$#number>#0) Goto $nlineoflabel:hhigh3$
IfTrue ($_dice4$#number>#0) Goto $nlineoflabel:hhigh4$
IfTrue ($_dice5$#number>#0) Goto $nlineoflabel:hhigh5$
IfTrue ($_dice6$#number>#0) Goto $nlineoflabel:hhigh6$
gotoScriptLine $nlineoflabel:hh$
:loser
sayMessage You lose Playboy
waitX 1
gotoScriptLine $nlineoflabel:start$
:payout
sayMessage You WIN
sayMessage exiva #E3 0B 06
waitX 1
sayMessage Exiva > 78 FF FF 06 00 00 $hex-equiped-item:06$ 00 $numbertohex2:{$numericalexp:{$myx$}+1$}$ $numbertohex2:{$numericalexp:{$myy$}-1$}$ $numbertohex1:{$myz$}$ $numbertohex1:{$_payout$}$
waitX 1
sayMessage exiva #E3 0B 06
waitX 1
gotoScriptLine $nlineoflabel:start$
:message
sayMessage $_message2$
gotoScriptLine $nlineoflabel:start$
:llow1
sayMessage exiva > 82 FF FF 00 00 00 A0 16 00 00
gotoScriptLine $nlineoflabel:low$
:llow2
sayMessage exiva > 82 FF FF 00 00 00 A1 16 00 00
gotoScriptLine $nlineoflabel:low$
:llow3
sayMessage exiva > 82 FF FF 00 00 00 A2 16 00 00
gotoScriptLine $nlineoflabel:low$
:llow4
sayMessage exiva > 82 FF FF 00 00 00 A3 16 00 00
gotoScriptLine $nlineoflabel:low$
:llow5
sayMessage exiva > 82 FF FF 00 00 00 A4 16 00 00
gotoScriptLine $nlineoflabel:low$
:llow6
sayMessage exiva > 82 FF FF 00 00 00 A5 16 00 00
gotoScriptLine $nlineoflabel:low$
:hhigh1
sayMessage exiva > 82 FF FF 00 00 00 A0 16 00 00
gotoScriptLine $nlineoflabel:high$
:hhigh2
sayMessage exiva > 82 FF FF 00 00 00 A1 16 00 00
gotoScriptLine $nlineoflabel:high$
:hhigh3
sayMessage exiva > 82 FF FF 00 00 00 A2 16 00 00
gotoScriptLine $nlineoflabel:high$
:hhigh4
sayMessage exiva > 82 FF FF 00 00 00 A3 16 00 00
gotoScriptLine $nlineoflabel:high$
:hhigh5
sayMessage exiva > 82 FF FF 00 00 00 A4 16 00 00
gotoScriptLine $nlineoflabel:high$
:hhigh6
sayMessage exiva > 82 FF FF 00 00 00 A5 16 00 00
gotoScriptLine $nlineoflabel:high$
:low
sayMessage Loading [...]
waitX 1
fastExiva _dice1id = A0 16
fastExiva _dice1 = $countitems:{$_dice1id$}$
waitX 1
fastExiva _dice1 = $countitems:{$_dice1id$}$
IfTrue ($_dice1$#number>#0) Goto $nlineoflabel:payout$
fastExiva _dice2id = A1 16
fastExiva _dice2 = $countitems:{$_dice2id$}$
waitX 1
fastExiva _dice2 = $countitems:{$_dice2id$}$
IfTrue ($_dice2$#number>#0) Goto $nlineoflabel:payout$
fastExiva _dice3id = A2 16
fastExiva _dice3 = $countitems:{$_dice3id$}$
waitX 1
fastExiva _dice3 = $countitems:{$_dice3id$}$
IfTrue ($_dice3$#number>#0) Goto $nlineoflabel:payout$
gotoScriptLine $nlineoflabel:loser$
:high
sayMessage Loading [...]
waitX 1
fastExiva _dice4id = A3 16
fastExiva _dice4 = $countitems:{$_dice4id$}$
waitX 1
fastExiva _dice4 = $countitems:{$_dice4id$}$
IfTrue ($_dice4$#number>#0) Goto $nlineoflabel:payout$
fastExiva _dice5id = A4 16
fastExiva _dice5 = $countitems:{$_dice5id$}$
waitX 1
fastExiva _dice5 = $countitems:{$_dice5id$}$
IfTrue ($_dice5$#number>#0) Goto $nlineoflabel:payout$
fastExiva _dice6id = A5 16
fastExiva _dice6 = $countitems:{$_dice6id$}$
waitX 1
fastExiva _dice6 = $countitems:{$_dice6id$}$
IfTrue ($_dice6$#number>#0) Goto $nlineoflabel:payout$
gotoScriptLine $nlineoflabel:loser$
2- Without Dice
#define pay and payout
SetLootOff
fastExiva _pay = 3
fastExiva _payout = 5
fastExiva _message2 = Come and play on BlackdBot Casino! Play 30k
# default pay = 3 crystals (30k), payout = 5 crystals (50k)
:start
fastExiva _message1 = $randomnumber:1>50$
fastExiva _crystalid = E3 0B
fastExiva _count1 = $countitems:{$_crystalid$}$
sayMessage Exiva > 78 $numbertohex2:{$numericalexp:{$myx$}+1$}$ $numbertohex2:{$numericalexp:{$myy$}-1$}$ $numbertohex1:{$myz$}$ E3 0B 01 FF FF 05 00 00 $numbertohex1:{$_pay$}$
waitX 1
fastExiva _count2 = $countitems:{$_crystalid$}$
fastExiva _count3 = $numericalexp:{$_count2$}-{$_count1$}$
IfTrue ($_count3$#number=#$_pay$) Goto $nlineoflabel:run$
IfTrue ($_message1$#number=#1) Goto $nlineoflabel:message$
gotoScriptLine $nlineoflabel:start$
:run
sayMessage exiva > 78 FF FF 05 00 00 $hex-equiped-item:05$ 00 FF FF 03 00 00 $numbertohex1:{$_pay$}$
sayMessage Say "hi" to continue
:hi
IfTrue ($lastmsg$#string=#hi) Goto $nlineoflabel:check$
gotoScriptLine $nlineoflabel:hi$
:check
sayMessage Say "high" or "low"
:horl
IfTrue ($lastmsg$#string=#low) Goto $nlineoflabel:dicelow$
IfTrue ($lastmsg$#string=#high) Goto $nlineoflabel:dicehigh$
gotoScriptLine $nlineoflabel:horl$
:dicelow
sayMessage Blackd Bot is generating randon number
waitX 1
fastExiva _rndnum = $randomnumber:1>6$
waitX 2
sayMessage Random number: $_rndnum$
IfTrue ($_rndnum$#number=#1) Goto $nlineoflabel:payout$
IfTrue ($_rndnum$#number=#2) Goto $nlineoflabel:payout$
IfTrue ($_rndnum$#number=#3) Goto $nlineoflabel:payout$
gotoScriptLine $nlineoflabel:loser$
:dicehigh
sayMessage Blackd Bot is generating randon number
waitX 2
fastExiva _rndnum = $randomnumber:1>6$
waitX 1
sayMessage Random number: $_rndnum$
IfTrue ($_rndnum$#number=#4) Goto $nlineoflabel:payout$
IfTrue ($_rndnum$#number=#5) Goto $nlineoflabel:payout$
IfTrue ($_rndnum$#number=#6) Goto $nlineoflabel:payout$
gotoScriptLine $nlineoflabel:loser$
:loser
sayMessage You lose Playboy
waitX 1
gotoScriptLine $nlineoflabel:start$
:payout
sayMessage You WIN
sayMessage exiva #E3 0B 06
waitX 1
sayMessage Exiva > 78 FF FF 06 00 00 $hex-equiped-item:06$ 00 $numbertohex2:{$numericalexp:{$myx$}+2$}$ $numbertohex2:{$numericalexp:{$myy$}-1$}$ $numbertohex1:{$myz$}$ $numbertohex1:{$_payout$}$
waitX 1
sayMessage exiva #E3 0B 06
waitX 1
gotoScriptLine $nlineoflabel:start$
:message
sayMessage $_message2$
gotoScriptLine $nlineoflabel:start$
There is 2 versions of Casino Script:
1- With Dice
Tested on otserver 8.6
Put 1 (just one) dice inside your open backpack
2- Without Dice (easy)
For newer Tibia versions that you cant roll Die (dice) on Depot;
Generate a Randon number between 1-6.
Casino accept 3 crystal and payout 5. You can edit values but you may have some trouble, than PM me.
Do exactly as image below:
http://i.imgur.com/RWcOLn7.png
1- With Dice
#define pay and payout
SetLootOff
fastExiva _pay = 3
fastExiva _payout = 5
fastExiva _message2 = Come and play on BlackdBot Casino! Play 30k
# default pay = 3 crystals (30k), payout = 5 crystals (50k)
:start
fastExiva _message1 = $randomnumber:1>50$
fastExiva _crystalid = E3 0B
fastExiva _count1 = $countitems:{$_crystalid$}$
sayMessage Exiva > 78 $numbertohex2:{$numericalexp:{$myx$}+1$}$ $numbertohex2:{$numericalexp:{$myy$}-1$}$ $numbertohex1:{$myz$}$ E3 0B 01 FF FF 05 00 00 $numbertohex1:{$_pay$}$
waitX 1
fastExiva _count2 = $countitems:{$_crystalid$}$
fastExiva _count3 = $numericalexp:{$_count2$}-{$_count1$}$
IfTrue ($_count3$#number=#$_pay$) Goto $nlineoflabel:run$
IfTrue ($_message1$#number=#1) Goto $nlineoflabel:message$
gotoScriptLine $nlineoflabel:start$
:run
sayMessage exiva > 78 FF FF 05 00 00 $hex-equiped-item:05$ 00 FF FF 03 00 00 $numbertohex1:{$_pay$}$
sayMessage Say "hi" to continue
:hi
IfTrue ($lastmsg$#string=#hi) Goto $nlineoflabel:check$
gotoScriptLine $nlineoflabel:hi$
:check
sayMessage Say "high" or "low"
:horl
IfTrue ($lastmsg$#string=#low) Goto $nlineoflabel:dicelow$
IfTrue ($lastmsg$#string=#high) Goto $nlineoflabel:dicehigh$
gotoScriptLine $nlineoflabel:horl$
:dicelow
:ll
fastExiva _dice1id = A0 16
fastExiva _dice2id = A1 16
fastExiva _dice3id = A2 16
fastExiva _dice4id = A3 16
fastExiva _dice5id = A4 16
fastExiva _dice6id = A5 16
fastExiva _dice1 = $countitems:{$_dice1id$}$
fastExiva _dice2 = $countitems:{$_dice2id$}$
fastExiva _dice3 = $countitems:{$_dice3id$}$
fastExiva _dice4 = $countitems:{$_dice4id$}$
fastExiva _dice5 = $countitems:{$_dice5id$}$
fastExiva _dice6 = $countitems:{$_dice6id$}$
IfTrue ($_dice1$#number>#0) Goto $nlineoflabel:llow1$
IfTrue ($_dice2$#number>#0) Goto $nlineoflabel:llow2$
IfTrue ($_dice3$#number>#0) Goto $nlineoflabel:llow3$
IfTrue ($_dice4$#number>#0) Goto $nlineoflabel:llow4$
IfTrue ($_dice5$#number>#0) Goto $nlineoflabel:llow5$
IfTrue ($_dice6$#number>#0) Goto $nlineoflabel:llow6$
gotoScriptLine $nlineoflabel:ll$
:dicehigh
:hh
fastExiva _dice1id = A0 16
fastExiva _dice2id = A1 16
fastExiva _dice3id = A2 16
fastExiva _dice4id = A3 16
fastExiva _dice5id = A4 16
fastExiva _dice6id = A5 16
fastExiva _dice1 = $countitems:{$_dice1id$}$
fastExiva _dice2 = $countitems:{$_dice2id$}$
fastExiva _dice3 = $countitems:{$_dice3id$}$
fastExiva _dice4 = $countitems:{$_dice4id$}$
fastExiva _dice5 = $countitems:{$_dice5id$}$
fastExiva _dice6 = $countitems:{$_dice6id$}$
IfTrue ($_dice1$#number>#0) Goto $nlineoflabel:hhigh1$
IfTrue ($_dice2$#number>#0) Goto $nlineoflabel:hhigh2$
IfTrue ($_dice3$#number>#0) Goto $nlineoflabel:hhigh3$
IfTrue ($_dice4$#number>#0) Goto $nlineoflabel:hhigh4$
IfTrue ($_dice5$#number>#0) Goto $nlineoflabel:hhigh5$
IfTrue ($_dice6$#number>#0) Goto $nlineoflabel:hhigh6$
gotoScriptLine $nlineoflabel:hh$
:loser
sayMessage You lose Playboy
waitX 1
gotoScriptLine $nlineoflabel:start$
:payout
sayMessage You WIN
sayMessage exiva #E3 0B 06
waitX 1
sayMessage Exiva > 78 FF FF 06 00 00 $hex-equiped-item:06$ 00 $numbertohex2:{$numericalexp:{$myx$}+1$}$ $numbertohex2:{$numericalexp:{$myy$}-1$}$ $numbertohex1:{$myz$}$ $numbertohex1:{$_payout$}$
waitX 1
sayMessage exiva #E3 0B 06
waitX 1
gotoScriptLine $nlineoflabel:start$
:message
sayMessage $_message2$
gotoScriptLine $nlineoflabel:start$
:llow1
sayMessage exiva > 82 FF FF 00 00 00 A0 16 00 00
gotoScriptLine $nlineoflabel:low$
:llow2
sayMessage exiva > 82 FF FF 00 00 00 A1 16 00 00
gotoScriptLine $nlineoflabel:low$
:llow3
sayMessage exiva > 82 FF FF 00 00 00 A2 16 00 00
gotoScriptLine $nlineoflabel:low$
:llow4
sayMessage exiva > 82 FF FF 00 00 00 A3 16 00 00
gotoScriptLine $nlineoflabel:low$
:llow5
sayMessage exiva > 82 FF FF 00 00 00 A4 16 00 00
gotoScriptLine $nlineoflabel:low$
:llow6
sayMessage exiva > 82 FF FF 00 00 00 A5 16 00 00
gotoScriptLine $nlineoflabel:low$
:hhigh1
sayMessage exiva > 82 FF FF 00 00 00 A0 16 00 00
gotoScriptLine $nlineoflabel:high$
:hhigh2
sayMessage exiva > 82 FF FF 00 00 00 A1 16 00 00
gotoScriptLine $nlineoflabel:high$
:hhigh3
sayMessage exiva > 82 FF FF 00 00 00 A2 16 00 00
gotoScriptLine $nlineoflabel:high$
:hhigh4
sayMessage exiva > 82 FF FF 00 00 00 A3 16 00 00
gotoScriptLine $nlineoflabel:high$
:hhigh5
sayMessage exiva > 82 FF FF 00 00 00 A4 16 00 00
gotoScriptLine $nlineoflabel:high$
:hhigh6
sayMessage exiva > 82 FF FF 00 00 00 A5 16 00 00
gotoScriptLine $nlineoflabel:high$
:low
sayMessage Loading [...]
waitX 1
fastExiva _dice1id = A0 16
fastExiva _dice1 = $countitems:{$_dice1id$}$
waitX 1
fastExiva _dice1 = $countitems:{$_dice1id$}$
IfTrue ($_dice1$#number>#0) Goto $nlineoflabel:payout$
fastExiva _dice2id = A1 16
fastExiva _dice2 = $countitems:{$_dice2id$}$
waitX 1
fastExiva _dice2 = $countitems:{$_dice2id$}$
IfTrue ($_dice2$#number>#0) Goto $nlineoflabel:payout$
fastExiva _dice3id = A2 16
fastExiva _dice3 = $countitems:{$_dice3id$}$
waitX 1
fastExiva _dice3 = $countitems:{$_dice3id$}$
IfTrue ($_dice3$#number>#0) Goto $nlineoflabel:payout$
gotoScriptLine $nlineoflabel:loser$
:high
sayMessage Loading [...]
waitX 1
fastExiva _dice4id = A3 16
fastExiva _dice4 = $countitems:{$_dice4id$}$
waitX 1
fastExiva _dice4 = $countitems:{$_dice4id$}$
IfTrue ($_dice4$#number>#0) Goto $nlineoflabel:payout$
fastExiva _dice5id = A4 16
fastExiva _dice5 = $countitems:{$_dice5id$}$
waitX 1
fastExiva _dice5 = $countitems:{$_dice5id$}$
IfTrue ($_dice5$#number>#0) Goto $nlineoflabel:payout$
fastExiva _dice6id = A5 16
fastExiva _dice6 = $countitems:{$_dice6id$}$
waitX 1
fastExiva _dice6 = $countitems:{$_dice6id$}$
IfTrue ($_dice6$#number>#0) Goto $nlineoflabel:payout$
gotoScriptLine $nlineoflabel:loser$
2- Without Dice
#define pay and payout
SetLootOff
fastExiva _pay = 3
fastExiva _payout = 5
fastExiva _message2 = Come and play on BlackdBot Casino! Play 30k
# default pay = 3 crystals (30k), payout = 5 crystals (50k)
:start
fastExiva _message1 = $randomnumber:1>50$
fastExiva _crystalid = E3 0B
fastExiva _count1 = $countitems:{$_crystalid$}$
sayMessage Exiva > 78 $numbertohex2:{$numericalexp:{$myx$}+1$}$ $numbertohex2:{$numericalexp:{$myy$}-1$}$ $numbertohex1:{$myz$}$ E3 0B 01 FF FF 05 00 00 $numbertohex1:{$_pay$}$
waitX 1
fastExiva _count2 = $countitems:{$_crystalid$}$
fastExiva _count3 = $numericalexp:{$_count2$}-{$_count1$}$
IfTrue ($_count3$#number=#$_pay$) Goto $nlineoflabel:run$
IfTrue ($_message1$#number=#1) Goto $nlineoflabel:message$
gotoScriptLine $nlineoflabel:start$
:run
sayMessage exiva > 78 FF FF 05 00 00 $hex-equiped-item:05$ 00 FF FF 03 00 00 $numbertohex1:{$_pay$}$
sayMessage Say "hi" to continue
:hi
IfTrue ($lastmsg$#string=#hi) Goto $nlineoflabel:check$
gotoScriptLine $nlineoflabel:hi$
:check
sayMessage Say "high" or "low"
:horl
IfTrue ($lastmsg$#string=#low) Goto $nlineoflabel:dicelow$
IfTrue ($lastmsg$#string=#high) Goto $nlineoflabel:dicehigh$
gotoScriptLine $nlineoflabel:horl$
:dicelow
sayMessage Blackd Bot is generating randon number
waitX 1
fastExiva _rndnum = $randomnumber:1>6$
waitX 2
sayMessage Random number: $_rndnum$
IfTrue ($_rndnum$#number=#1) Goto $nlineoflabel:payout$
IfTrue ($_rndnum$#number=#2) Goto $nlineoflabel:payout$
IfTrue ($_rndnum$#number=#3) Goto $nlineoflabel:payout$
gotoScriptLine $nlineoflabel:loser$
:dicehigh
sayMessage Blackd Bot is generating randon number
waitX 2
fastExiva _rndnum = $randomnumber:1>6$
waitX 1
sayMessage Random number: $_rndnum$
IfTrue ($_rndnum$#number=#4) Goto $nlineoflabel:payout$
IfTrue ($_rndnum$#number=#5) Goto $nlineoflabel:payout$
IfTrue ($_rndnum$#number=#6) Goto $nlineoflabel:payout$
gotoScriptLine $nlineoflabel:loser$
:loser
sayMessage You lose Playboy
waitX 1
gotoScriptLine $nlineoflabel:start$
:payout
sayMessage You WIN
sayMessage exiva #E3 0B 06
waitX 1
sayMessage Exiva > 78 FF FF 06 00 00 $hex-equiped-item:06$ 00 $numbertohex2:{$numericalexp:{$myx$}+2$}$ $numbertohex2:{$numericalexp:{$myy$}-1$}$ $numbertohex1:{$myz$}$ $numbertohex1:{$_payout$}$
waitX 1
sayMessage exiva #E3 0B 06
waitX 1
gotoScriptLine $nlineoflabel:start$
:message
sayMessage $_message2$
gotoScriptLine $nlineoflabel:start$