Help - Search - Members - Calendar
Full Version: I have a ID Read Fast!
StealthBot.net > StealthBot > Scripting and Plugins
Eleven
hi

the plugin: Gamble
I like the plugin But can you add some stuff ??
like UserTalk, UserEmote and WhisperFromUser
bncache if i am in a game & i have to w8 long
i like to gamble in Whisper mode
meby you can add that for US. rolleyes.gif

i have send some help meby u can use it as a start
CODE
Public Const Gamble_CMD = "gamble"
Public Const Gamble_ACC = -1

Sub Gamble_Event_Load
End Sub

Sub Gamble_Event_PressedEnter(Text)
Gamble_ProccessInput BotVars.Username, Text, 4
End Sub

Sub Gamble_Event_UserTalk(Username, Flags, Message, Ping)
Gamble_ProccessInput Username, Message, 0
End Sub

Sub Gamble_Event_UserEmote(Username, Flags, Message)
Gamble_ProccessInput Username, Message, 0
End Sub

Sub Gamble_Event_WhisperFromUser(Username, Flags, Message)
Gamble_ProccessInput Username, Message, 3
End Sub

Sub Gamble_ProccessInput(Username, Message, dspId)
If Not (Left(Message, 1) = "/" or Left(Message, 1) = BotVars.Trigger) Then Exit Sub
If Len(Message) < 2 Then Exit Sub

GetDBEntry Username, Access, Flags
arrCmd = Split(Mid(Trim(Message), 2))

Select Case LCase(arrCmd(0))
   Case LCase(Gamble_CMD):
      Gamble_Command Username, arrCmd, dspId, Access
End Select
End Sub

Sub Gamble_Command(Username, Cmd, dspId, Access)
On Error Resume Next
Dim sContent, sQuery, sPOS, sDefinition
If dspId <> 4 and Access < Gamble_ACC Then Exit Sub
If dspId = 4 Then VetoThisMessage
The-Black-Ninja
This looks like it's already set up to whisper back if you whisper it, emote if you emote, etc.
Eleven
i sayd it was a start i have copyd it out a out plugin

here is the plugin gamble

& that start need to go in the plugin
i dont how i have tryd it but i am not so pro in that...i only get Errors tongue.gif

wel it need to work like this
if i say: !gamble
OlyMotD: XElevenX, please place your bet: !bet [amount]. You have $20.

if i say: /me !gamble
OlyMotD: XElevenX, please place your bet: !bet [amount]. You have $20.

if i say: /W *OlyMotD !gamble
To XElevenX: XElevenX, please place your bet: !bet [amount]. You have $20.

& i found a but maby i can fix that 2
[13:59:15] <XElevenX> !gamble
[13:59:15] <OlyMotD> XElevenX, please place your bet: !bet [amount]. You have $20.
[13:59:27] <XElevenX> !bet 1000000
[13:59:27] <OlyMotD> XElevenX, you may now type !roll
[13:59:32] <XElevenX> !roll
[13:59:33] <OlyMotD> XElevenX rolled 2, 2, and 1.
[13:59:34] <OlyMotD> XElevenX has won $1000000! You now have $1000020!

pls help me out!
CODE
'gamble
'1.31
'&Gamble Script:raylu
'&gamble:bet <amount>:roll

'// Gamble Script v1.31
'//   by raylu

'// ver 1.31
'//   *Changed all myTrigger to BotVars.Trigger (Thanks spasm_attack)

Public gamble
Set gamble = CreateObject("Scripting.Dictionary")

Function money(player)
curItem = gamble.Item(player)
money = Split(curItem)(0)
End Function

Function bet(player)
bet = Split(gamble.Item(player))(1)
End Function

Sub Gamble_event_UserTalk(Username, Flags, Message, Ping)
If LCase(Message) = BotVars.Trigger & "gamble" Then
If Not gamble.Exists(Username) Then
gamble.Add Username, "20 betting"
Else
curitem = gamble.Item(Username)
gamble.Item(Username) = money(Username) & " betting"
End If
AddQ Username & ", please place your bet: " &BotVars.Trigger& "bet [amount]. You have $" & money(Username) & "."
End If
If Left(LCase(Message), 4) = BotVars.Trigger & "bet" Then
If Not gamble.Exists(Username) Then
AddQ Username & ", you must type " &BotVars.Trigger& "gamble first."
Else
betamt = Mid(Message, 6)
If betamt > 0 And money(Username) >= betamt Then
   gamble.Item(Username) = money(Username) & " " & betamt
   AddQ Username & ", you may now type " &BotVars.Trigger& "roll"
Else
   AddQ Username & ", that is an invalid bet!"
End If
End If
End If
If LCase(Message) = BotVars.Trigger & "roll" Then
If Not gamble.Exists(Username) Then
AddQ Username & ", you must type " &BotVars.Trigger& "gamble first."
Else
If bet(Username) = "betting" Then
AddQ Username & ", you must place your bet first."
Else
Randomize
Dim dice1, dice2, dice3
dice1 = Int(Rnd() * 6) + 1
dice2 = Int(Rnd() * 6) + 1
dice3 = Int(Rnd() * 6) + 1
AddQ Username & " rolled " & dice1 & ", " & dice2 & ", and " & dice3 &"."
If dice1 = dice2 Or dice2 = dice3 Or dice3 = dice1 Then
   newmoneyamt = CLng(money(Username)) + CLng(bet(Username))
   gamble.Item(Username) = newmoneyamt & " " & bet(Username)
   AddQ Username & " has won $" & bet(Username) & "! You now have $" & newmoneyamt & "!"
Else
   newmoneyamt = money(Username) - bet(Username)
   gamble.Item(Username) = newmoneyamt & " " & bet(Username)
   AddQ Username & " has lost $" & bet(Username) & ". You now have $" & newmoneyamt & "!"
   If newmoneyamt <= 0 Then
     gamble.Remove Username
     AddQ Username & " is broke! You must type " &BotVars.Trigger& "gamble to play again."
   ElseIf bet(Username) > newmoneyamt Then
     curitem = gamble.Item(Username)
     gamble.Item(Username) = Split(curitem)(0) & " betting"
     AddQ Username & ", your bet has been reset because you do not have enough money to back up your bet."
   End If
End If
End If
End If
End If
If Message = BotVars.Trigger & "money" Then
If Not gamble.Exists(Username) Then
Exit Sub
Else
curitem = gamble.Item(Username)
If Split(curitem)(1) = "betting" Then
   AddQ "/w " & Username & " You have $" & Split(curitem)(0) & "."
Else
   AddQ "/w " & Username & " You have $" & Split(curitem)(0) & " and are betting $" & Split(curitem)(1) & "."
End If
End If
End If
End Sub
Eleven
bump

can some 1 edit this plugin ?

Don't bump, especially not months old topics. -PhiX
Call
Try This

CODE
'ga
'0.1
'&Gamble Addon

sub ga_Event_UserEmote(Username, Flags, Message)
   call custom(Username, Flags, Message)
end sub

sub ga_Event_WhisperFromUser(Username, Flags, Message)
   call ga_custom(Username, Flags, Message)
end sub

sub ga_custom(Username, Flags, Message)
   if LCase(Message) = LCase(BotVars.Trigger) & "gamble" then
      call Gamble_event_UserTalk(Username, Flags, Message, 0)
   end if
end sub
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.