Requesting joinwaitingroom <3

kyeme

High Council
Messages
500
Points
0
Github
kyeme
Emulator
I would like to request script commands that can make me automatically join in chatrooms if i use this command.

example : joinwaitingroom &lt;npc name&gt;

Thanks in advance!
default_smile.png


 
what if you're not near the chat room in question o-o even so?

 
Yes sir, even if im not near the NPC (or im other maps/location)
default_smile.png


 
Last edited by a moderator:
yes totally possible o-o like uh i'll show a example editing a existent command oo (didnt test btw)

Code:
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-&gt;oid);	if( nd != NULL )		chat_deletenpcchat(nd);	return 0;}
to
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-&gt;oid);	if( nd != NULL &amp;&amp; nd-&gt;chat_id ) {chat_joinchat(sd, nd-&gt;chat_id, NULL);}	return 0;}
let me know if you have any problems o:
 
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-&gt;oid); if( nd != NULL ) chat_deletenpcchat(nd); return 0;}to
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-&gt;oid);	if( nd != NULL &amp;&amp; nd-&gt;chat_id ) {chat_joinchat(sd, nd-&gt;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:

Code:
-	script	atcmd_joinchatroom	-1,{OnInit:	bindatcmd "joinchatroom",strnpcinfo(3)+"::OnAtcommand";	end;OnAtcommand:	"what script command";	end;} 
 
Last edited by a moderator:
any o-o you can create a new one and input that code or throw it into a existent

 
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

 
Last edited by a moderator:
uhm

Code:
BUILDIN_DEF(joinwaitingroom,"?"),
should work o-o i think
 
JHmmm, Sir i have a problem, when im in other maps it say "The room is already full" 
default_sad.png


 
ahh in chat.c find

Code:
	if( cd == NULL || cd-&gt;bl.type != BL_CHAT || cd-&gt;bl.m != sd-&gt;bl.m || sd-&gt;state.vending || sd-&gt;state.buyingstore || sd-&gt;chatID || ((cd-&gt;owner-&gt;type == BL_NPC) ? cd-&gt;users+1 : cd-&gt;users) &gt;= cd-&gt;limit )	{		clif-&gt;joinchatfail(sd,0);		return 0;	}
replace with
Code:
	if( cd == NULL || cd-&gt;bl.type != BL_CHAT || sd-&gt;state.vending || sd-&gt;state.buyingstore || sd-&gt;chatID || ((cd-&gt;owner-&gt;type == BL_NPC) ? cd-&gt;users+1 : cd-&gt;users) &gt;= cd-&gt;limit )	{		clif-&gt;joinchatfail(sd,0);		return 0;	}
 
And when im away from the NPC, the commands are working but i dont have a chatroom box.

Sorry for late post.

 
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

 
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?

 
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!
default_smile.png


 
Last edited by a moderator:
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 +__+

 
Last edited by a moderator:
Back
Top