hakuren Posted August 21, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 12/02/11 Last Seen: November 6, 2023 Share Posted August 21, 2013 is this possible that waitingroom has a command script like OnJoin Player? With this command the npc will know that someone joined to chatroom ex. prontera,150,150,5<TAB>script<TAB>PARTYMASTER<TAB>932,{ waitingroom "TEST PARTY",10,"PARTYMASTER::OnComplete",9; end; OnComplete: announce "Completed",0; end; OnJoin: dispbottom "Welcome to Our Party!"; end; } i think this is src not a script Quote Link to comment Share on other sites More sharing options...
Emistry Posted August 21, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 3 hours ago Share Posted August 21, 2013 try this... src/map/chat.c#L163 clif_joinchatok(sd, cd); //To the person who newly joined the list of all clif_addchat(cd, sd); //Reports To the person who already in the chat clif_dispchat(cd, 0); //Reported number of changes to the people around chat_triggerevent(cd); //Event try add below... npc_event(sd, "::OnJoin", 0); i dunno if this will work or not ....just randomly pick ... Quote Link to comment Share on other sites More sharing options...
hakuren Posted August 21, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 12/02/11 Last Seen: November 6, 2023 Author Share Posted August 21, 2013 (edited) try this... src/map/chat.c#L163 clif_joinchatok(sd, cd); //To the person who newly joined the list of all clif_addchat(cd, sd); //Reports To the person who already in the chat clif_dispchat(cd, 0); //Reported number of changes to the people around chat_triggerevent(cd); //Event try add below... npc_event(sd, "::OnJoin", 0); i dunno if this will work or not ....just randomly pick ... nothings happen [edit]: it says [Error]: npc_event: event not found [::OnJoin] Edited August 21, 2013 by hakuren Quote Link to comment Share on other sites More sharing options...
Emistry Posted August 21, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 3 hours ago Share Posted August 21, 2013 erm..how about this... src/map/chat.c#L163 chat_triggerevent(cd); //Event mapreg_setreg( reference_uid(add_str("$@chat_newjoin"), j),sd->status.account_id ); // <-- add this... prontera,155,181,5 script Sample 757,{ end; OnInit: waitingroom "CHATROOM",20,strnpcinfo(0)+"::OnJoin"; end; OnJoin: attachrid( $@chat_newjoin ); announce "Welcome to this Chatroom",bc_self; end; } Quote Link to comment Share on other sites More sharing options...
hakuren Posted August 21, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 12/02/11 Last Seen: November 6, 2023 Author Share Posted August 21, 2013 erm..how about this... src/map/chat.c#L163 chat_triggerevent(cd); //Event mapreg_setreg( reference_uid(add_str("$@chat_newjoin"), j),sd->status.account_id ); // <-- add this... prontera,155,181,5 script Sample 757,{ end; OnInit: waitingroom "CHATROOM",20,strnpcinfo(0)+"::OnJoin"; end; OnJoin: attachrid( $@chat_newjoin ); announce "Welcome to this Chatroom",bc_self; end; } got error 1>h:\trunk\src\map\chat.c(164): warning C4013: 'mapreg_setreg' undefined; assuming extern returning int 1>h:\trunk\src\map\chat.c(164): warning C4013: 'reference_uid' undefined; assuming extern returning int 1>h:\trunk\src\map\chat.c(164): error C2065: 'j' : undeclared identifier Quote Link to comment Share on other sites More sharing options...
hakuren Posted August 22, 2013 Group: Members Topic Count: 120 Topics Per Day: 0.02 Content Count: 295 Reputation: 6 Joined: 12/02/11 Last Seen: November 6, 2023 Author Share Posted August 22, 2013 anyone is this possible? Quote Link to comment Share on other sites More sharing options...
Question
hakuren
is this possible that waitingroom has a command script like OnJoin Player?
With this command the npc will know that someone joined to chatroom
ex.
prontera,150,150,5<TAB>script<TAB>PARTYMASTER<TAB>932,{
waitingroom "TEST PARTY",10,"PARTYMASTER::OnComplete",9;
end;
OnComplete:
announce "Completed",0;
end;
OnJoin:
dispbottom "Welcome to Our Party!";
end;
}
i think this is src not a script
Link to comment
Share on other sites
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.