Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-14-2007, 03:19 AM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
PMs, Masses, and Staff PMs

How would I be able to scrip stuff like this? As in, being able to tell if the person has recieved one.
Is there like havemass, havepms, have staffmsgs... what's the flag?

BTW, inspiration from Crow
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #2  
Old 12-14-2007, 10:23 PM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
For staff messages:

PHP Code:
//#CLIENTSIDE
function onWhatever() {
  for (
plallplayers) {
    if (
pl.pmswaiting()) {
      
//check if pl.account is wearing a staff tag
    
}
  }

__________________
Reply With Quote
  #3  
Old 12-14-2007, 10:32 PM
gemini2 gemini2 is offline
Fincayran Loser
gemini2's Avatar
Join Date: Jun 2007
Location: Georgia
Posts: 174
gemini2 is on a distinguished road
Send a message via AIM to gemini2 Send a message via MSN to gemini2
PHP Code:
temp.findplayer("gemini2");
if (
p.pmswaiting()) {
  if (
p.isguildpm()) {
    
// GUILD PM
  
}else if (p.ismasspm()) {
    
// MASS PM
  
}
  
// etc.






Quote:
Originally Posted by Googi View Post
For staff messages:

PHP Code:
//#CLIENTSIDE
function onWhatever() {
  for (
plallplayers) {
    if (
pl.pmswaiting()) {
      
//check if pl.account is wearing a staff tag
    
}
  }

From what I see, that will check every players on the server if they have a pm on wait :O
__________________
Quote:
Originally Posted by Crystia RC
*Angelu: i said the tuba isnt fitting
Oinkness: well use some lube
Quote:
Originally Posted by Angelu View Post
for me the hole is to big and its a way to thin :O
Reply With Quote
  #4  
Old 12-14-2007, 10:40 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
thanks. Now, how would I be able to check who sent the PM?
And yes Crow, I'm trying to finish that system you made. I like it :i
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #5  
Old 12-14-2007, 10:42 PM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Quote:
Originally Posted by gemini2 View Post
From what I see, that will check every players on the server if they have a pm on wait :O
I assumed that was the idea. Of course you can just use findplayer if you know specifically who you want to check.

EDIT: I think I may have misread your statement. Were you asking if it checks every player to see if they have PMs waiting or checks to see if there are PMs waiting from each player? I think (since this is clientside) it checks to see if there are PMs waiting from each player.

Quote:
Originally Posted by Switch View Post
thanks. Now, how would I be able to check who sent the PM?
In this context isn't var.account the account of the person who sent the pm? I'm pretty sure Stefan said that it was...
__________________

Last edited by Googi; 12-14-2007 at 10:55 PM..
Reply With Quote
  #6  
Old 12-14-2007, 11:11 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Googi View Post
I assumed that was the idea. Of course you can just use findplayer if you know specifically who you want to check.

EDIT: I think I may have misread your statement. Were you asking if it checks every player to see if they have PMs waiting or checks to see if there are PMs waiting from each player? I think (since this is clientside) it checks to see if there are PMs waiting from each player.



In this context isn't var.account the account of the person who sent the pm? I'm pretty sure Stefan said that it was...
What do you mean by var.account?

PHP Code:
for ( temp.allplayers )
{
  if ( 
temp.a.PMsWaiting() )
  {
    
// Gah
  
}

Would not something like that work?
__________________
Reply With Quote
  #7  
Old 12-14-2007, 11:22 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
I want to make it so the person RECIEVING the PM knows who sent it. Already have the Message system worked so it can display in bottom left. I need to know how to find the person who sent it and be able to see who did on the reciever's screen.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #8  
Old 12-14-2007, 11:41 PM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Quote:
Originally Posted by cbkbud View Post
What do you mean by var.account?
p.account, pl.account, etc.
__________________
Reply With Quote
  #9  
Old 12-15-2007, 06:09 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Ok now can someone help with this:

PHP Code:
//#CLIENTSIDE
function onCreated()
  
onTimeOut();
  
function 
onTimeOut() {
  
player.chat player.account.pmswaiting() @ " has sent you a PM";
  
setTimer(.05);

Can someone tell me how to make it so FIRST it checks if the player has a message, THEN it checks if it's a Guild Message, Staff Message, PM, or Mass. It's confuszling me.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #10  
Old 12-15-2007, 06:37 PM
gemini2 gemini2 is offline
Fincayran Loser
gemini2's Avatar
Join Date: Jun 2007
Location: Georgia
Posts: 174
gemini2 is on a distinguished road
Send a message via AIM to gemini2 Send a message via MSN to gemini2
Quote:
Originally Posted by Switch View Post
Ok now can someone help with this:

PHP Code:
//#CLIENTSIDE
function onCreated()
  
onTimeOut();
  
function 
onTimeOut() {
  
player.chat player.account.pmswaiting() @ " has sent you a PM";
  
setTimer(.05);

Can someone tell me how to make it so FIRST it checks if the player has a message, THEN it checks if it's a Guild Message, Staff Message, PM, or Mass. It's confuszling me.
PHP Code:
function onCreated()
  
setTimer(0.05);

function 
onTimeout() {
  if (
player.pmswaiting()) {
    if (
player.isguildpm()) {
      
// GUILD PM
    
}else if (player.ismasspm()) {
      
// MASS PM
    

  }
  
setTimer(0.1);

__________________
Quote:
Originally Posted by Crystia RC
*Angelu: i said the tuba isnt fitting
Oinkness: well use some lube
Quote:
Originally Posted by Angelu View Post
for me the hole is to big and its a way to thin :O
Reply With Quote
  #11  
Old 12-15-2007, 07:02 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
PHP Code:
//#CLIENTSIDE
function onCreated()
  
setTimer(.05);
  
function 
onTimeOut() {
  if (
player.ismasspm()) {
    
player.chat "1";
  }
  
setTimer(.05);

Won't make you say "1"...
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.

Last edited by Switch; 12-15-2007 at 07:13 PM..
Reply With Quote
  #12  
Old 12-15-2007, 07:13 PM
gemini2 gemini2 is offline
Fincayran Loser
gemini2's Avatar
Join Date: Jun 2007
Location: Georgia
Posts: 174
gemini2 is on a distinguished road
Send a message via AIM to gemini2 Send a message via MSN to gemini2
Quote:
Originally Posted by Switch View Post
PHP Code:
//#CLIENTSIDE
function onCreated()
  
setTimer(.05);
  
function 
onTimeOut() {
  if (
player.ismasspm()) {
    
player.chat "1";
  }
  
setTimer(.05);

Won't make you say "1"...
there, fixed it in the quote, PS: player.ismasspm()

Edit: Well, oddly it doesn't seem to work..
they are listed @ http://wiki.graal.net/index.php/Crea...side_Functions

PHP Code:

TServerPlayer

  isguildpm
() - returns boolean
  ismasspm
() - returns boolean
  openexternalhistory
() - returns boolean
  openexternalpm
(bool) - returns boolean
  pmswaiting
() - returns boolean
  showprofile
() 
__________________
Quote:
Originally Posted by Crystia RC
*Angelu: i said the tuba isnt fitting
Oinkness: well use some lube
Quote:
Originally Posted by Angelu View Post
for me the hole is to big and its a way to thin :O

Last edited by gemini2; 12-15-2007 at 07:31 PM..
Reply With Quote
  #13  
Old 12-15-2007, 07:29 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
It was already like that, I just pasted it wrong at first. But it still won't work.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
Reply


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 10:49 PM.


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