Jump to content
  • 0

is this possible about waitingroom


hakuren

Question


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

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


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  

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 ...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

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 by hakuren
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2369
  • Joined:  10/28/11
  • Last Seen:  

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;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.02
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

anyone is this possible?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...