SphereCommunity
Player messaging - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Submissions (/Forum-Script-Submissions)
+--- Thread: Player messaging (/Thread-Player-messaging)



Player messaging - Ultima One - 05-16-2013 01:02 AM

Time to share some scripts we use frequently on TUP. Some may be in need of updating.

This script lets you leave a message for an AFK player. Or allows you to send them a message without using 'party' or speaking out loud. You will get a notification when they have closed the message, so you can be sure they have read it Smile

Use: .msg - target player.

Code:
[FUNCTION msg]
TARGETF msg_tgt
SRC.SYSMESSAGE Which player to you wish to send the message to?

[FUNCTION msg_tgt]
ctag.msg_txt_to=<argo.uid>
IF (<UID.<ARGO.UID>.FINDID.m_afk_permit.UID>)
   DIALOG msg_txt_legal
ELSE
   DIALOG msg_txt
ENDIF

[DIALOG msg_txt]
200,200
resizepic 0 0 3600 330 300
page 0
dtext 20 20 1152 Enter your message for <uid.<ctag.msg_txt_to>.name>
gumppictiled 40 52 250 180 3004
dtextentry  40 52 250 180 0 0
button 120 260 249 248 1 0 1 //okay
button 210 260 243 241 1 0 2 //cancel

[DIALOG msg_txt button]
ON=0
src.sysmessage <ctag.msg_txt_to>
src.ctag.msg_txt_to=
ctag.receiver=
SRC.SYSMESSAGE Function cancelled
RETURN 1

on=1
TRYSRC <ctag.msg_txt_to> src.tag.msg=<argtxt[0]>
TRYSRC <ctag.msg_txt_to> src.tag.sender=<uid>
TRYSRC <ctag.msg_txt_to> src.tag.pending=1
TRYSRC <ctag.msg_txt_to> dialog d_message_display
    SRC.SYSMESSAGE @07a1 Message sent!
TRYSRC <ctag.msg_txt_to>
    RETURN 1
src.ctag.msg_txt_to=

ON=2
src.sysmessage <ctag.msg_txt_to>
src.ctag.msg_txt_to=
ctag.receiver=
SRC.SYSMESSAGE Function cancelled
RETURN 1