Retroceder   UASU Foros > Desarrollo (Guias, tutoriales y ayuda) > Programación

Respuesta
 
Herramientas Desplegado
Antiguo 10-nov-2008, 17:41   #1 (permalink)
●Parra Fan
 
Avatar de Standelf
 
Ingreso: abril-2008
Ubicación: Atras tuyo
Edad: 15
Mensajes: 105
Puntos: 13.818, Nivel: 15 Puntos: 13.818, Nivel: 15 Puntos: 13.818, Nivel: 15
Nivel máximo: 16% Nivel máximo: 16% Nivel máximo: 16%
Actividad: 4% Actividad: 4% Actividad: 4%
El usuario posee 1x Acceso Vip
Poder: 109 Standelf is a splendid one to beholdStandelf is a splendid one to beholdStandelf is a splendid one to beholdStandelf is a splendid one to beholdStandelf is a splendid one to beholdStandelf is a splendid one to beholdStandelf is a splendid one to beholdStandelf is a splendid one to behold
Predeterminado [Aporte] Advertencias con Ban Automatico

Este sistema es simple, el gm advierte al PJ con el comando "/Advertir nick motivo" si el usuario llega a su maximo de advertencias se come ban :twisted: ajjaja

Codigo echo por mi para la version 0.11.5

Muy simple ^^

En el servidor buscamos:
Código:
Case "/ENCUESTA "
Arriva agregamos:

Código:
        'Standelf - Advertencias
        Case "/ADVERTIR "
        If UserList(UserIndex).flags.Privilegios = User Then Exit Sub
            Dim TotalAdvert As Integer
            rData = UCase$(Right$(rData, Len(rData) - 10))
            tStr = Replace$(ReadField(1, rData, 32), "+", " ") 'Nick
                tIndex = NameIndex(tStr)
                    Arg1 = ReadField(2, rData, 32)
                    
            TotalAdvert = val(GetVar(CharPath & tStr & ".chr", "Advertencias", "Number"))
            TotalAdvert = val(TotalAdvert) + 1
            Call WriteVar(CharPath & tStr & ".chr", "Advertencias", "Number", val(TotalAdvert))
 
            Call WriteVar(CharPath & tStr & ".chr", "Advertencias", "Adv" & TotalAdvert, Arg1)
            'Call WriteVar(CharPath & tStr & ".bwpj", "Advertencias", "Adv" & TotalAdvert, Arg1)
            
            'Notificamos A los usuarios Que el GM advirtio a un usuario
            Call SendData(SendTarget.ToAll, 0, 0, "||" & UserList(UserIndex).name & " advirtio a: " & tStr & FONTTYPE_ADVERTENCIAS)
 
 
            'Notificamos al usuarios que Fue Advertido, el motivo, quien lo advirtio y la cantidad de advertencias que tiene
             If tIndex <= 0 Then
                Call SendData(SendTarget.ToIndex, UserIndex, 0, "||El Personaje esta Offline." & FONTTYPE_ADVERTENCIAS)
                Exit Sub
            Else
                Call SendData(SendTarget.ToIndex, tIndex, 0, "||Has sido Advertido por: " & UserList(UserIndex).name & ". El Motivo de la Advertencias es: " & Arg1 & " .Con esta llevas " & TotalAdvert & FONTTYPE_ADVERTENCIAS)
            End If
            
            'Si llego al Maximo de Advertencias?
            If val(TotalAdvert) >= 5 Then
                Call SendData(SendTarget.ToAdmins, 0, 0, "||Servidor> " & tStr & " ha sido Baneado Automaticamente por llegar a su Maximo de advertencias." & FONTTYPE_ADVERTENCIAS)
                    tInt = val(GetVar(CharPath & tStr & ".chr", "PENAS", "Cant"))
                    Call WriteVar(CharPath & tStr & ".chr", "PENAS", "Cant", tInt + 1)
                    Call WriteVar(CharPath & tStr & ".chr", "PENAS", "P" & tInt + 1, "El Servidor te ha Baneado Automaticamente. El Motivo es: Acumulacion de Advertencias. " & Date & " " & Time)
                    
                'Desconectamos al usuario
                If Not tIndex <= 0 Then Call CloseSocket(tIndex)
                
                'Baneamos ^^
                Call WriteVar(CharPath & tStr & ".chr", "FLAGS", "Ban", "1")
            End If
            
            Exit Sub
Nota> donde dice: "If val(TotalAdvert) >= 5" Then pueden cambiar el 5 por el maximo de advertencias antes de ban

Buscamos:
Código:
Public Const FONTTYPE_CENTINELA As String = "~0~255~0~1~0"
Abajo agregamos:
Código:
Public Const FONTTYPE_ADVERTENCIAS As String = "~128~0~0~1~1"
Cambien "~128~0~0~1~1", por los colores a su gusto, en ese saldria algo asi: Standelf Advirtio a Standelf por que tenia ganas

Bueno listo espero que les sirva ^^
__________________

[Solo Miembros registrados ven los enlaces. ]

Última edición por Standelf; 10-nov-2008 a las 22:15.
Standelf está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Responder Citando
Estos 4 Usuarios han agradecido a Standelf Por este util Tema:
agush (10-dic-2008), Alkan (11-nov-2008), Luque (10-nov-2008), MapacheSurge (11-nov-2008)
Sponsored Links
Antiguo 10-nov-2008, 20:44   #2 (permalink)
¿Todos me odian?
 
Avatar de Alkan
 
Ingreso: mayo-2008
Ubicación: En un lugar que nunca conocerás
Edad: 15
Mensajes: 309
Puntos: 19.200, Nivel: 18 Puntos: 19.200, Nivel: 18 Puntos: 19.200, Nivel: 18
Nivel máximo: 94% Nivel máximo: 94% Nivel máximo: 94%
Actividad: 12% Actividad: 12% Actividad: 12%
El usuario posee 1x Acceso Vip
Poder: 167 Alkan tiene mucho para estar orgullosoAlkan tiene mucho para estar orgullosoAlkan tiene mucho para estar orgullosoAlkan tiene mucho para estar orgullosoAlkan tiene mucho para estar orgullosoAlkan tiene mucho para estar orgullosoAlkan tiene mucho para estar orgullosoAlkan tiene mucho para estar orgullosoAlkan tiene mucho para estar orgulloso
Predeterminado

Muy lindo, ya lo implemente, a probarlo, una pregunta, es /advertir NICK@MOTIVO?

O /advertir NICK MOTIVO
__________________

Alkan está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Responder Citando
Antiguo 10-nov-2008, 22:16   #3 (permalink)
●Parra Fan
 
Avatar de Standelf
 
Ingreso: abril-2008
Ubicación: Atras tuyo
Edad: 15
Mensajes: 105
Puntos: 13.818, Nivel: 15 Puntos: 13.818, Nivel: 15 Puntos: 13.818, Nivel: 15
Nivel máximo: 16% Nivel máximo: 16% Nivel máximo: 16%
Actividad: 4% Actividad: 4% Actividad: 4%
El usuario posee 1x Acceso Vip
Poder: 109 Standelf is a splendid one to beholdStandelf is a splendid one to beholdStandelf is a splendid one to beholdStandelf is a splendid one to beholdStandelf is a splendid one to beholdStandelf is a splendid one to beholdStandelf is a splendid one to beholdStandelf is a splendid one to behold
Predeterminado

Cita:
Iniciado por Alkan Ver Mensaje
Muy lindo, ya lo implemente, a probarlo, una pregunta, es /advertir NICK@MOTIVO?

O /advertir NICK MOTIVO
Es /Advertir nick motivo

Si el nick tiene espacios lo poenen con +

Ejemeplo

/Arvertir el+mago fumar faso en as instalaciones
__________________

[Solo Miembros registrados ven los enlaces. ]
Standelf está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Responder Citando
Antiguo 10-nov-2008, 22:19   #4 (permalink)
FORERO UASU
 
Avatar de Luque
 
Ingreso: agosto-2008
Ubicación: desde casa
Mensajes: 357
Puntos: 29.070, Nivel: 25 Puntos: 29.070, Nivel: 25 Puntos: 29.070, Nivel: 25
Nivel máximo: 11% Nivel máximo: 11% Nivel máximo: 11%
Actividad: 14% Actividad: 14% Actividad: 14%
Poder: 252 Luque tiene una reputación que sobrepasa la famaLuque tiene una reputación que sobrepasa la famaLuque tiene una reputación que sobrepasa la famaLuque tiene una reputación que sobrepasa la famaLuque tiene una reputación que sobrepasa la famaLuque tiene una reputación que sobrepasa la famaLuque tiene una reputación que sobrepasa la famaLuque tiene una reputación que sobrepasa la famaLuque tiene una reputación que sobrepasa la famaLuque tiene una reputación que sobrepasa la famaLuque tiene una reputación que sobrepasa la fama
Predeterminado

muy buen aporte te tiro un gracias.
Realmente por la edad que tenes sos un genio
__________________
Luque está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Responder Citando
Antiguo 11-nov-2008, 00:57   #5 (permalink)
FORERO UASU
 
Avatar de MapacheSurge
 
Ingreso: noviembre-2007
Mensajes: 1.541
Puntos: 10.785, Nivel: 12 Puntos: 10.785, Nivel: 12 Puntos: 10.785, Nivel: 12
Nivel máximo: 83% Nivel máximo: 83% Nivel máximo: 83%
Actividad: 29% Actividad: 29% Actividad: 29%
El usuario posee 1x Acceso Vip El usuario posee 1x Acceso a la Zona VIP El usuario posee 1x Correo UasuForos
Poder: 241 MapacheSurge is a splendid one to beholdMapacheSurge is a splendid one to beholdMapacheSurge is a splendid one to beholdMapacheSurge is a splendid one to beholdMapacheSurge is a splendid one to beholdMapacheSurge is a splendid one to beholdMapacheSurge is a splendid one to behold
Predeterminado

Es un ban permantente no?
Y no quedaria mejor si les dice al usuario por que
Cita:
'Notificamos A los usuarios Que el GM advirtio a un usuario
Call SendData(SendTarget.ToAll, 0, 0, "||" & UserList(UserIndex).name & " advirtio a: " & tStr & FONTTYPE_ADVERTENCIAS)
Saludos! y un gracias aunque no tengo ao
MapacheSurge está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Responder Citando
Sponsored links
Antiguo 11-nov-2008, 01:08   #6 (permalink)
Fernán !
UasuMood 
 
Avatar de Fernan!
 
Ingreso: septiembre-2008
Ubicación: en la compu ^^
Edad: 13
Mensajes: 499
Puntos: 12.945, Nivel: 14 Puntos: 12.945, Nivel: 14 Puntos: 12.945, Nivel: 14
Nivel máximo: 50% Nivel máximo: 50% Nivel máximo: 50%
Actividad: 19% Actividad: 19% Actividad: 19%
El usuario posee 1x Acceso Vip
Poder: 110 Fernan! Es un nombre conocido por todosFernan! Es un nombre conocido por todosFernan! Es un nombre conocido por todosFernan! Es un nombre conocido por todosFernan! Es un nombre conocido por todosFernan! Es un nombre conocido por todos
Predeterminado

Muy bueno!

Saludos
__________________

Fernan! está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Responder Citando
Antiguo 11-nov-2008, 13:50   #7 (permalink)
Calor para encender.
Moderador de Foro
 
Avatar de Lobby
 
Ingreso: julio-2008
Ubicación: Mi caja musical
Edad: 16
Mensajes: 1.789
Puntos: 32.770, Nivel: 27 Puntos: 32.770, Nivel: 27 Puntos: 32.770, Nivel: 27
Nivel máximo: 34% Nivel máximo: 34% Nivel máximo: 34%
Actividad: 74% Actividad: 74% Actividad: 74%
El usuario posee 1x Acceso Vip
Poder: 403 Lobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la famaLobby tiene una reputación que sobrepasa la fama
Predeterminado

Cita:
Iniciado por MapacheSurge Ver Mensaje
Es un ban permantente no?
Y no quedaria mejor si les dice al usuario por que

Saludos! y un gracias aunque no tengo ao
Les dice a todos y aparte le aclara también al usuario advertido.
__________________
"Si no te veo con una foto de Mussolini voy a tu casa y te pego hasta hacerte jabon." - Alric

[Solo Miembros registrados ven los enlaces. ]
Estamos reclutando maestros! =)

[Solo Miembros registrados ven los enlaces. ]
Lobby está desconectado  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Responder Citando
Respuesta

Marcadores

Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
caritas están Activado
[IMG] está Activado
Código HTML está Desactivado
Trackbacks are Desactivado
Pingbacks are Desactivado
Refbacks are Desactivado
Ir al Foro

Te recomendamos visitar estos sitios

PasionChat  Blogs  UASU lite  El Foro Latino  Argentum Online  Host Gratis  Bazar de dominios


La franja horaria es GMT -5. Ahora son las 16:08.



Desarrollado por: vBulletin® Versión 3.7.5
Derechos de Autor ©2000 - 2009, Jelsoft Enterprises Ltd.
Traducido por mcloud
Copyright UASU Group - Azmum Multimedios 2002-2008Ad Management by RedTyger
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.