Inside Publicado 17 de Abril del 2013 Reportar Compartir Publicado 17 de Abril del 2013 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! izaviona, fuuton97, Kibya y 1 mas reacciono a esto 4 Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
12345 Publicado 17 de Abril del 2013 Reportar Compartir Publicado 17 de Abril del 2013 Requerimientos: Acceso a Cron Jobs Acceso a Linea de comandos Servidor Mail configurado (opcional) ez la primera vez qe oigo ablar de ezo, como conzigo ezoz reqerimientoz? Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
SeMa™ Publicado 17 de Abril del 2013 Reportar Compartir Publicado 17 de Abril del 2013 MMMM me parece que está bien hecho , pero para detectar tal bonus tendrías que estar usando el .sh cada 5 minutos , no es mejor hacerlo por shell y que lo ejecute automáticamente? de todas formas ,buen script. Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
pepineitor Publicado 17 de Abril del 2013 Reportar Compartir Publicado 17 de Abril del 2013 Muy bueno, pero es una inutilidad.... Que servidor le da acceso a la db a sus GM's? Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Kibya Publicado 17 de Abril del 2013 Reportar Compartir Publicado 17 de Abril del 2013 Muy bueno, pero es una inutilidad.... Que servidor le da acceso a la db a sus GM's? Le das acceso limitado a la db... Le creas un nuevo usuario Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
ruiskyo1 Publicado 18 de Abril del 2013 Reportar Compartir Publicado 18 de Abril del 2013 Y se lo apanhas la usário y pw puedes hacer un site con item creator Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
OceanusPT Publicado 3 de Septiembre del 2014 Reportar Compartir Publicado 3 de Septiembre del 2014 tentei meter isto no meu servidor. se eu fizer: chmod u+x /usr/home/game/autoban.sh se eu fizer Da ideia que nada acontece.... Pelo menos não esta a banir conta nenhuma! se eu fizer: cd /usr/home/game && sh autoban.sh dá o seguinte erro : "autoban.sh: 85: Syntax error: word enexpected" Alguem pode ajudar a resolver? Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
OceanusPT Publicado 16 de Diciembre del 2014 Reportar Compartir Publicado 16 de Diciembre del 2014 esta dando erro: "autoban.sh: 85: Syntax error: word enexpected" any help? Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Shogun Publicado 16 de Diciembre del 2014 Reportar Compartir Publicado 16 de Diciembre del 2014 esta dando erro: "autoban.sh: 85: Syntax error: word enexpected" any help? Creo que no copiaste bien el script. Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
OceanusPT Publicado 16 de Diciembre del 2014 Reportar Compartir Publicado 16 de Diciembre del 2014 não trabalha Shogun :\ #!/bin/bash #DATOS MYSQL FECHA=$(date) DBUSER=xxxx DBPASS=xxxxxxxxxxxÑ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 ' #BONOS 6 Y 7 BONOS67=' MAX_HP-1 MAX_SP-2 CON-3 INT-4 STR-5 DEX-6 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 ' #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 Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Shogun Publicado 16 de Diciembre del 2014 Reportar Compartir Publicado 16 de Diciembre del 2014 #!/bin/bash Este script está hecho en Linux, en freebsd bash está en /usr/local/bin/bash y además no es parte del FreeBSD, hay que instalarlo aparte. Cambia esa primera línea por #!/usr/local/bin/bash y después: pkg install bash chmod 755 autoban.sh ./autoban.sh Con un poco de suerte funciona, pero este script hay que editarlo si queréis que haga algo. Citar Enlace para comentar Compartir en otros sitios Mas opciones de compartir...
Mensajes recomendados
Unirse a la conversación
Puedes publicar ahora y registrarte más tarde. Si tienes una cuenta, regístrate para publicar con su cuenta.