Bueno aca tienen otro global, no se si los que estan posteados andan o no, pero aca tienen otro mas para elegir Minimo nivel para que se pueda utilizar: 10
Tiene para silenciar a un usuario, etc.
Buscar:
y arriba poner:
Buscar:
y arriba poner:
Buscar:
y debajo poner:
buscar:
y debajo poner:
En el Sub PasarSegundo debajo de:
Poner:
En el sub LoadUserInit debajo de :
poner:
y por ultimo en el Sub SaveUser debajo de:
Poner:
Bueno, eso es todo. Si tienen alguna duda o encuentran algun problema con el codigo posteenla.
Atte. Tales
Tiene para silenciar a un usuario, etc.
Buscar:
Código:
If UCase$(Left$(rdata, 11)) = "/SILENCIAR " Then
y arriba poner:
Código:
' Tales Global
If UCase$(Left$(rdata, 10)) = "/NOGLOBAL " Then
rdata = Right$(rdata, Len(rdata) - 10)
Dim UserGlobal As String
Dim MinutosGlobal As Integer
UserGlobal = ReadField(1, rdata, Asc("@"))
MinutosGlobal = ReadField(2, rdata, Asc("@"))
If UserGlobal = "" Then Exit Sub
tIndex = NameIndex(UserGlobal)
If tIndex <= 0 Then
Call SendData(ToIndex, UserIndex, 0, "||Usuario offline." & FONTTYPE_INFO)
Exit Sub
End If
UserList(tIndex).flags.GPuede = 1
UserList(tIndex).flags.GMinutos = val(MinutosGlobal)
UserList(tIndex).flags.GMinutosP = val(MinutosGlobal)
UserList(tIndex).flags.GSegundos = 0
Call SendData(ToIndex, tIndex, 0, "|| Has sido silenciado. Durante: " & MinutosGlobal & " minutos, no podras utilizar el global." & FONTTYPE_INFO)
Call SendData(ToIndex, tIndex, 0, "|| Has silenciado al usuario." & FONTTYPE_INFO)
Exit Sub
End If
' Tales Global
Buscar:
Código:
If UCase$(Left$(rdata, 6)) = "/GMSG " And UserList(UserIndex).flags.Privilegios > 0 Then
Código:
' Tales Global
Select Case UCase$(Left$(rdata, 9))
Case "/CONSOLA "
rdata = Right$(rdata, Len(rdata) - 9)
' Si no es nivel 10 que no lo pueda usar
If UserList(UserIndex).Stats.ELV < 10 Then
Call SendData(ToIndex, UserIndex, 0, "|| Debes ser nivel 10 o superior para usar el global!!!." & FONTTYPE_INFO)
Exit Sub
End If
' Si no tiene el global activado le avisa
If UserList(UserIndex).flags.GGlobal = 0 Then
Call SendData(ToIndex, UserIndex, 0, "|| No tienes el global activado!!!, para activarlo escribe /GLOBAL" & FONTTYPE_INFO)
Exit Sub
End If
' Si los administradores le prohibieron el habla le avisa
If UserList(UserIndex).flags.GPuede = 1 Then
Call SendData(ToIndex, UserIndex, 0, "|| Por tu mal comportamiento, no podras volver a hablar en: " & UserList(UserIndex).flags.GMinutos & " minutos." & FONTTYPE_WARNING)
Exit Sub
End If
For i = 1 To LastUser
' Se lo enviamos solamente a los que tienen el global activado.
If UserList(UserIndex).flags.GGlobal = 0 Then Exit Sub
Call SendData(ToIndex, i, 0, "|| " & UserList(UserIndex).Name & " dice: " & rdata & FONTTYPE_GLOBAL)
Next i
Exit Sub
End Select
' Tales Global
Select Case UCase$(Left$(rdata, 7))
Case "/GLOBAL"
If UserList(USERINDEx).flags.GGlobal = 0 Then
Call SendData(ToIndex, UserIndex, 0, "|| Global Activado." & FONTTYPE_INFO)
UserList(USERINDEx).flags.GGlobal = 1
Else
Call SendData(ToIndex, UserIndex, 0, "|| Global desactivado." & FONTTYPE_INFO)
UserList(USERINDEx).flags.GGlobal = 0
End If
Exit Sub
End Select
Buscar:
Código:
Public Const FONTTYPE_GUILD = "~255~255~255~1~0"
Código:
' Tales Global
Public Const FONTTYPE_GLOBAL = "~255~154~38~1~0"
'Tales Global
Código:
Type UserFlags
Código:
' Tales Global
GGlobal As Byte
GPuede As Byte
GMinutos As Integer
GMinutosP As Integer
GSegundos As Integer
' Tales Global
En el Sub PasarSegundo debajo de:
Código:
For i = 1 To LastUser
Código:
' Tales Global
If UserList(i).flags.GPuede = 1 Then
UserList(i).flags.GSegundos = UserList(i).flags.GSegundos + 1
If UserList(i).flags.GSegundos >= 60 Then
UserList(i).flags.GMinutos = UserList(i).flags.GMinutos + 1
If UserList(i).flags.GMinutos >= UserList(i).flags.GMinutosP Then
UserList(i).flags.GMinutos = 0
UserList(i).flags.GSegundos = 0
UserList(i).flags.GPuede = 0
UserList(i).flags.GMinutosP = 0
Call SendData(ToIndex, i, 0, "|| Ya puedes usar el global nuevamente." & FONTTYPE_INFO)
End If
End If
End If
' Tales Global
En el sub LoadUserInit debajo de :
Código:
UserList(UserIndex).flags.Desnudo = val(GetVar(UserFile, "FLAGS", "Desnudo"))
Código:
' Tales Global
UserList(UserIndex).flags.GGlobal = val(GetVar(UserFile, "GLOBAL", "Activado"))
UserList(UserIndex).flags.GPuede = val(GetVar(UserFile, "GLOBAL", "PuedeUsar"))
UserList(UserIndex).flags.GMinutos = val(GetVar(UserFile, "GLOBAL", "MinutosPasados"))
UserList(UserIndex).flags.GMinutosP = val(GetVar(UserFile, "GLOBAL", "MinutosFaltantes"))
' Tales Global
y por ultimo en el Sub SaveUser debajo de:
Código:
Call WriteVar(UserFile, "GUILD", "GuildPts", str(UserList(UserIndex).GuildInfo.GuildPoints))
Código:
' Tales Global
Call WriteVar(UserFile, "GLOBAL", "Activado", UserList(UserIndex).flags.GGlobal)
Call WriteVar(UserFile, "GLOBAL", "PuedeUsar", UserList(UserIndex).flags.GPuede)
Call WriteVar(UserFile, "GLOBAL", "MinutosPasados", UserList(UserIndex).flags.GMinutos)
Call WriteVar(UserFile, "GLOBAL", "MinutosFaltantes", UserList(UserIndex).flags.GMinutosP)
' Tales Global
Bueno, eso es todo. Si tienen alguna duda o encuentran algun problema con el codigo posteenla.
Atte. Tales