I'm currently having issue with character being stucked while talking to a NPC and suddenly clicking ESC key.
IDK if it's because of client problem(2013-12-23), because I tested it on 2015-11-04 client and when pressing ESC key the NPC dialogue doesn't disappear.
I'm currently facing the issue with the default warper(npc/custom/warper.txt) and default stylist(npc/custom/stylist.txt) without them being modifed.
ANYWAYS since I have googled several issues about this and found nothing that help me. I decided to just create a new command(using bindatcmd) that will make stucked characters get 'unstucked'. It's like @refresh but using warp command on the same coordinates and has cooldown. BUT since at my server, normal accounts(group id 0) cannot use atcommand while talking to a npc, I wanted to add something like allowing just a specific command(@refresh2 command to be specific) to be used while interacting at a npc but I can't do it on SRC.
I looked at atcommand.c and found this line under bool is_atcommand
//If cannot use atcomamnd while talking with NPC [Kichi]
if (type == 1 && sd->npc_id && sd->state.disable_atcommand_on_npc)
return false;
Question:
1) How can I make a specific command to be allowed while talking to a NPC?
2) What part of bool is_atcommand is the variable for the command used?
I tried it like this way but it's not working and it's showing compilation warnings
//If cannot use atcomamnd while talking with NPC [Kichi]
if (type == 1 && sd->npc_id && sd->state.disable_atcommand_on_npc && command != "refresh2")
return false;
Question
Technoken
I'm currently having issue with character being stucked while talking to a NPC and suddenly clicking ESC key.
IDK if it's because of client problem(2013-12-23), because I tested it on 2015-11-04 client and when pressing ESC key the NPC dialogue doesn't disappear.
I'm currently facing the issue with the default warper(npc/custom/warper.txt) and default stylist(npc/custom/stylist.txt) without them being modifed.
ANYWAYS since I have googled several issues about this and found nothing that help me. I decided to just create a new command(using bindatcmd) that will make stucked characters get 'unstucked'. It's like @refresh but using warp command on the same coordinates and has cooldown. BUT since at my server, normal accounts(group id 0) cannot use atcommand while talking to a npc, I wanted to add something like allowing just a specific command(@refresh2 command to be specific) to be used while interacting at a npc but I can't do it on SRC.
I looked at atcommand.c and found this line under bool is_atcommand
//If cannot use atcomamnd while talking with NPC [Kichi] if (type == 1 && sd->npc_id && sd->state.disable_atcommand_on_npc) return false;
Question:
1) How can I make a specific command to be allowed while talking to a NPC?
2) What part of bool is_atcommand is the variable for the command used?
I tried it like this way but it's not working and it's showing compilation warnings
//If cannot use atcomamnd while talking with NPC [Kichi] if (type == 1 && sd->npc_id && sd->state.disable_atcommand_on_npc && command != "refresh2") return false;
Maybe someone here can help me please. Thank you!
Edited by Technoken4 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.