Jump to content
  • 0

Requesting Card Seller Script


tsubasa amami

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  11/01/12
  • Last Seen:  

Hi, can anyone help me with Card Seller Npc's? "A to Z" miniboss and MVP. thank you so much.

i've searched the forums for 2 days but am unable to find it =(

Link to comment
Share on other sites

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

lol if it is pvp ladder or quest board script

where the data is manipulated in-game

of course have to execute query_sql in real-time

but this script,

1.

to add a new card, also means need to add things like num2itemdesctable.txt etc at the client side

it also means, need to shut down the server to do so

so my method of using OnInit is correct

2.

my query only search inside `item_db` table, not `item_db2` table LMAO /heh

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

what if i just want the normal cards , and removing mini boss and mvp cards? what to remove in the script?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  205
  • Reputation:   19
  • Joined:  10/12/12
  • Last Seen:  

what if i just want the normal cards , and removing mini boss and mvp cards? what to remove in the script?

You have to rewrite the query changing some fields.

lol if it is pvp ladder or quest board script

where the data is manipulated in-game

of course have to execute query_sql in real-time

but this script,

1.

to add a new card, also means need to add things like num2itemdesctable.txt etc at the client side

it also means, need to shut down the server to do so

so my method of using OnInit is correct

2.

my query only search inside `item_db` table, not `item_db2` table LMAO /heh

1. Yeh, I just said that in case of client updates, your SQL method will auto-update :D

2. Heh, too lazy to read the whole query :P

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

what if i just want the normal cards , and removing mini boss and mvp cards? what to remove in the script?

prontera,155,177,5    script    Card Seller    100,{
   mes "Welcome to card seller ... meh lazy to say";
   next;
   .@s = select( .alphabet_menu$ ) -1;
   close2;
   callshop "card_mob#"+ .alphabet$[.@s], 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;
   }
   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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  80
  • Reputation:   1
  • Joined:  09/13/13
  • Last Seen:  

what if i just want the normal cards , and removing mini boss and mvp cards? what to remove in the script?

prontera,155,177,5    script    Card Seller    100,{
    mes "Welcome to card seller ... meh lazy to say";
    next;
    .@s = select( .alphabet_menu$ ) -1;
    close2;
    callshop "card_mob#"+ .alphabet$[.@s], 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;
    }
    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

 

i tried to use that script but i got this error trying to open any category on it

 

post-20583-0-82759500-1382446729_thumb.png

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

prontera,155,177,5	script	Card Seller	100,{
	mes "Welcome to card seller ... meh lazy to say";
	next;
	.@s = select( .alphabet_menu$ ) -1;
	close2;
	callshop "card_mob#"+ .alphabet$[.@s], 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;
	}
	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

tabs were broken. Don't forget to load item_db table in mysql

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  41
  • Topics Per Day:  0.01
  • Content Count:  237
  • Reputation:   19
  • Joined:  06/05/13
  • Last Seen:  

@Emistry, the software you mentioned is on renewal status or pre renewal?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  04/02/12
  • Last Seen:  

 

what if i just want the normal cards , and removing mini boss and mvp cards? what to remove in the script?

prontera,155,177,5    script    Card Seller    100,{
    mes "Welcome to card seller ... meh lazy to say";
    next;
    .@s = select( .alphabet_menu$ ) -1;
    close2;
    callshop "card_mob#"+ .alphabet$[.@s], 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;
    }
    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

 

Not working on 3ceam?

 

[Error]:  Loading NPC file: npc/custom/sinAstreaRO/normalcardshop.txt

script error on npc/custom/sinAstreaRO/normalcardshop.txt line 4

    parse_line: expect command, missing function name or calling undeclared func

tion

     1 : {

     2 : mes "Welcome to card seller ... meh lazy to say";

     3 :     next;

*    4 :     '.'@s = select( .alphabet_menu$ ) -1;

     5 :     close2;

     6 :     callshop "card_mob#"+ .alphabet$[.@s], 1;

     7 :     end;

     8 : OnInit:

     9 :     freeloop 1;

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

@heartfilla

only for rathena / hercules / ramod

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  65
  • Topics Per Day:  0.02
  • Content Count:  235
  • Reputation:   0
  • Joined:  05/03/13
  • Last Seen:  

prontera,155,177,5	script	Card Seller	100,{
	mes "Welcome to card seller ... meh lazy to say";
	next;
	.@s = select( .alphabet_menu$ ) -1;
	close2;
	callshop "card_mob#"+ .alphabet$[.@s], 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;
	}
	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

tabs were broken. Don't forget to load item_db table in mysql

 

Hi, script working fine! but there is no option for mvp and min-boss cards!

i tired Annie's script it wasn't works

 

alright solved now! had to add tab with annie's script

Thanks annie and Capuche.

prontera,155,177,5	script	Card 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
Edited by JassMax
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   0
  • Joined:  08/12/14
  • Last Seen:  

 

Anyway I believe that listing cards as Euphy said will be better from a client-side point of view, sql will just slow down the process even if it works pretty well ^^

but I called them up only once inside OnInit: label

means the query is only executed only once during server startup

if you mean the script on post#5 I agree

but the script on post#12 I have to disagree

I also knew that long time ago though

EDIT:

or probably a better way is ...

A~Z use query_sql + dynamic shop

mini-boss and MVP use "shop" npc ?

seems this idea is better

EDIT2:

prontera,155,177,5	script	Card 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;
	}
	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,4054:1000000,4241:1000000,4391:1000000,4428:1000000,4426:1000000,4290:1000000,4300:1000000,4392:1000000,4171:1000000,4397:1000000,4174:1000000,4398:1000000,4179:1000000,4266:1000000,4451:1000000,4250:1000000,4423:1000000,4354:1000000,4047:1000000,4163:1000000,4384:1000000,4431:1000000,4394:1000000,4395:1000000,4197:1000000,4198:1000000,4393:1000000,4203:1000000,4207:1000000,4440:1000000,4396:1000000,4254:1000000,4238:1000000,4237:1000000,4429:1000000,4406:1000000,4427:1000000,4306:1000000,4183:1000000
-	shop	card_mob#MVP	-1,4236:1000000,4359:1000000,4425:1000000,4145:1000000,4168:1000000,4386:1000000,4142:1000000,4134:1000000,4137:1000000,4123:1000000,4330:1000000,4441:1000000,4352:1000000,4408:1000000,4128:1000000,4324:1000000,4363:1000000,4365:1000000,4430:1000000,4403:1000000,4419:1000000,4376:1000000,4357:1000000,4276:1000000,4361:1000000,4146:1000000,4399:1000000,4132:1000000,4131:1000000,4143:1000000,4135:1000000,4144:1000000,4148:1000000,4121:1000000,4407:1000000,4342:1000000,4263:1000000,4367:1000000,4318:1000000,4302:1000000,4305:1000000,4374:1000000,4372:1000000
like this perhaps, and the query

// mini-boss
select item_db.id, name_japanese from item_db right join mob_db on item_db.id = mob_db.dropcardid
where mode & 32 and type = 6 and mexp = 0
and item_db.id not in
(
	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 not in
(
	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;

// MVP
select item_db.id, name_japanese from item_db right join mob_db on item_db.id = mob_db.dropcardid
where mode & 32 and type = 6 and mexp != 0
and item_db.id not in
(
	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 not in
(
	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;
EDIT3:

found out the reason that slowing down the query time is because of having 'group by' inside 'in'

so removed it

 

 

hi..i would like to use this script.. can you teach me how to use this? im using this setup here http://rathena.org/board/topic/84746-tutorial-how-to-create-ragnarok-offline-2013-client-tutorial/ and this error keep on showing..

post-28185-0-31358800-1408452893_thumb.jpg

 

and also i would like to know how to add item_db table in mysql..

 

SOLVED!

Edited by alvinjade
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...