![]() |
Sending PMs by script? Editing player chat bar?
Okay, I have a few ideas to improve how players communicate to each other that I'd like to let the players on Classic have access to.
My questions are: 1. How do you send a pm/guild/mass message by script? 2. Are there any event handlers in the chat bar that would allow direct editing to the chat bar? (if there aren't this is going straight to future improvements) |
PM: sendpm("text");
You can edit the GFX of the chatbar. |
Quote:
2. I mean... editing the chat text as it's being typed... like if the player types << change it to <addhere< as the player types it. |
Quote:
So, just use with (findplayer(params[0])){ sendpm("Hello" SPC params[0] SPC "i love you!"); } |
Quote:
When done from the clientside, it's like you're sending the PM. I'm going to experiment using this. |
You're not understanding.
One player PMs another player. The PM comes from the other player Script function to send PM from one player to the other player is what I'm asking about. |
Quote:
|
When sendpm is used on the clientside, it is sending a pm from the current player.
The Chatbar is a GuiTextEditCtrl. It's name is ChatBar. So for example, you can change its x by doing ChatBar.x = 8675309; Changing profile: ChatBar.profile = "GuiBlueTextEditProfile"; |
What functions did the V3 PlayerList use for PMs?
|
Quote:
PHP Code:
|
http://wiki.graal.us/Script_Functions:_Client
GuiPMEditCtrl (GuiMLTextEditCtrl): sendmasspm(obj) sendpm(obj) GuiPMCtrl (GuiMLTextCtrl): showpm(obj) GuiPMHistoryCtrl (GuiMLTextCtrl): showhistory(obj) isguildpm() - returns boolean ismasspm() - returns boolean pmswaiting() - returns boolean Hmm? |
Quote:
|
Quote:
Edit: Okay so this interested me as well. You must create a new GuiPMEditCtrl() with the profile of GuiMLTextEditProfile or something like that. Then the contents of the Ctrl will be sent by using the CtrlName.sendpm(findplayer("account")) function. The F2 window will then show the "PM Sent" text. |
Quote:
this is a false statement :-x |
If you want to send a pm directly to another client then you will need to use a GuiPMEditCtrl. This is to make sure the player is editing the text, scripts don't have access to the text of that Gui control.
If it's possible to manipulate the default chatbar then we will need to add a protection against that. It wouldn't be good if scripts could send PMs in the name of the player, or send chat messages in the name of the player. Sometimes security is better than functionality. There are also reasons why the scripted RC doesn't have the same functionality like external RC yet. |
All times are GMT +2. The time now is 01:40 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.