Zikoziz Posted December 23, 2014 Group: Members Topic Count: 61 Topics Per Day: 0.01 Content Count: 208 Reputation: 16 Joined: 12/19/13 Last Seen: 12 hours ago Share Posted December 23, 2014 Saludos, Necesito ayuda, 1.- Necesito borrar las card MVP's que se encuentran ingame en los usuarios(storage-inventario) 2.- Si es posible que al borrar la card entregue una cierta cantidad de Cash. PD: tengo un script que detecta las card MVPs en el servidor, detecta el usuario que tiene la carta y en donde inventario o storage. (por si sirve de algo) Muchas Gracias. Quote Link to comment Share on other sites More sharing options...
Omnipotent Posted December 23, 2014 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 71 Reputation: 25 Joined: 11/23/11 Last Seen: May 16, 2024 Share Posted December 23, 2014 No sé si funcione. Buena suerte. - script cards_deleter -1,{ OnWhisperGlobal: set .@cash, 100; if ( getgmlevel ( ) > 98 ) { // créditos AnnieRuru .@n0 = query_sql( "select item_db.id from item_db right join mob_db on item_db.id = mob_db.dropcardid where mode & 32 and type = 6 and mexp != 0 group by item_db.id order by name_japanese limit 128", .@id ); setarray .@tables$[0], "auction", "cart_inventory", "guild_storage", "inventory", "mail", "storage"; setarray .@s$[0], "seller_id", "char_id", "0", "char_id", "dest_id", "account_id"; .@e$ = "|"; for ( ; .@a < 6 ; .@a++ ) { for ( .@b = 0 ; .@b < .@n0 ; .@b++ ) { if ( .@s$[.@a] != "0" ) { deletarray .@c ; .@n1 = query_sql ( "SELECT `"+ .@s$[.@a] +"` FROM `"+ .@tables$[.@a] +"` WHERE `nameid` = '"+ .@id[.@b] +"'", .@c ); for ( .@d = 0 ; .@d < .@n1 ; .@d++ ) { deletearray .@f ; if ( .@s$[.@a] != "account_id" ) query_sql ( "SELECT `account_id` FROM `char` WHERE `char_id` = '"+ .@c[.@d] +"' LIMIT 1", .@f ); else .@f[0] = .@c[.@d]; if ( ! compare ( .@e$, "|"+ .@c +"|" ) ) { .@e$ = .@e$ +""+ .@f[0] +"|"; query_sql "UPDATE `global_reg_value` SET `value` = `value` + '" +.@cash +"' WHERE `str` = '#CASHPOINTS' AND `account_id` = '" +.@f[0] +"'"; } } } query_sql "DELETE FROM `"+ .@tables$[.@a] +"` WHERE `nameid` = '"+ .@id[.@b] +"'"; } } dispbottom "Todo listo."; } } Quote Link to comment Share on other sites More sharing options...
Zikoziz Posted December 23, 2014 Group: Members Topic Count: 61 Topics Per Day: 0.01 Content Count: 208 Reputation: 16 Joined: 12/19/13 Last Seen: 12 hours ago Author Share Posted December 23, 2014 Gracias!!! =DLo probare y te aviso Quote Link to comment Share on other sites More sharing options...
Xiao Posted December 24, 2014 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 65 Reputation: 0 Joined: 12/10/14 Last Seen: April 17 Share Posted December 24, 2014 PD: tengo un script que detecta las card MVPs en el servidor, detecta el usuario que tiene la carta y en donde inventario o storage. (por si sirve de algo) Muchas Gracias. Oye no te gustaria compartir ese script? xD Quote Link to comment Share on other sites More sharing options...
Zikoziz Posted December 27, 2014 Group: Members Topic Count: 61 Topics Per Day: 0.01 Content Count: 208 Reputation: 16 Joined: 12/19/13 Last Seen: 12 hours ago Author Share Posted December 27, 2014 No sé si funcione. Buena suerte. - script cards_deleter -1,{ OnWhisperGlobal: set .@cash, 100; if ( getgmlevel ( ) > 98 ) { // créditos AnnieRuru .@n0 = query_sql( "select item_db.id from item_db right join mob_db on item_db.id = mob_db.dropcardid where mode & 32 and type = 6 and mexp != 0 group by item_db.id order by name_japanese limit 128", .@id ); setarray .@tables$[0], "auction", "cart_inventory", "guild_storage", "inventory", "mail", "storage"; setarray .@s$[0], "seller_id", "char_id", "0", "char_id", "dest_id", "account_id"; .@e$ = "|"; for ( ; .@a < 6 ; .@a++ ) { for ( .@b = 0 ; .@b < .@n0 ; .@b++ ) { if ( .@s$[.@a] != "0" ) { deletarray .@c ; .@n1 = query_sql ( "SELECT `"+ .@s$[.@a] +"` FROM `"+ .@tables$[.@a] +"` WHERE `nameid` = '"+ .@id[.@b] +"'", .@c ); for ( .@d = 0 ; .@d < .@n1 ; .@d++ ) { deletearray .@f ; if ( .@s$[.@a] != "account_id" ) query_sql ( "SELECT `account_id` FROM `char` WHERE `char_id` = '"+ .@c[.@d] +"' LIMIT 1", .@f ); else .@f[0] = .@c[.@d]; if ( ! compare ( .@e$, "|"+ .@c +"|" ) ) { .@e$ = .@e$ +""+ .@f[0] +"|"; query_sql "UPDATE `global_reg_value` SET `value` = `value` + '" +.@cash +"' WHERE `str` = '#CASHPOINTS' AND `account_id` = '" +.@f[0] +"'"; } } } query_sql "DELETE FROM `"+ .@tables$[.@a] +"` WHERE `nameid` = '"+ .@id[.@b] +"'"; } } dispbottom "Todo listo."; } } No funciona del todo Mira este lo cree basado en lo anterior, el problema es que aun no funciona X.x // créditos Pastilla Para Servidor eRO OnInit: set .@cash, 10000; set $mingm,99; setarray .Cards[0],4121,4123,4128,4131,4132,4134,4135,4137,4142,4143,4144,4145,4146,4147,4148,4168,4236,4241,4263,4276,4302,4305,4318,4324,4330,4342,4357,4359,4361,4363,4365,4399,4403,4407; setarray .@tables$[0], "auction", "cart_inventory", "guild_storage", "inventory", "mail", "storage"; setarray .@s$[0], "seller_id", "char_id", "0", "char_id", "dest_id", "account_id"; que_moon,39,19,4 script cards_deleter 726,{ mes "¡Hola "+strcharinfo(0)+"! ¿Borramos las cartas MvP y Mini Boss?"; if (getgmlevel() >= $mingm) { switch(select("-Demosle:- Close")) { case 1: .@e$ = "|"; for ( ; .@a < 6 ; .@a++ ) { for ( .@b = 0 ; .@b < .@n0 ; .@b++ ) { if ( .@s$[.@a] != "0" ) { deletarray .@c ; .@n1 = query_sql ( "SELECT `"+ .@s$[.@a] +"` FROM `"+ .@tables$[.@a] +"` WHERE `nameid` = '"+ .@id[.@b] +"'", .@c ); for ( .@d = 0 ; .@d < .@n1 ; .@d++ ) { deletearray .@f ; if ( .@s$[.@a] != "account_id" ) query_sql ( "SELECT `account_id` FROM `char` WHERE `char_id` = '"+ .@c[.@d] +"' LIMIT 1", .@f ); else .@f[0] = .@c[.@d]; if ( ! compare ( .@e$, "|"+ .@c +"|" ) ) { .@e$ = .@e$ +""+ .@f[0] +"|"; query_sql "UPDATE `global_reg_value` SET `value` = `value` + '" +.@cash +"' WHERE `str` = '#CASHPOINTS' AND `account_id` = '" +.@f[0] +"'"; } } } query_sql "DELETE FROM `"+ .@tables$[.@a] +"` WHERE `nameid` = '"+ .@id[.@b] +"'"; } } dispbottom "Todo listo."; case 2: mes "^616D7E¡Bueno!, si eso es lo que quieres. :("; close; } end; } } Quote Link to comment Share on other sites More sharing options...
Zikoziz Posted January 12, 2015 Group: Members Topic Count: 61 Topics Per Day: 0.01 Content Count: 208 Reputation: 16 Joined: 12/19/13 Last Seen: 12 hours ago Author Share Posted January 12, 2015 Solucionado Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.