Meister Posted December 9, 2015 Posted December 9, 2015 Hi see spoiler *strcharinfo(<type>{,<char_id>}) This function will return either the name, party name or guild name for the invoking character. Whatever it returns is determined by type. 0 - Character's name. 1 - The name of the party they're in if any. 2 - The name of the guild they're in if any. 3 - The name of the map the character is in. If a character is not a member of any party or guild, an empty string will be returned when requesting that information. If I use that script command, e.g. if(strcharinfo(3) == prontera) { mes "you're already at prontera"; } So basically, i used bindatcmd script and want to check if player is already in map. and if player is already in map. Player can't use the command. will it work? Quote
0 Stolao Posted December 9, 2015 Posted December 9, 2015 Needs to be if(strcharinfo(3) == "prontera") But yes will work Quote
1 Capuche Posted July 7, 2017 Posted July 7, 2017 if (strcharinfo(3) == "prontera") mes "you're already at prontera"; else if (strcharinfo(3) == "payon") mes "you're already at payon"; else if (strcharinfo(3) == "aldebaran" || strcharinfo(3) == "geffen" || strcharinfo(3) == "yuno") mes "you're already at aldebaran or geffen or yuno"; Quote
0 Meister Posted December 10, 2015 Author Posted December 10, 2015 Needs to be if(strcharinfo(3) == "prontera") But yes will work Woooot! it worked. Thanks man! Quote
0 Ninja Posted December 11, 2015 Posted December 11, 2015 (edited) A little tip, if you are setting/checking string/char types, always enclose them into quotation marks. Numbers, you don't have to unless your variable type is char or string. Edited December 11, 2015 by jezznar Quote
0 Meister Posted December 11, 2015 Author Posted December 11, 2015 A little tip, if you are setting/checking string/char types, always enclose them into quotation marks. Numbers, you don't have to unless your variable type is char or string. Can you give me an example? Thanks! Quote
0 Stolao Posted December 12, 2015 Posted December 12, 2015 A little tip, if you are setting/checking string/char types, always enclose them into quotation marks. Numbers, you don't have to unless your variable type is char or string. Can you give me an example? Thanks! A string variable is any word variable rather then an integer which is a number Reference your /doc/script_command.txt under variables for more info Quote
0 Profile Posted July 7, 2017 Posted July 7, 2017 Sorry to revive this, but can I use this comand for multiple maps? I tried it like this, but didn't work. if(strcharinfo(3) == "prontera,alberta") Quote
Question
Meister
Hi see spoiler
*strcharinfo(<type>{,<char_id>})
9 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.