Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #16  
Old 03-06-2006, 02:29 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Stefan
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.
I mean like clientside scripts where the player is always accessible. Like instead of having to type
toguild: toall:, maybe if you typed "//tg" it would replace itself with "toguild:" or "//ta" would replace itself with "toall:"

perhaps having like "//sa" for showadmins. I mean like typing shortcuts.

"/account/ message" to send a PM to account.

It would be a good feature if you could send a PM through the chat bar from the selected players on the playerlist.
Reply With Quote
  #17  
Old 03-06-2006, 02:32 AM
Maniaman Maniaman is offline
Registered User
Join Date: Aug 2005
Posts: 326
Maniaman is on a distinguished road
Quote:
Originally Posted by Stefan
If it's possible to manipulate the default chatbar then we will need to add a protection against that.


If you are going to add protection, atleast allow us to edit its profile, x, y, width, height. I have done this on Maloria Dev if you have a certain NPC. Makes it much nicer, and lets it 'blend in' with the server better.
__________________

Current Maloria Event: (click to go to it)
Reply With Quote
  #18  
Old 03-06-2006, 03:45 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
Just script your own chat bar.. its not that hard.

Stefan, you just need to make it so that you can disable default chat.

ChatBar.destroy() works but returns this error when the player first presses tab and the bar is destroyed:
NPC Code:

GraalScript: Function setSelection not found in script of StartScript_GraalGui
GraalScript: Function makeFirstResponder not found in script of StartScript_GraalGui

Reply With Quote
  #19  
Old 03-06-2006, 03:51 AM
Maniaman Maniaman is offline
Registered User
Join Date: Aug 2005
Posts: 326
Maniaman is on a distinguished road
Quote:
Originally Posted by Warcaptain
Just script your own chat bar.. its not that hard.
That could be done, but why do it when there is already one. I can see rescirpting it if you want a bunch of fancy new features, but just for changing the look of it, I see no reason to script a new one.
__________________

Current Maloria Event: (click to go to it)
Reply With Quote
  #20  
Old 03-06-2006, 04:45 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
Then possibly Stefan simply meant to make ChatBar.text read only?

I agree that there is no reason to make it entirely read only.
Reply With Quote
  #21  
Old 03-06-2006, 02:54 PM
Ajira Ajira is offline
Poont.
Join Date: Oct 2004
Location: NY, USA
Posts: 477
Ajira is on a distinguished road
Quote:
Originally Posted by Warcaptain
this is a false statement :-x
No it's not. You just need a GuiPMEditCtrl.
__________________
Liek omigosh.

Reply With Quote
  #22  
Old 03-06-2006, 03:42 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Hrm, if Stefan makes it so the chat bar cannot be edited, that will screw Thamhic's chat system right over :| It sets the ChatBar text to NULL when a player users a command, or sends a toguild, so that they can have privacy when doing these things.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #23  
Old 03-06-2006, 08:08 PM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
Quote:
Originally Posted by Ajira
No it's not. You just need a GuiPMEditCtrl.
Quote:
Originally Posted by Ajira
zzz
When done from the clientside, it's like you're sending the PM.
I'm going to experiment using this.
You were saying it would work with just sendpm clientside.

GuiPMEditCtrl's cant edit text, like jake13jake wanted.
Reply With Quote
  #24  
Old 03-07-2006, 01:50 AM
Ajira Ajira is offline
Poont.
Join Date: Oct 2004
Location: NY, USA
Posts: 477
Ajira is on a distinguished road
Quote:
Originally Posted by Warcaptain
You were saying it would work with just sendpm clientside.

GuiPMEditCtrl's cant edit text, like jake13jake wanted.
It might have been implied at first, but I never actually said it.
__________________
Liek omigosh.

Reply With Quote
  #25  
Old 03-07-2006, 02:16 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Warcaptain
You were saying it would work with just sendpm clientside.

GuiPMEditCtrl's cant edit text, like jake13jake wanted.
Well, I don't really need the ability to edit the text if the client can just edit what they have to type to send a toall or toguild, etc. It can probably be said that communication is the biggest glue graal has right now, might as well enhance it.

like... perhaps in Options have preferences for that.
toall="toall:" or toall="ta:"
toguild="toguild:" or toguild="//"
pm=":"@ACCOUNT@":"
macro_selectedlistplayers="<>"

like... just being able to edit that stuff and make macros, perhaps also letting the server add to defined macros that are unique to the server (In the same sense that I'm arguing to do with additional keycodes).
Another good macro would be
Owner of last PM received
Owner of last toall received
Owner of last toguild received
All members of some guild that are online
Reply With Quote
  #26  
Old 03-11-2006, 03:10 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by jake13jake
Well, I don't really need the ability to edit the text if the client can just edit what they have to type to send a toall or toguild, etc. It can probably be said that communication is the biggest glue graal has right now, might as well enhance it.

like... perhaps in Options have preferences for that.
toall="toall:" or toall="ta:"
toguild="toguild:" or toguild="//"
pm=":"@ACCOUNT@":"
macro_selectedlistplayers="<>"

like... just being able to edit that stuff and make macros, perhaps also letting the server add to defined macros that are unique to the server (In the same sense that I'm arguing to do with additional keycodes).
Another good macro would be
Owner of last PM received
Owner of last toall received
Owner of last toguild received
All members of some guild that are online
it's extremely easy to implement those shortcuts for toall and toguilds and such.

PHP Code:
function ChatBar.onAction(text) {
  if(
text.starts("//")) {
    
ChatBar.setText("toguild: " text.substring(2,-1).trim());
  } 
// etc

__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #27  
Old 03-11-2006, 03:36 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Unless you're like me and haven't looked into GUI elements yet. However, it would still be a very good feature to be built into the client.

Quote:
Originally Posted by ApothiX
it's extremely easy to implement those shortcuts for toall and toguilds and such.

PHP Code:
function ChatBar.onAction(text) {
  if(
text.starts("//")) {
    
ChatBar.setText("toguild: " text.substring(2,-1).trim());
  } 
// etc

Reply With Quote
  #28  
Old 03-11-2006, 06:22 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
Quote:
Originally Posted by jake13jake
Unless you're like me and haven't looked into GUI elements yet.
That's the beauty of it, I just showed you how.

Quote:
Originally Posted by jake13jake
However, it would still be a very good feature to be built into the client.
Not really, because some scripts that are already created rely on the fact that toguild: and toall: are used.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #29  
Old 03-12-2006, 12:27 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by ApothiX
That's the beauty of it, I just showed you how.

Not really, because some scripts that are already created rely on the fact that toguild: and toall: are used.
That's the beauty of find/replace (all)
Reply With Quote
  #30  
Old 03-12-2006, 01:33 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
I have a question relating to this:

Is there a way to check if a PM is recieved from a certain player? Any player?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:29 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.