Is this possible? Help pls ~Yes sir, even if im not near the NPC (or im other maps/location)![]()
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;}
BUILDIN_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;}
Thanks Sir i will try this. Btw what script command that i will use?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;}tolet me know if you have any problems o:Code:BUILDIN_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;}
- script atcmd_joinchatroom -1,{OnInit: bindatcmd "joinchatroom",strnpcinfo(3)+"::OnAtcommand"; end;OnAtcommand: "what script command"; end;}
Ok ive got it.any o-o you can create a new one and input that code or throw it into a existent
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; }
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; }
We use essential cookies to make this site work, and optional cookies to enhance your experience.