0 Hijirikawa Posted August 8, 2016 Posted August 8, 2016 (edited) If Statements if(strcharinfo(3) == "payon"){ do payon stuff } else if(strcharinfo(3) == "prontera"){ do prontera stuff } else if(strcharinfo(3) == "alberta"){ do alberta stuff } IF + Switch Statements if(strcharinfo(3) == "payon"){ set .@town,1; } if(strcharinfo(3) == "prontera"){ set .@town,2; } if(strcharinfo(3) == "alberta"){ set .@town,3; } switch(.@town){ case 1: payon here case 2: prontera here case 3: alberta here } Just do which ever will look cleaner and easier to follow, I'd pick the combo with switch if it was me though Edited August 8, 2016 by Hijirikawa Quote
0 Emistry Posted August 8, 2016 Posted August 8, 2016 yes, ... depend on how you want to do it. Quote
0 Hijirikawa Posted August 8, 2016 Posted August 8, 2016 Yup, you can do some if statements to check where the npc or player using the script is. Quote
0 bearnope246 Posted August 8, 2016 Author Posted August 8, 2016 yes, ... depend on how you want to do it. Yup, you can do some if statements to check where the npc or player using the script is. Could i know how? example: Just the same NPC, duplicated it in different Town, it said different dialog.? Thanks Quote
0 bearnope246 Posted August 9, 2016 Author Posted August 9, 2016 If Statements if(strcharinfo(3) == "payon"){ do payon stuff } else if(strcharinfo(3) == "prontera"){ do prontera stuff } else if(strcharinfo(3) == "alberta"){ do alberta stuff } IF + Switch Statements if(strcharinfo(3) == "payon"){ set .@town,1; } if(strcharinfo(3) == "prontera"){ set .@town,2; } if(strcharinfo(3) == "alberta"){ set .@town,3; } switch(.@town){ case 1: payon here case 2: prontera here case 3: alberta here } Just do which ever will look cleaner and easier to follow, I'd pick the combo with switch if it was me though That solved a lot of things for me. Thanks. How to switch with NPC id? Quote
Question
bearnope246
The title said it. Is this possible?
5 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.