Jump to content

Recommended Posts

Posted (edited)

I believe we should begin to have the script command "playertalk" imported into the SVN. Why? Well, there are instances that are being released by Gravity that requires the 'playertalk' command; such as Glast Heim Memorial (English: Glast Heim Memorial) and Sara's Memories Instance for example. (I currently didn't see any changes in the Trac regarding this if this was even implemented. If it was, disregard this topic).

//ADD playertalk. (credits: Karmic)
//======================================================

//script.c

// +/*==========================================
// +* playertalk (sends message to surrounding area)
// +*------------------------------------------*/
//+BUILDIN_FUNC(playertalk)
//+{
//+	int display_name;
//+  const char* message;
//+   char message_output[255];
//+   struct map_session_data *sd = script_rid2sd(st);
//+  
//+	display_name = script_getnum(st, 2);
//+	message = script_getstr(st, 3);
//+  
//+	if(display_name)
//+		sprintf(message_output, "%s: %s", sd->status.name, message);
//+	else
//+		sprintf(message_output, "%s", message);
//+  
//+	clif_disp_overhead(sd, message_output);
//+
//+	return 0;
//+}
// /*==========================================
//  * npctalk (sends message to surrounding area)
//  *------------------------------------------*/
// BUILDIN_FUNC(npctalk)
//
//
//
//
// BUILDIN_DEF(npctalk,"s"), // [Valaris]
// +BUILDIN_DEF(playertalk,"is"), // [Karmic]
// BUILDIN_DEF(mobcount,"ss"),

Might as well have it in the SVN before we start adding translated instances, no? (Per this topic)

What does everyone think?

Edited by Mysterious
  • Upvote 4
Posted

I agree, though should we put it in if we don't have those scripts in yet. I don't recall if any othing else is using playertalk that's in rathena yet

Posted

we got this...

unittalk getcharid(3),"Message";

refer unittalk

Wouldn't it be much simpler to just do:

playertalk(1,"Hello there!");

? It's much faster than typing out this:

unittalk getcharid(3),"Message";

I believe it would be more efficient.

Posted

The command you wrote was the same than message(), not unittalk().

I don't see a good reason to add it to be honest.

Yah but message() is this:

*message "<character name>","<message>";

That command will send a message to the chat window of the character specified

by name. The text will also appear above the head of that character. It will not

be seen by anyone else.

Where as for playertalk, the variable is different + the message appears in the box and outside and people can see it.

Posted

Yah but message() is this:

*message "<character name>","<message>";

That command will send a message to the chat window of the character specified

by name. The text will also appear above the head of that character. It will not

be seen by anyone else.

Where as for playertalk, the variable is different + the message appears in the box and outside and people can see it.

The variable is different ? It's not a valid argument for me.

Other people can't see message(), just the specify character.

The only valid reason is the message appear in the message box (don't know there was a packet just for a message over the head (and not in the dialog box)).

Posted

Yah but message() is this:

*message "<character name>","<message>";

That command will send a message to the chat window of the character specified

by name. The text will also appear above the head of that character. It will not

be seen by anyone else.

Where as for playertalk, the variable is different + the message appears in the box and outside and people can see it.

The variable is different ? It's not a valid argument for me.

Other people can't see message(), just the specify character.

The only valid reason is the message appear in the message box (don't know there was a packet just for a message over the head (and not in the dialog box)).

I agree. My argument wasn't really valid. Well, to really settle the debate, we need to find out what kRO uses in their instance; especially if we want to be co-related to them.

Posted

we got this...

unittalk getcharid(3),"Message";

refer unittalk

Wouldn't it be much simpler to just do:

playertalk(1,"Hello there!");

? It's much faster than typing out this:

unittalk getcharid(3),"Message";

I believe it would be more efficient.

You could always just do:

set o,getcharid(3);

unittalk(o,"Hello there!");

sleep2 1000;

unittalk(o,"How are you?");

...

Setting it to o was arbitrary, but the point still stands. The playertalk you're suggesting is just a subset of unittalk, or am I missing something here?

The command you wrote was the same than message(), not unittalk().

Doesn't clif_disp_overhead send the message to the surrounding area? Whereas the message script command uses clif_displaymessage.

Posted
The command you wrote was the same than message(), not unittalk().
Doesn't clif_disp_overhead send the message to the surrounding area? Whereas the message script command uses clif_displaymessage.

You're right.

I just read the latest line on clif.c (clif_send(...,SELF)) but didn't see the other packet send to the area just before :)

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...