Jump to content

Inside

Miembro
  • Contador contenido

    11
  • Ingreso

  • Última visita

Actividad de reputación

  1. Me Gusta
    Inside got a reaction from Anthony's in [Guía para sacar comando shutdown]   
    Buenas,
     
    Para quitar el comando de shutdown, sólo sigan estos pasos.
     
    -Entrar a FTP -  Van a CHANNEL1, verán un archivo llamado CMD - Le dan editar - Van a la última linea - Y ponen shutdown DISABLE
     
    Y hacen lo mismo con los otros channel's, y game99.
     
    Eso a sido todo, espero que les haya servido.
     
    Saludos.
  2. Me Gusta
    Inside got a reaction from couggetuemync in Quest Reload's desde un ítem o NPC.   
    Buenas foreros, les traigo esta quest para que hagan reload's desde ítemso NPC's, quest reloader begin
    state start begin
    when 40003.use begin
    say_title ( "Bienvenido" )
    say ( "este es el Item De los reloads," )
    say ( "Que Reload deseas hacer?" )
    say ( "Recuerda esto hace cada uno" )
    say ( "Reload A, La lista de administradores se vuelve a cargar" )
    say ( "Reload P, Todas las listas _proto se vuelven a cargar, item_proto, mob_proto, exe.)
    say ( "Reload Q, con Filezilla añade misiones, NPC, exe. " )
    say ( "Reload U, Este Sirve por si has baneado a alguien i quieres que el ban se active inmediatamente" )
    local main_set = select ( "Reload a" , "Reload p" , "Reload q" , "Reload u" , "Cancelar" )
    if main_set_1 == then
    command("reload a")
    if main_set_2 == then
    command("reload p")
    if main_set_3 == then
    command("reload q")
    if main_set_4 == then
    command("reload u")
    if main_set_5 == then
    end
    end
     
     
     
     
    Lo de arriba, lo copian y lo guardan en un Bloc de notas, después dan a "Guardar Como" Dónde dice Tipo de archivo: quitan el de texto y ponen "Todos Los archivos" y le ponen de Nombre reloader.quest RECUERDA EL .QUEST es la extencion del archivo no un derivado del nombre
    Ahora van al filezilla ala siguiente url: /usr/rain/channel/share_data/locale/hongkong/quest/ y ahi meten la quest, aora en ese mismo directorio busca el hongkong_list lo abren y añaden una linea con el nombre de la quest guardan y reboot..
     
    Si te ha servido no cuesta agradecer.
  3. Me Gusta
    Inside got a reaction from LORDCarlo™ in Quest Reload's desde un ítem o NPC.   
    Buenas foreros, les traigo esta quest para que hagan reload's desde ítemso NPC's, quest reloader begin
    state start begin
    when 40003.use begin
    say_title ( "Bienvenido" )
    say ( "este es el Item De los reloads," )
    say ( "Que Reload deseas hacer?" )
    say ( "Recuerda esto hace cada uno" )
    say ( "Reload A, La lista de administradores se vuelve a cargar" )
    say ( "Reload P, Todas las listas _proto se vuelven a cargar, item_proto, mob_proto, exe.)
    say ( "Reload Q, con Filezilla añade misiones, NPC, exe. " )
    say ( "Reload U, Este Sirve por si has baneado a alguien i quieres que el ban se active inmediatamente" )
    local main_set = select ( "Reload a" , "Reload p" , "Reload q" , "Reload u" , "Cancelar" )
    if main_set_1 == then
    command("reload a")
    if main_set_2 == then
    command("reload p")
    if main_set_3 == then
    command("reload q")
    if main_set_4 == then
    command("reload u")
    if main_set_5 == then
    end
    end
     
     
     
     
    Lo de arriba, lo copian y lo guardan en un Bloc de notas, después dan a "Guardar Como" Dónde dice Tipo de archivo: quitan el de texto y ponen "Todos Los archivos" y le ponen de Nombre reloader.quest RECUERDA EL .QUEST es la extencion del archivo no un derivado del nombre
    Ahora van al filezilla ala siguiente url: /usr/rain/channel/share_data/locale/hongkong/quest/ y ahi meten la quest, aora en ese mismo directorio busca el hongkong_list lo abren y añaden una linea con el nombre de la quest guardan y reboot..
     
    Si te ha servido no cuesta agradecer.
  4. Me Gusta
    Inside got a reaction from fuuton97 in Script de detección cuentas editadas.   
    Bien pues para ir dandole un poco de movilidad, les paso esta script desarrollada 100% cuya finalidad es detectar objetos editados y autobanear la cuenta que los contenga.
     
    Primero un par de definiciones, entiendase por "Objeto editado" un item que tenga MAS del maximo de cualquier bono... ejemplo, si en tu server tienes configurado como maxhp 2000 y hay algun item que tenga de max hp 2001 automaticamente se baneara.
     
    Requerimientos:
    Acceso a Cron Jobs Acceso a Linea de comandos Servidor Mail configurado (opcional) El Script: 
    #!/bin/bash
    #DATOS MYSQL
    FECHA=$(date)
    DBUSER=root
    DBPASS=MICONTRASEÑA
    TABLA=account
    DBASE=account
    #BONOS 1 AL 5
    BONOS15='
    MAX_HP-1
    MAX_SP-2
    CON-3
    INT-4
    STR-5
    DEX-6
    ATT_SPEED-7
    MOV_SPEED-8
    CAST_SPEED-9
    HP_REGEN-10
    SP_REGEN-11
    POISON_PCT-12
    STUN_PCT-13
    SLOW_PCT-14
    CRITICAL_PCT-15
    PENETRATE_PCT-16
    ATTBONUS_HUMAN-17
    ATTBONUS_ANIMAL-18
    ATTBONUS_ORC-19
    ATTBONUS_MILGYO-20
    ATTBONUS_UNDEAD-21
    ATTBONUS_DEVIL-22
    STEAL_HP-23
    STEAL_SP-24
    MANA_BURN_PCT-25
    BLOCK-27
    DODGE-28
    RESIST_SWORD-29
    RESIST_TWOHAND-30
    RESIST_DAGGER-31
    RESIST_BELL-32
    RESIST_FAN-33
    RESIST_BOW-34
    RESIST_FIRE-35
    RESIST_ELEC-36
    RESIST_MAGIC-37
    RESIST_WIND-38
    REFLECT_MELEE-39
    POISON_REDUCE-41
    EXP_DOUBLE_BONUS-43
    GOLD_DOUBLE_BONUS-44
    ITEM_DROP_BONUS-45
    IMMUNE_STUN-48
    IMMUNE_SLOW-49
    ATT_GRADE_BONUS-53
    ATT_BONUS_TO_WARRIOR-59
    ATT_BONUS_TO_ASSASSIN-60
    ATT_BONUS_TO_SURA-61
    ATT_BONUS_TO_SHAMAN-62
    RESIST_WARRIOR-78
    RESIST_ASSASSIN-79
    RESIST_SURA-80
    RESIST_SHAMAN-81
    '
    #BONOS 6 Y 7
    BONOS67='
    MAX_HP-1
    MAX_SP-2
    CON-3
    INT-4
    STR-5
    DEX-6
    CRITICAL_PCT-15
    PENETRATE_PCT-16
    ATT_GRADE_BONUS-53
    ATT_BONUS_TO_MONSTER-63
    ATT_BONUS_TO_WARRIOR-59
    ATT_BONUS_TO_ASSASSIN-60
    ATT_BONUS_TO_SURA-61
    ATT_BONUS_TO_SHAMAN-62
    RESIST_WARRIOR-78
    RESIST_ASSASSIN-79
    RESIST_SURA-80
    RESIST_SHAMAN-81
    ATT_SPEED-7
    MOV_SPEED-8
    '
    #CONSULTA BONOS 1 AL 5
    for i in $BONOS15; do
    line=$i
    NOMBRE=${line%-*}
    VALUE=${line#*-}
    #echo $NOMBRE
    #echo $VALUE
    MAX=`echo "SELECT player.item_attr.lv5 FROM player.item_attr WHERE apply='$NOMBRE' ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    for valmax in $MAX ;
    do
    #echo $valmax
    RES=`echo "SELECT player.player.account_id FROM player.item, player.player WHERE ((attrtype0=$VALUE and attrvalue0 > $valmax) OR (attrtype1=$VALUE and attrvalue1 > $valmax) OR (attrtype2=$VALUE and attrvalue2 > $valmax) OR (attrtype3=$VALUE and attrvalue3 > $valmax) OR (attrtype4=$VALUE and attrvalue4 > $valmax) OR (attrtype5=$VALUE and attrvalue5 > $valmax) OR (attrtype6=$VALUE and attrvalue6 > $valmax)) and ((player.item.owner_id = player.player.id) or (player.item.owner_id = player.player.account_id)) ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    for data in $RES ;
    do
    #aki bannear a la banda o hacer el informe
    BANEO=`echo "UPDATE account SET status='AUTOBAN' WHERE id='$data' ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    echo $FECHA account: $data bono: $NOMBRE valor maximo: $valmax
    done
    done
    done
    #CONSULTA BONOS 6 Y 7
    for i in $BONOS67; do
    line=$i
    NOMBRE=${line%-*}
    VALUE=${line#*-}
    #echo $NOMBRE
    #echo $VALUE
    MAX=`echo "SELECT player.item_attr_rare.lv5 FROM player.item_attr_rare WHERE apply='$NOMBRE' ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    for valmax in $MAX ;
    do
    #echo $valmax
    RES=`echo "SELECT player.player.account_id FROM player.item, player.player WHERE ((attrtype0=$VALUE and attrvalue0 > $valmax) OR (attrtype1=$VALUE and attrvalue1 > $valmax) OR (attrtype2=$VALUE and attrvalue2 > $valmax) OR (attrtype3=$VALUE and attrvalue3 > $valmax) OR (attrtype4=$VALUE and attrvalue4 > $valmax) OR (attrtype5=$VALUE and attrvalue5 > $valmax) OR (attrtype6=$VALUE and attrvalue6 > $valmax)) and ((player.item.owner_id = player.player.id) or (player.item.owner_id = player.player.account_id)) ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    for data in $RES ;
    do
    #aki bannear a la banda o hacer el informe
    BANEO=`echo "UPDATE account SET status='AUTOBAN' WHERE id='$data' ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    echo $FECHA account: $data bono: $NOMBRE valor maximo: $valmax
    done
    done
    done
    #mail -s "Informe Baneo Automatico" "[email protected]" < RES.TXT
     
     
    Instalacion:
     
    1.- Copiar el texto a un archivo de notepad y guardarlo con el nombre que quieran y extension .sh por ejemplo autobaneo.sh
     
    2.- Al inicio del codigo se definen las variables con los datos del mysql, cambiar los datos segun como los tengan en su server.
     
    3.- al final del script esta comentada (#) la linea de correo, esta linea es por si queremos enviarnos el "log" via correo electronico, si tienes el server mail de tu freebsd configurado y fincionando puedes descomentarla y porsupuesto cambiar el correo por el tuyo, si no dejala asi.
     
    4.- una vez hecho todo esto, subir el archivo fia filezilla o winscp a tu servidor, no te olvides anotar la ruta, por comodidad lo ideal seria subirlo a la carpeta de los files, por ejemplo /usr/home/game una vez subido anota la ruta.
     
    5.- ejecutar el siguiente comando para establecer los permisos del script:
    chmod u+x /ruta/del/script.sh
     
    Si nuestra ruta al script es /usr/home/game y nuestro script se llama autoban.sh el comando seria asi:
    chmod u+x /usr/home/game/autoban.sh
     
    Agradecer no cuesta.
     
    Saludos!
  5. Me Gusta
    Inside got a reaction from Kibya in Script de detección cuentas editadas.   
    Bien pues para ir dandole un poco de movilidad, les paso esta script desarrollada 100% cuya finalidad es detectar objetos editados y autobanear la cuenta que los contenga.
     
    Primero un par de definiciones, entiendase por "Objeto editado" un item que tenga MAS del maximo de cualquier bono... ejemplo, si en tu server tienes configurado como maxhp 2000 y hay algun item que tenga de max hp 2001 automaticamente se baneara.
     
    Requerimientos:
    Acceso a Cron Jobs Acceso a Linea de comandos Servidor Mail configurado (opcional) El Script: 
    #!/bin/bash
    #DATOS MYSQL
    FECHA=$(date)
    DBUSER=root
    DBPASS=MICONTRASEÑA
    TABLA=account
    DBASE=account
    #BONOS 1 AL 5
    BONOS15='
    MAX_HP-1
    MAX_SP-2
    CON-3
    INT-4
    STR-5
    DEX-6
    ATT_SPEED-7
    MOV_SPEED-8
    CAST_SPEED-9
    HP_REGEN-10
    SP_REGEN-11
    POISON_PCT-12
    STUN_PCT-13
    SLOW_PCT-14
    CRITICAL_PCT-15
    PENETRATE_PCT-16
    ATTBONUS_HUMAN-17
    ATTBONUS_ANIMAL-18
    ATTBONUS_ORC-19
    ATTBONUS_MILGYO-20
    ATTBONUS_UNDEAD-21
    ATTBONUS_DEVIL-22
    STEAL_HP-23
    STEAL_SP-24
    MANA_BURN_PCT-25
    BLOCK-27
    DODGE-28
    RESIST_SWORD-29
    RESIST_TWOHAND-30
    RESIST_DAGGER-31
    RESIST_BELL-32
    RESIST_FAN-33
    RESIST_BOW-34
    RESIST_FIRE-35
    RESIST_ELEC-36
    RESIST_MAGIC-37
    RESIST_WIND-38
    REFLECT_MELEE-39
    POISON_REDUCE-41
    EXP_DOUBLE_BONUS-43
    GOLD_DOUBLE_BONUS-44
    ITEM_DROP_BONUS-45
    IMMUNE_STUN-48
    IMMUNE_SLOW-49
    ATT_GRADE_BONUS-53
    ATT_BONUS_TO_WARRIOR-59
    ATT_BONUS_TO_ASSASSIN-60
    ATT_BONUS_TO_SURA-61
    ATT_BONUS_TO_SHAMAN-62
    RESIST_WARRIOR-78
    RESIST_ASSASSIN-79
    RESIST_SURA-80
    RESIST_SHAMAN-81
    '
    #BONOS 6 Y 7
    BONOS67='
    MAX_HP-1
    MAX_SP-2
    CON-3
    INT-4
    STR-5
    DEX-6
    CRITICAL_PCT-15
    PENETRATE_PCT-16
    ATT_GRADE_BONUS-53
    ATT_BONUS_TO_MONSTER-63
    ATT_BONUS_TO_WARRIOR-59
    ATT_BONUS_TO_ASSASSIN-60
    ATT_BONUS_TO_SURA-61
    ATT_BONUS_TO_SHAMAN-62
    RESIST_WARRIOR-78
    RESIST_ASSASSIN-79
    RESIST_SURA-80
    RESIST_SHAMAN-81
    ATT_SPEED-7
    MOV_SPEED-8
    '
    #CONSULTA BONOS 1 AL 5
    for i in $BONOS15; do
    line=$i
    NOMBRE=${line%-*}
    VALUE=${line#*-}
    #echo $NOMBRE
    #echo $VALUE
    MAX=`echo "SELECT player.item_attr.lv5 FROM player.item_attr WHERE apply='$NOMBRE' ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    for valmax in $MAX ;
    do
    #echo $valmax
    RES=`echo "SELECT player.player.account_id FROM player.item, player.player WHERE ((attrtype0=$VALUE and attrvalue0 > $valmax) OR (attrtype1=$VALUE and attrvalue1 > $valmax) OR (attrtype2=$VALUE and attrvalue2 > $valmax) OR (attrtype3=$VALUE and attrvalue3 > $valmax) OR (attrtype4=$VALUE and attrvalue4 > $valmax) OR (attrtype5=$VALUE and attrvalue5 > $valmax) OR (attrtype6=$VALUE and attrvalue6 > $valmax)) and ((player.item.owner_id = player.player.id) or (player.item.owner_id = player.player.account_id)) ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    for data in $RES ;
    do
    #aki bannear a la banda o hacer el informe
    BANEO=`echo "UPDATE account SET status='AUTOBAN' WHERE id='$data' ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    echo $FECHA account: $data bono: $NOMBRE valor maximo: $valmax
    done
    done
    done
    #CONSULTA BONOS 6 Y 7
    for i in $BONOS67; do
    line=$i
    NOMBRE=${line%-*}
    VALUE=${line#*-}
    #echo $NOMBRE
    #echo $VALUE
    MAX=`echo "SELECT player.item_attr_rare.lv5 FROM player.item_attr_rare WHERE apply='$NOMBRE' ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    for valmax in $MAX ;
    do
    #echo $valmax
    RES=`echo "SELECT player.player.account_id FROM player.item, player.player WHERE ((attrtype0=$VALUE and attrvalue0 > $valmax) OR (attrtype1=$VALUE and attrvalue1 > $valmax) OR (attrtype2=$VALUE and attrvalue2 > $valmax) OR (attrtype3=$VALUE and attrvalue3 > $valmax) OR (attrtype4=$VALUE and attrvalue4 > $valmax) OR (attrtype5=$VALUE and attrvalue5 > $valmax) OR (attrtype6=$VALUE and attrvalue6 > $valmax)) and ((player.item.owner_id = player.player.id) or (player.item.owner_id = player.player.account_id)) ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    for data in $RES ;
    do
    #aki bannear a la banda o hacer el informe
    BANEO=`echo "UPDATE account SET status='AUTOBAN' WHERE id='$data' ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    echo $FECHA account: $data bono: $NOMBRE valor maximo: $valmax
    done
    done
    done
    #mail -s "Informe Baneo Automatico" "[email protected]" < RES.TXT
     
     
    Instalacion:
     
    1.- Copiar el texto a un archivo de notepad y guardarlo con el nombre que quieran y extension .sh por ejemplo autobaneo.sh
     
    2.- Al inicio del codigo se definen las variables con los datos del mysql, cambiar los datos segun como los tengan en su server.
     
    3.- al final del script esta comentada (#) la linea de correo, esta linea es por si queremos enviarnos el "log" via correo electronico, si tienes el server mail de tu freebsd configurado y fincionando puedes descomentarla y porsupuesto cambiar el correo por el tuyo, si no dejala asi.
     
    4.- una vez hecho todo esto, subir el archivo fia filezilla o winscp a tu servidor, no te olvides anotar la ruta, por comodidad lo ideal seria subirlo a la carpeta de los files, por ejemplo /usr/home/game una vez subido anota la ruta.
     
    5.- ejecutar el siguiente comando para establecer los permisos del script:
    chmod u+x /ruta/del/script.sh
     
    Si nuestra ruta al script es /usr/home/game y nuestro script se llama autoban.sh el comando seria asi:
    chmod u+x /usr/home/game/autoban.sh
     
    Agradecer no cuesta.
     
    Saludos!
  6. Me Gusta
    Inside got a reaction from SeMa™ in Script de detección cuentas editadas.   
    Bien pues para ir dandole un poco de movilidad, les paso esta script desarrollada 100% cuya finalidad es detectar objetos editados y autobanear la cuenta que los contenga.
     
    Primero un par de definiciones, entiendase por "Objeto editado" un item que tenga MAS del maximo de cualquier bono... ejemplo, si en tu server tienes configurado como maxhp 2000 y hay algun item que tenga de max hp 2001 automaticamente se baneara.
     
    Requerimientos:
    Acceso a Cron Jobs Acceso a Linea de comandos Servidor Mail configurado (opcional) El Script: 
    #!/bin/bash
    #DATOS MYSQL
    FECHA=$(date)
    DBUSER=root
    DBPASS=MICONTRASEÑA
    TABLA=account
    DBASE=account
    #BONOS 1 AL 5
    BONOS15='
    MAX_HP-1
    MAX_SP-2
    CON-3
    INT-4
    STR-5
    DEX-6
    ATT_SPEED-7
    MOV_SPEED-8
    CAST_SPEED-9
    HP_REGEN-10
    SP_REGEN-11
    POISON_PCT-12
    STUN_PCT-13
    SLOW_PCT-14
    CRITICAL_PCT-15
    PENETRATE_PCT-16
    ATTBONUS_HUMAN-17
    ATTBONUS_ANIMAL-18
    ATTBONUS_ORC-19
    ATTBONUS_MILGYO-20
    ATTBONUS_UNDEAD-21
    ATTBONUS_DEVIL-22
    STEAL_HP-23
    STEAL_SP-24
    MANA_BURN_PCT-25
    BLOCK-27
    DODGE-28
    RESIST_SWORD-29
    RESIST_TWOHAND-30
    RESIST_DAGGER-31
    RESIST_BELL-32
    RESIST_FAN-33
    RESIST_BOW-34
    RESIST_FIRE-35
    RESIST_ELEC-36
    RESIST_MAGIC-37
    RESIST_WIND-38
    REFLECT_MELEE-39
    POISON_REDUCE-41
    EXP_DOUBLE_BONUS-43
    GOLD_DOUBLE_BONUS-44
    ITEM_DROP_BONUS-45
    IMMUNE_STUN-48
    IMMUNE_SLOW-49
    ATT_GRADE_BONUS-53
    ATT_BONUS_TO_WARRIOR-59
    ATT_BONUS_TO_ASSASSIN-60
    ATT_BONUS_TO_SURA-61
    ATT_BONUS_TO_SHAMAN-62
    RESIST_WARRIOR-78
    RESIST_ASSASSIN-79
    RESIST_SURA-80
    RESIST_SHAMAN-81
    '
    #BONOS 6 Y 7
    BONOS67='
    MAX_HP-1
    MAX_SP-2
    CON-3
    INT-4
    STR-5
    DEX-6
    CRITICAL_PCT-15
    PENETRATE_PCT-16
    ATT_GRADE_BONUS-53
    ATT_BONUS_TO_MONSTER-63
    ATT_BONUS_TO_WARRIOR-59
    ATT_BONUS_TO_ASSASSIN-60
    ATT_BONUS_TO_SURA-61
    ATT_BONUS_TO_SHAMAN-62
    RESIST_WARRIOR-78
    RESIST_ASSASSIN-79
    RESIST_SURA-80
    RESIST_SHAMAN-81
    ATT_SPEED-7
    MOV_SPEED-8
    '
    #CONSULTA BONOS 1 AL 5
    for i in $BONOS15; do
    line=$i
    NOMBRE=${line%-*}
    VALUE=${line#*-}
    #echo $NOMBRE
    #echo $VALUE
    MAX=`echo "SELECT player.item_attr.lv5 FROM player.item_attr WHERE apply='$NOMBRE' ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    for valmax in $MAX ;
    do
    #echo $valmax
    RES=`echo "SELECT player.player.account_id FROM player.item, player.player WHERE ((attrtype0=$VALUE and attrvalue0 > $valmax) OR (attrtype1=$VALUE and attrvalue1 > $valmax) OR (attrtype2=$VALUE and attrvalue2 > $valmax) OR (attrtype3=$VALUE and attrvalue3 > $valmax) OR (attrtype4=$VALUE and attrvalue4 > $valmax) OR (attrtype5=$VALUE and attrvalue5 > $valmax) OR (attrtype6=$VALUE and attrvalue6 > $valmax)) and ((player.item.owner_id = player.player.id) or (player.item.owner_id = player.player.account_id)) ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    for data in $RES ;
    do
    #aki bannear a la banda o hacer el informe
    BANEO=`echo "UPDATE account SET status='AUTOBAN' WHERE id='$data' ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    echo $FECHA account: $data bono: $NOMBRE valor maximo: $valmax
    done
    done
    done
    #CONSULTA BONOS 6 Y 7
    for i in $BONOS67; do
    line=$i
    NOMBRE=${line%-*}
    VALUE=${line#*-}
    #echo $NOMBRE
    #echo $VALUE
    MAX=`echo "SELECT player.item_attr_rare.lv5 FROM player.item_attr_rare WHERE apply='$NOMBRE' ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    for valmax in $MAX ;
    do
    #echo $valmax
    RES=`echo "SELECT player.player.account_id FROM player.item, player.player WHERE ((attrtype0=$VALUE and attrvalue0 > $valmax) OR (attrtype1=$VALUE and attrvalue1 > $valmax) OR (attrtype2=$VALUE and attrvalue2 > $valmax) OR (attrtype3=$VALUE and attrvalue3 > $valmax) OR (attrtype4=$VALUE and attrvalue4 > $valmax) OR (attrtype5=$VALUE and attrvalue5 > $valmax) OR (attrtype6=$VALUE and attrvalue6 > $valmax)) and ((player.item.owner_id = player.player.id) or (player.item.owner_id = player.player.account_id)) ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    for data in $RES ;
    do
    #aki bannear a la banda o hacer el informe
    BANEO=`echo "UPDATE account SET status='AUTOBAN' WHERE id='$data' ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    echo $FECHA account: $data bono: $NOMBRE valor maximo: $valmax
    done
    done
    done
    #mail -s "Informe Baneo Automatico" "[email protected]" < RES.TXT
     
     
    Instalacion:
     
    1.- Copiar el texto a un archivo de notepad y guardarlo con el nombre que quieran y extension .sh por ejemplo autobaneo.sh
     
    2.- Al inicio del codigo se definen las variables con los datos del mysql, cambiar los datos segun como los tengan en su server.
     
    3.- al final del script esta comentada (#) la linea de correo, esta linea es por si queremos enviarnos el "log" via correo electronico, si tienes el server mail de tu freebsd configurado y fincionando puedes descomentarla y porsupuesto cambiar el correo por el tuyo, si no dejala asi.
     
    4.- una vez hecho todo esto, subir el archivo fia filezilla o winscp a tu servidor, no te olvides anotar la ruta, por comodidad lo ideal seria subirlo a la carpeta de los files, por ejemplo /usr/home/game una vez subido anota la ruta.
     
    5.- ejecutar el siguiente comando para establecer los permisos del script:
    chmod u+x /ruta/del/script.sh
     
    Si nuestra ruta al script es /usr/home/game y nuestro script se llama autoban.sh el comando seria asi:
    chmod u+x /usr/home/game/autoban.sh
     
    Agradecer no cuesta.
     
    Saludos!
  7. Me Gusta
    Inside got a reaction from izaviona in Script de detección cuentas editadas.   
    Bien pues para ir dandole un poco de movilidad, les paso esta script desarrollada 100% cuya finalidad es detectar objetos editados y autobanear la cuenta que los contenga.
     
    Primero un par de definiciones, entiendase por "Objeto editado" un item que tenga MAS del maximo de cualquier bono... ejemplo, si en tu server tienes configurado como maxhp 2000 y hay algun item que tenga de max hp 2001 automaticamente se baneara.
     
    Requerimientos:
    Acceso a Cron Jobs Acceso a Linea de comandos Servidor Mail configurado (opcional) El Script: 
    #!/bin/bash
    #DATOS MYSQL
    FECHA=$(date)
    DBUSER=root
    DBPASS=MICONTRASEÑA
    TABLA=account
    DBASE=account
    #BONOS 1 AL 5
    BONOS15='
    MAX_HP-1
    MAX_SP-2
    CON-3
    INT-4
    STR-5
    DEX-6
    ATT_SPEED-7
    MOV_SPEED-8
    CAST_SPEED-9
    HP_REGEN-10
    SP_REGEN-11
    POISON_PCT-12
    STUN_PCT-13
    SLOW_PCT-14
    CRITICAL_PCT-15
    PENETRATE_PCT-16
    ATTBONUS_HUMAN-17
    ATTBONUS_ANIMAL-18
    ATTBONUS_ORC-19
    ATTBONUS_MILGYO-20
    ATTBONUS_UNDEAD-21
    ATTBONUS_DEVIL-22
    STEAL_HP-23
    STEAL_SP-24
    MANA_BURN_PCT-25
    BLOCK-27
    DODGE-28
    RESIST_SWORD-29
    RESIST_TWOHAND-30
    RESIST_DAGGER-31
    RESIST_BELL-32
    RESIST_FAN-33
    RESIST_BOW-34
    RESIST_FIRE-35
    RESIST_ELEC-36
    RESIST_MAGIC-37
    RESIST_WIND-38
    REFLECT_MELEE-39
    POISON_REDUCE-41
    EXP_DOUBLE_BONUS-43
    GOLD_DOUBLE_BONUS-44
    ITEM_DROP_BONUS-45
    IMMUNE_STUN-48
    IMMUNE_SLOW-49
    ATT_GRADE_BONUS-53
    ATT_BONUS_TO_WARRIOR-59
    ATT_BONUS_TO_ASSASSIN-60
    ATT_BONUS_TO_SURA-61
    ATT_BONUS_TO_SHAMAN-62
    RESIST_WARRIOR-78
    RESIST_ASSASSIN-79
    RESIST_SURA-80
    RESIST_SHAMAN-81
    '
    #BONOS 6 Y 7
    BONOS67='
    MAX_HP-1
    MAX_SP-2
    CON-3
    INT-4
    STR-5
    DEX-6
    CRITICAL_PCT-15
    PENETRATE_PCT-16
    ATT_GRADE_BONUS-53
    ATT_BONUS_TO_MONSTER-63
    ATT_BONUS_TO_WARRIOR-59
    ATT_BONUS_TO_ASSASSIN-60
    ATT_BONUS_TO_SURA-61
    ATT_BONUS_TO_SHAMAN-62
    RESIST_WARRIOR-78
    RESIST_ASSASSIN-79
    RESIST_SURA-80
    RESIST_SHAMAN-81
    ATT_SPEED-7
    MOV_SPEED-8
    '
    #CONSULTA BONOS 1 AL 5
    for i in $BONOS15; do
    line=$i
    NOMBRE=${line%-*}
    VALUE=${line#*-}
    #echo $NOMBRE
    #echo $VALUE
    MAX=`echo "SELECT player.item_attr.lv5 FROM player.item_attr WHERE apply='$NOMBRE' ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    for valmax in $MAX ;
    do
    #echo $valmax
    RES=`echo "SELECT player.player.account_id FROM player.item, player.player WHERE ((attrtype0=$VALUE and attrvalue0 > $valmax) OR (attrtype1=$VALUE and attrvalue1 > $valmax) OR (attrtype2=$VALUE and attrvalue2 > $valmax) OR (attrtype3=$VALUE and attrvalue3 > $valmax) OR (attrtype4=$VALUE and attrvalue4 > $valmax) OR (attrtype5=$VALUE and attrvalue5 > $valmax) OR (attrtype6=$VALUE and attrvalue6 > $valmax)) and ((player.item.owner_id = player.player.id) or (player.item.owner_id = player.player.account_id)) ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    for data in $RES ;
    do
    #aki bannear a la banda o hacer el informe
    BANEO=`echo "UPDATE account SET status='AUTOBAN' WHERE id='$data' ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    echo $FECHA account: $data bono: $NOMBRE valor maximo: $valmax
    done
    done
    done
    #CONSULTA BONOS 6 Y 7
    for i in $BONOS67; do
    line=$i
    NOMBRE=${line%-*}
    VALUE=${line#*-}
    #echo $NOMBRE
    #echo $VALUE
    MAX=`echo "SELECT player.item_attr_rare.lv5 FROM player.item_attr_rare WHERE apply='$NOMBRE' ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    for valmax in $MAX ;
    do
    #echo $valmax
    RES=`echo "SELECT player.player.account_id FROM player.item, player.player WHERE ((attrtype0=$VALUE and attrvalue0 > $valmax) OR (attrtype1=$VALUE and attrvalue1 > $valmax) OR (attrtype2=$VALUE and attrvalue2 > $valmax) OR (attrtype3=$VALUE and attrvalue3 > $valmax) OR (attrtype4=$VALUE and attrvalue4 > $valmax) OR (attrtype5=$VALUE and attrvalue5 > $valmax) OR (attrtype6=$VALUE and attrvalue6 > $valmax)) and ((player.item.owner_id = player.player.id) or (player.item.owner_id = player.player.account_id)) ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    for data in $RES ;
    do
    #aki bannear a la banda o hacer el informe
    BANEO=`echo "UPDATE account SET status='AUTOBAN' WHERE id='$data' ;" | mysql -N -B -u $DBUSER -p$DBPASS $DBASE`
    echo $FECHA account: $data bono: $NOMBRE valor maximo: $valmax
    done
    done
    done
    #mail -s "Informe Baneo Automatico" "[email protected]" < RES.TXT
     
     
    Instalacion:
     
    1.- Copiar el texto a un archivo de notepad y guardarlo con el nombre que quieran y extension .sh por ejemplo autobaneo.sh
     
    2.- Al inicio del codigo se definen las variables con los datos del mysql, cambiar los datos segun como los tengan en su server.
     
    3.- al final del script esta comentada (#) la linea de correo, esta linea es por si queremos enviarnos el "log" via correo electronico, si tienes el server mail de tu freebsd configurado y fincionando puedes descomentarla y porsupuesto cambiar el correo por el tuyo, si no dejala asi.
     
    4.- una vez hecho todo esto, subir el archivo fia filezilla o winscp a tu servidor, no te olvides anotar la ruta, por comodidad lo ideal seria subirlo a la carpeta de los files, por ejemplo /usr/home/game una vez subido anota la ruta.
     
    5.- ejecutar el siguiente comando para establecer los permisos del script:
    chmod u+x /ruta/del/script.sh
     
    Si nuestra ruta al script es /usr/home/game y nuestro script se llama autoban.sh el comando seria asi:
    chmod u+x /usr/home/game/autoban.sh
     
    Agradecer no cuesta.
     
    Saludos!
×
×
  • Crear nuevo...