Oraios Posted October 28, 2013 Posted October 28, 2013 Hello community, can someone write me a script like this : - Disguise Cost 500.000 Zeny - Disguise Monsters : Zombie, Familiar, Skeleton Best regards, Oraios Quote
1 Capuche Posted October 29, 2013 Posted October 29, 2013 Nope it wasn't about the kName, I thought that query_sql would delete all the values of the array but that's not the case. The compiled menu held the previous data if the new array had less data than the previous array prontera,157,179,0 script Sample 75,{ if ( Zeny < 500000 ) { mes "You don't have 500,000 zeny"; close; } mes "What monster would you like to disguise?"; next; L_back: .@s = select( .alphabet_menu$ ) -1; .@mob = select( getd( ".letter_"+ .@s +"$" ) ) -2; if ( .@mob == -1 ) goto L_back; disguise getd( ".mobid_"+ .@s +"["+ .@mob +"]" ); close2; Zeny -= 500000; end; OnInit: .@count = query_sql( "select distinct left( kName,1 ) as a from mob_db order by a", .@alphabet$ ); .alphabet_menu$ = implode( .@alphabet$, ":" ); for ( .@i = 0; .@i < .@count; .@i++ ) { .@string$ = ".mobid_"+ .@i; .@size = query_sql( "select kName,`ID` from mob_db where left( kName,1 ) = '"+ .@alphabet$[.@i] +"' group by kName asc limit 128", .@tmp$, getd( .@string$ ) ); setd ".letter_"+ .@i +"$", ( .@i ? "^777777Back^000000:" : ":" ) + implode( .@tmp$, ":" ); deletearray .@tmp$, .@size; // debugmes "check len "+ .@alphabet$[.@i] +" : "+ getarraysize( getd( .@string$ ) ); } } 2 Quote
Patskie Posted October 28, 2013 Posted October 28, 2013 Try prontera,150,150,0 script Sample -1,{ if ( Zeny < 500000 ) { mes "You don't have 500,000 zeny"; close; } mes "What monster would you like to disguise?"; next; switch(select("Zombie:Skeleton:Familiar")) { case 1: disguise 1015; break; case 2: disguise 1076; break; case 3: disguise 1005; break; default: break; } close2; Zeny -= 500000; end; } Quote
Capuche Posted October 28, 2013 Posted October 28, 2013 another (you need to load mob_db sql) prontera,157,179,0 script Sample 75,{ if ( Zeny < 500000 ) { mes "You don't have 500,000 zeny"; close; } mes "What monster would you like to disguise?"; next; L_back: .@s = select( .alphabet_menu$ ) -1; .@mob = select( getd( ".letter_"+ .@s +"$" ) ) -2; if ( .@s && .@mob == -1 ) goto L_back; disguise getd( ".mobid_"+ .@s +"["+ .@mob +"]" ); close2; Zeny -= 500000; end; OnInit: .@count = query_sql( "select distinct left( kName,1 ) as a from mob_db order by a", .@alphabet$ ); .alphabet_menu$ = implode( .@alphabet$, ":" ); for ( .@i = 0; .@i < .@count; .@i++ ) { .@string$ = ".mobid_"+ .@i; query_sql( "select kName,`ID` from mob_db where left( kName,1 ) = '"+ .@alphabet$[.@i] +"' group by kName asc limit 128", .@tmp$, getd( .@string$ ) ); setd ".letter_"+ .@i +"$", ( .@i ? "^777777Back^000000:" : ":" ) + implode( .@tmp$, ":" ); // debugmes "check len "+ .@alphabet$[.@i] +" : "+ getarraysize( getd( .@string$ ) ); } } Quote
mrlongshen Posted October 29, 2013 Posted October 29, 2013 @capuche. there are some problem on your script. there are alphabet A on B list. there are alphabet A on C list there are alphabet D on E list there are alphabet D on F list until alphabet W,T and S are on list Z please fix it sir... Quote
GmOcean Posted October 29, 2013 Posted October 29, 2013 This is due to pulling names from the kList. As in the Korean/Japanese names, not the english ones you see ingame. You'd have to configure the sql query to fit your needs. Quote
GmOcean Posted October 29, 2013 Posted October 29, 2013 Ahh, now that I looked at the full script yea, that is the case lol, I just saw kName the first time, and made the assumption based on my experience with Mob_db.txt. *Note to self, don't make assumptions lol* 1 Quote
Question
Oraios
Hello community,
can someone write me a script like this :
- Disguise Cost 500.000 Zeny
- Disguise Monsters : Zombie, Familiar, Skeleton
Best regards,
Oraios
7 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.