caspa Posted June 25, 2017 Group: Members Topic Count: 194 Topics Per Day: 0.04 Content Count: 499 Reputation: 3 Joined: 03/11/12 Last Seen: September 18, 2023 Share Posted June 25, 2017 mes "Please make sure to input the exact name of the player."; next; input .@n$; mes "^ff0000"+.@n$+"^000000 "+(( .@item < 1 ) ? "has":"have" )+" ^0000ff"+ .@inv +"x ^0000ff"+ getitemname( .@item ) +"^000000 in "+( (.@sex(.@n$)) ? "his":"her" )+" account."; hi guys how do i make this work? i always get error on the sex part... Quote Link to comment Share on other sites More sharing options...
0 Cyro Posted June 26, 2017 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 1138 Reputation: 290 Joined: 04/29/13 Last Seen: July 20, 2024 Share Posted June 26, 2017 sex == 1 // Male sex == 0 // female post your full script 1 Quote Link to comment Share on other sites More sharing options...
0 caspa Posted June 26, 2017 Group: Members Topic Count: 194 Topics Per Day: 0.04 Content Count: 499 Reputation: 3 Joined: 03/11/12 Last Seen: September 18, 2023 Author Share Posted June 26, 2017 (edited) 15 minutes ago, Cyro said: sex == 1 // Male sex == 0 // female post your full script mes "[ Account Viewer ]"; mes " "; mes "^0000ff*Input Name*^000000"; mes " "; mes " "; mes "^ff0000NOTE^000000 :"; mes "Make sure to input the exact name of the player."; next; input .@n$; if ( query_sql("SELECT `account_id` FROM `char` WHERE `name` = '"+ escape_sql( .@n$ ) +"'", .@a_id ) ) { query_sql("SELECT `char_id`, `guild_id` FROM `char` WHERE `account_id` = '"+ .@a_id +"'", .@c_id, .@g_id ); mes "[ Account Viewer ]"; mes " "; mes "^0000ff*Input Item-ID*^000000"; mes " "; mes " "; mes "^ff0000NOTE^000000 :"; mes "Make sure to input the correct item-ID. Type @ii + item name to know the ID."; next; input .@item; if( getitemname( .@item ) == "" || getitemname( .@item ) == "null" ) { mes "[ Account Viewer ]"; mes "^ff0000Invalid Item-ID."; close; } for( set .@i,0; .@i < getarraysize( .@c_id ); set .@i,.@i+1 ) { query_sql( "SELECT SUM(`amount`) FROM `inventory` WHERE `char_id` = "+ .@c_id[.@i] +" AND `nameid` = "+ .@item, .@count_inv ); query_sql( "SELECT SUM(`amount`) FROM `cart_inventory` WHERE `char_id` = "+ .@c_id[.@i] +" AND `nameid` = "+ .@item, .@count_cart ); query_sql( "SELECT SUM(`amount`) FROM `guild_storage` WHERE `guild_id` = "+ .@g_id[.@i] +" AND `nameid` = "+ .@item, .@count_gsto ); set .@inv,.@inv + .@count_inv + .@count_cart; set .@gsto,.@gsto + .@count_gsto; } query_sql( "SELECT SUM(`amount`) FROM `storage` WHERE `account_id` = "+ .@a_id +" AND `nameid` = "+ .@item, .@count_sto ); set .@inv,.@inv + .@count_sto; } else { mes "[ Account Viewer ]"; mes "^ff0000"+.@n$+" does not exist."; close; } set .@sex, Sex; mes "[ Account Viewer ]"; mes "• ^777777Account's Storage ^00cc00CHECK^000000"; mes "• ^777777Account's Inventory ^00cc00CHECK^000000"; mes "• ^777777Account's Cart Inventory ^00cc00CHECK^000000"; mes "-----------------------------------"; mes "^ff0000"+.@n$+"^000000 "+(countitem( .@item > 1 ) ? "have":"has" )+" ^0000ff"+ .@inv +"x ^0000ff"+ getitemname( .@item ) +"^000000 "+(sex(.@n$)? "her":"his" )+" account."; Edited June 26, 2017 by caspa Quote Link to comment Share on other sites More sharing options...
0 caspa Posted June 26, 2017 Group: Members Topic Count: 194 Topics Per Day: 0.04 Content Count: 499 Reputation: 3 Joined: 03/11/12 Last Seen: September 18, 2023 Author Share Posted June 26, 2017 here's my script sir... Quote Link to comment Share on other sites More sharing options...
0 n0tttt Posted June 26, 2017 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 303 Reputation: 118 Joined: 12/10/16 Last Seen: April 18 Share Posted June 26, 2017 mes "[ Account Viewer ]"; mes " "; mes "^0000ff*Input Name*^000000"; mes " "; mes " "; mes "^ff0000NOTE^000000 :"; mes "Make sure to input the exact name of the player."; next; input .@n$; if ( query_sql("SELECT `account_id` FROM `char` WHERE `name` = '"+ escape_sql( .@n$ ) +"'", .@a_id ) ) { query_sql("SELECT `char_id`, `guild_id` FROM `char` WHERE `account_id` = '"+ .@a_id +"'", .@c_id, .@g_id ); mes "[ Account Viewer ]"; mes " "; mes "^0000ff*Input Item-ID*^000000"; mes " "; mes " "; mes "^ff0000NOTE^000000 :"; mes "Make sure to input the correct item-ID. Type @ii + item name to know the ID."; next; input .@item; if( getitemname( .@item ) == "" || getitemname( .@item ) == "null" ) { mes "[ Account Viewer ]"; mes "^ff0000Invalid Item-ID."; close; } query_sql "SELECT sex FROM login WHERE account_id = "+.@a_id,.@sex$; for( set .@i,0; .@i < getarraysize( .@c_id ); set .@i,.@i+1 ) { query_sql( "SELECT SUM(`amount`) FROM `inventory` WHERE `char_id` = "+ .@c_id[.@i] +" AND `nameid` = "+ .@item, .@count_inv ); query_sql( "SELECT SUM(`amount`) FROM `cart_inventory` WHERE `char_id` = "+ .@c_id[.@i] +" AND `nameid` = "+ .@item, .@count_cart ); query_sql( "SELECT SUM(`amount`) FROM `guild_storage` WHERE `guild_id` = "+ .@g_id[.@i] +" AND `nameid` = "+ .@item, .@count_gsto ); set .@inv,.@inv + .@count_inv + .@count_cart; set .@gsto,.@gsto + .@count_gsto; } query_sql( "SELECT SUM(`amount`) FROM `storage` WHERE `account_id` = "+ .@a_id +" AND `nameid` = "+ .@item, .@count_sto ); set .@inv,.@inv + .@count_sto; } else { mes "[ Account Viewer ]"; mes "^ff0000"+.@n$+" does not exist."; close; } mes "[ Account Viewer ]"; mes "• ^777777Account's Storage ^00cc00CHECK^000000"; mes "• ^777777Account's Inventory ^00cc00CHECK^000000"; mes "• ^777777Account's Cart Inventory ^00cc00CHECK^000000"; mes "-----------------------------------"; mes "^ff0000"+.@n$+"^000000 "+(countitem( .@item > 1 ) ? "have":"has" )+" ^0000ff"+ .@inv +"x ^0000ff"+ getitemname( .@item ) +"^000000 "+((.@sex$ == "F")? "her":"his" )+" account."; Try this. Quote Link to comment Share on other sites More sharing options...
Question
caspa
mes "Please make sure to input the exact name of the player.";
next;
input .@n$;
mes "^ff0000"+.@n$+"^000000 "+(( .@item < 1 ) ? "has":"have" )+" ^0000ff"+ .@inv +"x ^0000ff"+ getitemname( .@item ) +"^000000 in "+( (.@sex(.@n$)) ? "his":"her" )+" account.";
hi guys how do i make this work? i always get error on the sex part...
Link to comment
Share on other sites
4 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.