Bringer Posted November 25, 2016 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 748 Reputation: 47 Joined: 03/12/14 Last Seen: 17 hours ago Share Posted November 25, 2016 (edited) I'm using This Script can anyone edit this script Blocklisted Card like Thanatos Card Rangdris or LHZ Card? prontera,142,197,5 script Card Seller 633,{ mes "[Card Seller]"; mes "Welcome!"; mes "I can sell you any normal monster card in the game. Would you like to have a look?"; next; if ( select ( "Normal Cards" , "Mini-boss Cards", "MVP Cards" ) == 1 ) { .@s = select( .alphabet_menu$ ) -1; close2; callshop "card_mob#"+ .alphabet$[.@s], 1; end; } close2; callshop "card_mob#"+( ( @menu == 2 )? "miniboss":"MVP" ), 1; end; OnInit: freeloop 1; .@total = query_sql("select distinct left( name_japanese, 1 ) as aaa from item_db right join mob_db on item_db.id = mob_db.dropcardid where ~mode & 32 and type = 6 group by name_japanese order by aaa", .alphabet$ ); for ( .@i = 0; .@i < .@total; .@i++ ) { .alphabet_menu$ = .alphabet_menu$ + .alphabet$[.@i] +" Cards:"; .@nb = 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 left( name_japanese, 1 ) = '"+ .alphabet$[.@i] +"' group by name_japanese order by name_japanese limit 128", .@id ); npcshopdelitem "card_mob#"+ .alphabet$[.@i], 501; for ( .@j = 0; .@j < .@nb; .@j++ ) npcshopadditem "card_mob#"+ .alphabet$[.@i], .@id[.@j], 100000; } .@nb = 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 ); npcshopdelitem "card_mob#miniboss", 501; for ( .@i = 0; .@i < .@nb; .@i++ ) npcshopadditem "card_mob#miniboss", .@id[.@i], 5000000; npcshopdelitem "card_mob#miniboss", 4147; // lol ... ok me lazy already .@nb = 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 ); npcshopdelitem "card_mob#MVP", 501; for ( .@i = 0; .@i < .@nb; .@i++ ) npcshopadditem "card_mob#MVP", .@id[.@i], 10000000; freeloop 0; end; } - shop card_mob#A -1,501:1000 - shop card_mob#B -1,501:1000 - shop card_mob#C -1,501:1000 - shop card_mob#D -1,501:1000 - shop card_mob#E -1,501:1000 - shop card_mob#F -1,501:1000 - shop card_mob#G -1,501:1000 - shop card_mob#H -1,501:1000 - shop card_mob#I -1,501:1000 - shop card_mob#J -1,501:1000 - shop card_mob#K -1,501:1000 - shop card_mob#L -1,501:1000 - shop card_mob#M -1,501:1000 - shop card_mob#N -1,501:1000 - shop card_mob#O -1,501:1000 - shop card_mob#P -1,501:1000 - shop card_mob#Q -1,501:1000 - shop card_mob#R -1,501:1000 - shop card_mob#S -1,501:1000 - shop card_mob#T -1,501:1000 - shop card_mob#U -1,501:1000 - shop card_mob#V -1,501:1000 - shop card_mob#W -1,501:1000 - shop card_mob#X -1,501:1000 - shop card_mob#Y -1,501:1000 - shop card_mob#Z -1,501:1000 - shop card_mob#miniboss -1,501:1000 - shop card_mob#MVP -1,501:1000 Edited November 25, 2016 by Bringer Quote Link to comment Share on other sites More sharing options...
1 Omnipotent Posted November 26, 2016 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 November 26, 2016 So, looking through the forums I saw a very good answer from Capuche. Enjoy. 1 Quote Link to comment Share on other sites More sharing options...
0 Omnipotent Posted November 25, 2016 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 November 25, 2016 (edited) .@nb = 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 ); change to: .@nb = 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 item_db.id <> 4399 and not between '4671' and '4696' and mexp != 0 group by item_db.id order by name_japanese limit 128", .@id ); Edited November 25, 2016 by Omnipotent Edited the wrong line. Quote Link to comment Share on other sites More sharing options...
0 Azeroth Posted November 25, 2016 Group: Members Topic Count: 36 Topics Per Day: 0.01 Content Count: 383 Reputation: 121 Joined: 03/31/12 Last Seen: January 29, 2023 Share Posted November 25, 2016 How do we make it in a multiple blacklisted? Example: Quote OnInit: setarray[0], 4399,4696,4232; Quote Link to comment Share on other sites More sharing options...
0 Bringer Posted November 25, 2016 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 748 Reputation: 47 Joined: 03/12/14 Last Seen: 17 hours ago Author Share Posted November 25, 2016 8 hours ago, Omnipotent said: .@nb = 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 ); change to: .@nb = 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 item_db.id <> 4399 and not between '4671' and '4696' and mexp != 0 group by item_db.id order by name_japanese limit 128", .@id ); : DB error - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'between '4671' and '4696' and mexp != 0 group by item_db.id order by name_japane' at line 1 [Debug]: at script.c:15981 - 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 item_db.id <> 4399 and not between '4671' and '4696' and mexp != 0 group by item_db.id order by name_japanese limit 128 Quote Link to comment Share on other sites More sharing options...
0 Quazy Posted November 25, 2016 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 44 Reputation: 0 Joined: 11/21/13 Last Seen: April 10, 2021 Share Posted November 25, 2016 this is the script i used on my server. i hope it help you! invek,174,141,5 script Ca Seller 100,{ mes "Welcome to card seller ... meh lazy to say"; next; if ( select ( "Normal Cards", "Mini-boss Cards", "MVP Cards" ) == 1 ) { .@s = select( .alphabet_menu$ ) -1; close2; callshop "card_mob#"+ .alphabet$[.@s], 1; end; } close2; callshop "card_mob#"+( ( @menu == 2 )? "miniboss":"MVP" ), 1; end; OnInit: freeloop 1; .@total = query_sql("select distinct left( name_japanese, 1 ) as aaa from item_db right join mob_db on item_db.id = mob_db.dropcardid where ~mode & 32 and type = 6 group by name_japanese order by aaa", .alphabet$ ); for ( .@i = 0; .@i < .@total; .@i++ ) { .alphabet_menu$ = .alphabet_menu$ + .alphabet$[.@i] +" Cards:"; .@nb = 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 left( name_japanese, 1 ) = '"+ .alphabet$[.@i] +"' group by name_japanese order by name_japanese limit 128", .@id ); npcshopdelitem "card_mob#"+ .alphabet$[.@i], 501; for ( .@j = 0; .@j < .@nb; .@j++ ) npcshopadditem "card_mob#"+ .alphabet$[.@i], .@id[.@j], 1000000; } .@nb = 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 ); npcshopdelitem "card_mob#miniboss", 501; for ( .@i = 0; .@i < .@nb; .@i++ ) npcshopadditem "card_mob#miniboss", .@id[.@i], 1000000; npcshopdelitem "card_mob#miniboss", 4147; // lol ... ok me lazy already .@nb = 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 ); npcshopdelitem "card_mob#MVP", 501; for ( .@i = 0; .@i < .@nb; .@i++ ) npcshopadditem "card_mob#MVP", .@id[.@i], 1000000; freeloop 0; end; } - shop card_mob#A -1,501:1000 - shop card_mob#B -1,501:1000 - shop card_mob#C -1,501:1000 - shop card_mob#D -1,501:1000 - shop card_mob#E -1,501:1000 - shop card_mob#F -1,501:1000 - shop card_mob#G -1,501:1000 - shop card_mob#H -1,501:1000 - shop card_mob#I -1,501:1000 - shop card_mob#J -1,501:1000 - shop card_mob#K -1,501:1000 - shop card_mob#L -1,501:1000 - shop card_mob#M -1,501:1000 - shop card_mob#N -1,501:1000 - shop card_mob#O -1,501:1000 - shop card_mob#P -1,501:1000 - shop card_mob#Q -1,501:1000 - shop card_mob#R -1,501:1000 - shop card_mob#S -1,501:1000 - shop card_mob#T -1,501:1000 - shop card_mob#U -1,501:1000 - shop card_mob#V -1,501:1000 - shop card_mob#W -1,501:1000 - shop card_mob#X -1,501:1000 - shop card_mob#Y -1,501:1000 - shop card_mob#Z -1,501:1000 - shop card_mob#miniboss -1,501:1000 - shop card_mob#MVP -1,501:1000 Quote Link to comment Share on other sites More sharing options...
0 Bringer Posted November 25, 2016 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 748 Reputation: 47 Joined: 03/12/14 Last Seen: 17 hours ago Author Share Posted November 25, 2016 2 hours ago, Quazy said: this is the script i used on my server. i hope it help you! invek,174,141,5 script Ca Seller 100,{ mes "Welcome to card seller ... meh lazy to say"; next; if ( select ( "Normal Cards", "Mini-boss Cards", "MVP Cards" ) == 1 ) { .@s = select( .alphabet_menu$ ) -1; close2; callshop "card_mob#"+ .alphabet$[.@s], 1; end; } close2; callshop "card_mob#"+( ( @menu == 2 )? "miniboss":"MVP" ), 1; end; OnInit: freeloop 1; .@total = query_sql("select distinct left( name_japanese, 1 ) as aaa from item_db right join mob_db on item_db.id = mob_db.dropcardid where ~mode & 32 and type = 6 group by name_japanese order by aaa", .alphabet$ ); for ( .@i = 0; .@i < .@total; .@i++ ) { .alphabet_menu$ = .alphabet_menu$ + .alphabet$[.@i] +" Cards:"; .@nb = 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 left( name_japanese, 1 ) = '"+ .alphabet$[.@i] +"' group by name_japanese order by name_japanese limit 128", .@id ); npcshopdelitem "card_mob#"+ .alphabet$[.@i], 501; for ( .@j = 0; .@j < .@nb; .@j++ ) npcshopadditem "card_mob#"+ .alphabet$[.@i], .@id[.@j], 1000000; } .@nb = 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 ); npcshopdelitem "card_mob#miniboss", 501; for ( .@i = 0; .@i < .@nb; .@i++ ) npcshopadditem "card_mob#miniboss", .@id[.@i], 1000000; npcshopdelitem "card_mob#miniboss", 4147; // lol ... ok me lazy already .@nb = 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 ); npcshopdelitem "card_mob#MVP", 501; for ( .@i = 0; .@i < .@nb; .@i++ ) npcshopadditem "card_mob#MVP", .@id[.@i], 1000000; freeloop 0; end; } - shop card_mob#A -1,501:1000 - shop card_mob#B -1,501:1000 - shop card_mob#C -1,501:1000 - shop card_mob#D -1,501:1000 - shop card_mob#E -1,501:1000 - shop card_mob#F -1,501:1000 - shop card_mob#G -1,501:1000 - shop card_mob#H -1,501:1000 - shop card_mob#I -1,501:1000 - shop card_mob#J -1,501:1000 - shop card_mob#K -1,501:1000 - shop card_mob#L -1,501:1000 - shop card_mob#M -1,501:1000 - shop card_mob#N -1,501:1000 - shop card_mob#O -1,501:1000 - shop card_mob#P -1,501:1000 - shop card_mob#Q -1,501:1000 - shop card_mob#R -1,501:1000 - shop card_mob#S -1,501:1000 - shop card_mob#T -1,501:1000 - shop card_mob#U -1,501:1000 - shop card_mob#V -1,501:1000 - shop card_mob#W -1,501:1000 - shop card_mob#X -1,501:1000 - shop card_mob#Y -1,501:1000 - shop card_mob#Z -1,501:1000 - shop card_mob#miniboss -1,501:1000 - shop card_mob#MVP -1,501:1000 I want to blocklist some MVP boss card not to sell it Quote Link to comment Share on other sites More sharing options...
0 Omnipotent Posted November 25, 2016 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 November 25, 2016 (edited) Well, I made the blacklist thing in post#3 because I think it might be easier to configure. http://pastebin.com/raw/amShWsSM Edited November 25, 2016 by Omnipotent Weird tabs and compare args. Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted November 25, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 59 minutes ago Share Posted November 25, 2016 (edited) you can actually filter this using the query part, it would save alot resources and performance wise. ............AND `item_db`.`id` NOT IN (4399,4671,4672,4673,4674,4675,4676,4677,4678,4679,4680,4681,4682,4683,4684,4685,4686,4687,4688,4689,4690,4691,4692,4693,4694,4695,4696) Edited November 25, 2016 by Emistry Quote Link to comment Share on other sites More sharing options...
0 Omnipotent Posted November 26, 2016 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 November 26, 2016 @Emistry Already know that. It's just not as easier to configure. And... what resources? It's executed just one time... 1 Quote Link to comment Share on other sites More sharing options...
0 Bringer Posted November 26, 2016 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 748 Reputation: 47 Joined: 03/12/14 Last Seen: 17 hours ago Author Share Posted November 26, 2016 (edited) 8 hours ago, Omnipotent said: Well, I made the blacklist thing in post#3 because I think it might be easier to configure. http://pastebin.com/raw/amShWsSM still selling the thanatos lhz card @Emistry what part i need to add this code? ............AND `item_db`.`id` NOT IN (4399,4671,4672,4673,4674,4675,4676,4677,4678,4679,4680,4681,4682,4683,4684,4685,4686,4687,4688,4689,4690,4691,4692,4693,4694,4695,4696) Edited November 26, 2016 by Bringer Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted November 26, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 59 minutes ago Share Posted November 26, 2016 6 hours ago, Omnipotent said: @Emistry Already know that. It's just not as easier to configure. And... what resources? It's executed just one time... if the item are filtered during the query time, it would save your resource from comparing the item id in later process... although it's just some tiny bit of resources which isn't obvious to notice. 4 hours ago, Bringer said: what part i need to add this code? all the SELECT query .... Quote Link to comment Share on other sites More sharing options...
0 Bringer Posted November 26, 2016 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 748 Reputation: 47 Joined: 03/12/14 Last Seen: 17 hours ago Author Share Posted November 26, 2016 43 minutes ago, Emistry said: if the item are filtered during the query time, it would save your resource from comparing the item id in later process... although it's just some tiny bit of resources which isn't obvious to notice. all the SELECT query .... Do you mind to paste here so i cant get anyerror thanks Quote Link to comment Share on other sites More sharing options...
0 LiTo Posted November 27, 2016 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 5 Reputation: 0 Joined: 11/20/11 Last Seen: December 18, 2020 Share Posted November 27, 2016 (edited) 16 hours ago, Bringer said: Do you mind to paste here so i cant get anyerror thanks follow sample below. .@total = query_sql( "SELECT DISTINCT LEFT( `name_japanese`, 1 ) AS alphabets FROM `"+ .@item_db$ +"` RIGHT JOIN `"+ .@mob_db$ +"` ON `"+ .@item_db$ +"`.`id` = `"+ .@mob_db$ +"`.`dropcardid` WHERE ~(`MODE`) & 32 AND `type` = 6 AND `"+ .@item_db$ +"`.`id` NOT IN (4399,4671,4672,4673,4674,4675,4676,4677,4678,4679,4680,4681,4682,4683,4684,4685,4686,4687,4688,4689,4690,4691,4692,4693,4694,4695,4696) GROUP BY `name_japanese` ORDER BY alphabets;", .alphabet$ ); .@nb = 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 LEFT( `name_japanese`, 1 ) = '"+ .alphabet$[.@i] +"' AND `"+ .@item_db$ +"`.`id` NOT IN (4399,4671,4672,4673,4674,4675,4676,4677,4678,4679,4680,4681,4682,4683,4684,4685,4686,4687,4688,4689,4690,4691,4692,4693,4694,4695,4696) GROUP BY `name_japanese` ORDER BY `name_japanese` LIMIT 128;", .@id ); Edited November 27, 2016 by LiTo Quote Link to comment Share on other sites More sharing options...
Question
Bringer
I'm using This Script
can anyone edit this script
Blocklisted Card like Thanatos Card Rangdris or LHZ Card?
prontera,142,197,5 script Card Seller 633,{ mes "[Card Seller]"; mes "Welcome!"; mes "I can sell you any normal monster card in the game. Would you like to have a look?"; next; if ( select ( "Normal Cards" , "Mini-boss Cards", "MVP Cards" ) == 1 ) { .@s = select( .alphabet_menu$ ) -1; close2; callshop "card_mob#"+ .alphabet$[.@s], 1; end; } close2; callshop "card_mob#"+( ( @menu == 2 )? "miniboss":"MVP" ), 1; end; OnInit: freeloop 1; .@total = query_sql("select distinct left( name_japanese, 1 ) as aaa from item_db right join mob_db on item_db.id = mob_db.dropcardid where ~mode & 32 and type = 6 group by name_japanese order by aaa", .alphabet$ ); for ( .@i = 0; .@i < .@total; .@i++ ) { .alphabet_menu$ = .alphabet_menu$ + .alphabet$[.@i] +" Cards:"; .@nb = 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 left( name_japanese, 1 ) = '"+ .alphabet$[.@i] +"' group by name_japanese order by name_japanese limit 128", .@id ); npcshopdelitem "card_mob#"+ .alphabet$[.@i], 501; for ( .@j = 0; .@j < .@nb; .@j++ ) npcshopadditem "card_mob#"+ .alphabet$[.@i], .@id[.@j], 100000; } .@nb = 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 ); npcshopdelitem "card_mob#miniboss", 501; for ( .@i = 0; .@i < .@nb; .@i++ ) npcshopadditem "card_mob#miniboss", .@id[.@i], 5000000; npcshopdelitem "card_mob#miniboss", 4147; // lol ... ok me lazy already .@nb = 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 ); npcshopdelitem "card_mob#MVP", 501; for ( .@i = 0; .@i < .@nb; .@i++ ) npcshopadditem "card_mob#MVP", .@id[.@i], 10000000; freeloop 0; end; } - shop card_mob#A -1,501:1000 - shop card_mob#B -1,501:1000 - shop card_mob#C -1,501:1000 - shop card_mob#D -1,501:1000 - shop card_mob#E -1,501:1000 - shop card_mob#F -1,501:1000 - shop card_mob#G -1,501:1000 - shop card_mob#H -1,501:1000 - shop card_mob#I -1,501:1000 - shop card_mob#J -1,501:1000 - shop card_mob#K -1,501:1000 - shop card_mob#L -1,501:1000 - shop card_mob#M -1,501:1000 - shop card_mob#N -1,501:1000 - shop card_mob#O -1,501:1000 - shop card_mob#P -1,501:1000 - shop card_mob#Q -1,501:1000 - shop card_mob#R -1,501:1000 - shop card_mob#S -1,501:1000 - shop card_mob#T -1,501:1000 - shop card_mob#U -1,501:1000 - shop card_mob#V -1,501:1000 - shop card_mob#W -1,501:1000 - shop card_mob#X -1,501:1000 - shop card_mob#Y -1,501:1000 - shop card_mob#Z -1,501:1000 - shop card_mob#miniboss -1,501:1000 - shop card_mob#MVP -1,501:1000
Link to comment
Share on other sites
13 answers to this question
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.