Jump to content
  • 0

sex identifier on search


caspa

Question


  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

 

    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

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

sex == 1 // Male
sex == 0 // female

 

post your full script 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

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 by caspa
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  194
  • Topics Per Day:  0.04
  • Content Count:  499
  • Reputation:   3
  • Joined:  03/11/12
  • Last Seen:  

here's my script sir...

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

    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.

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...