kyeme 71 Posted March 19, 2013 I would like to request script commands that can make me automatically join in chatrooms if i use this command. example : joinwaitingroom <npc name> Thanks in advance! Quote Share this post Link to post Share on other sites
0 Ind 945 Posted March 22, 2013 what if you're not near the chat room in question o-o even so? Quote Share this post Link to post Share on other sites
0 kyeme 71 Posted March 22, 2013 (edited) Yes sir, even if im not near the NPC (or im other maps/location) Edited March 22, 2013 by kyeme Quote Share this post Link to post Share on other sites
0 kyeme 71 Posted March 31, 2013 Yes sir, even if im not near the NPC (or im other maps/location) Is this possible? Help pls ~ Quote Share this post Link to post Share on other sites
0 Ind 945 Posted March 31, 2013 yes totally possible o-o like uh i'll show a example editing a existent command oo (didnt test btw) BUILDIN_FUNC(delwaitingroom){ struct npc_data* nd; if( script_hasdata(st,2) ) nd = npc_name2id(script_getstr(st, 2)); else nd = (struct npc_data *)map_id2bl(st->oid); if( nd != NULL ) chat_deletenpcchat(nd); return 0;}toBUILDIN_FUNC(delwaitingroom){ struct npc_data* nd;TBL_PC *sd = script_rid2sd(st); if( script_hasdata(st,2) ) /* string is npc name that holds the chat */ nd = npc_name2id(script_getstr(st, 2)); else /* assume the chat room is in this invoking npc */ nd = (struct npc_data *)map_id2bl(st->oid); if( nd != NULL && nd->chat_id ) {chat_joinchat(sd, nd->chat_id, NULL);} return 0;}let me know if you have any problems o: 1 kyeme reacted to this Quote Share this post Link to post Share on other sites
0 kyeme 71 Posted March 31, 2013 (edited) yes totally possible o-o like uh i'll show a example editing a existent command oo (didnt test btw) BUILDIN_FUNC(delwaitingroom){ struct npc_data* nd; if( script_hasdata(st,2) ) nd = npc_name2id(script_getstr(st, 2)); else nd = (struct npc_data *)map_id2bl(st->oid); if( nd != NULL ) chat_deletenpcchat(nd); return 0;}toBUILDIN_FUNC(delwaitingroom){ struct npc_data* nd;TBL_PC *sd = script_rid2sd(st); if( script_hasdata(st,2) ) /* string is npc name that holds the chat */ nd = npc_name2id(script_getstr(st, 2)); else /* assume the chat room is in this invoking npc */ nd = (struct npc_data *)map_id2bl(st->oid); if( nd != NULL && nd->chat_id ) {chat_joinchat(sd, nd->chat_id, NULL);} return 0;}let me know if you have any problems o: Thanks Sir i will try this. Btw what script command that i will use? My sample: - script atcmd_joinchatroom -1,{OnInit: bindatcmd "joinchatroom",strnpcinfo(3)+"::OnAtcommand"; end;OnAtcommand: "what script command"; end;} Edited March 31, 2013 by kyeme Quote Share this post Link to post Share on other sites
0 Ind 945 Posted March 31, 2013 any o-o you can create a new one and input that code or throw it into a existent Quote Share this post Link to post Share on other sites
0 kyeme 71 Posted March 31, 2013 (edited) any o-o you can create a new one and input that code or throw it into a existent Ok ive got it. Sir in the BUILDIN_DEF(waitingroom,"si?????"),BUILDIN_DEF(delwaitingroom,"?"), Mine is joinwaitingroom, I dont know what to put here.. xD Edited March 31, 2013 by kyeme Quote Share this post Link to post Share on other sites
0 Ind 945 Posted March 31, 2013 uhm BUILDIN_DEF(joinwaitingroom,"?"),should work o-o i think 1 kyeme reacted to this Quote Share this post Link to post Share on other sites
0 kyeme 71 Posted March 31, 2013 Its work! Thanks a lot xD Quote Share this post Link to post Share on other sites
0 kyeme 71 Posted March 31, 2013 JHmmm, Sir i have a problem, when im in other maps it say "The room is already full" Quote Share this post Link to post Share on other sites
0 Ind 945 Posted March 31, 2013 ahh in chat.c find if( cd == NULL || cd->bl.type != BL_CHAT || cd->bl.m != sd->bl.m || sd->state.vending || sd->state.buyingstore || sd->chatID || ((cd->owner->type == BL_NPC) ? cd->users+1 : cd->users) >= cd->limit ) { clif->joinchatfail(sd,0); return 0; }replace with if( cd == NULL || cd->bl.type != BL_CHAT || sd->state.vending || sd->state.buyingstore || sd->chatID || ((cd->owner->type == BL_NPC) ? cd->users+1 : cd->users) >= cd->limit ) { clif->joinchatfail(sd,0); return 0; } Quote Share this post Link to post Share on other sites
0 kyeme 71 Posted March 31, 2013 And when im away from the NPC, the commands are working but i dont have a chatroom box. Sorry for late post. Quote Share this post Link to post Share on other sites
0 Ind 945 Posted March 31, 2013 aaaah i see why ._. well this just got complicated Xd would need to make the command spawn a fake chatroom in player sight in order for it to be fully functional and doing that is quite troublesome :| mhmm Quote Share this post Link to post Share on other sites
0 Ind 945 Posted March 31, 2013 i think i thought of some lazy but fast way to go around the issue o-o moving the chat rooms source npc quickly to the players sight, open the chatroom and move it back to its original location D: would that be acceptable? Quote Share this post Link to post Share on other sites
0 kyeme 71 Posted March 31, 2013 (edited) Nice idea, . . how can i do that.. What script commands.. xD Oppss im requesting too much. Sorry.. Request Solved xD Thanks for the help Sir Ind! Edited January 6, 2014 by Mhalicot Quote Share this post Link to post Share on other sites
0 Ind 945 Posted March 31, 2013 the movenpc command for some reason is restricted to the same map the npc is in o__O hu well its sort of late for me D:~ i'll think of something as i sleep +__+ Quote Share this post Link to post Share on other sites
I would like to request script commands that can make me automatically join in chatrooms if i use this command.
example : joinwaitingroom <npc name>
Thanks in advance!
Share this post
Link to post
Share on other sites