Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-06-2007, 04:19 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Showing the PM window from a script

I've been trying to open a PM window from a script (similar to what Zodiac has), but i'm stumped - The only function I can find is showpm(object), but I don't know how to implement this.

Any ideas?
__________________
What signature? I see no signature?
Reply With Quote
  #2  
Old 05-06-2007, 06:51 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
I think its something like:

PHP Code:
("-Playerlist").openPMWindow(); 
Not sure though

Last edited by Rapidwolve; 05-06-2007 at 07:19 PM..
Reply With Quote
  #3  
Old 05-09-2007, 12:13 AM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
I found it.

PHP Code:
isMassMessage false;
pl findPlayer("godofwarares");

(@ 
"-Playerlist").openPmWindow({pl}, isMassMessage); 
__________________
What signature? I see no signature?
Reply With Quote
  #4  
Old 05-09-2007, 03:16 AM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
Unless I am confused.. here are the ways to check information / read pms etc.

PHP Code:
// Read PM
findPlayer("ACCOUNT").openexternalpm(bool);

// false -> open a blank pm window
// true ->  open a pm sent by a player defined by 'account'

// List of pms sent to F2 Window
for (temp.var : allplayers)
{
  if (!
temp.var.pmswaiting()) continue;
  
  echo(
format("%s -> %s"temp.var.account, (temp.var.isadmin "Admin" temp.var.isguildpm() ? "Guild" temp.var.ismasspm() ? "Mass" "Regular")));

Hopefully that could help in some way.
__________________
- Zidane / Zidaya
Reply With Quote
  #5  
Old 05-09-2007, 03:25 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Never even heard of that function...
Reply With Quote
  #6  
Old 05-09-2007, 03:29 AM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
Then I am glad I somewhat helped you guys =)
__________________
- Zidane / Zidaya
Reply With Quote
  #7  
Old 05-09-2007, 10:02 AM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
(@ "-Playerlist")..... can be changed into just "-Playerlist".function();
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #8  
Old 05-09-2007, 02:05 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by contiga View Post
(@ "-Playerlist")..... can be changed into just "-Playerlist".function();
I do not see the benefit.

(@ "-Playerlist").function() makes it entirely clear that you are working with the -Playerlist object.

"-Playerlist".function() makes it look like you are performing a function on the string itself, which could be confusing to some people, especially if they have used other scripting languages where that syntax would mean you are always performing functions on the string.
__________________
Skyld
Reply With Quote
  #9  
Old 05-10-2007, 12:28 AM
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 Skyld View Post
I do not see the benefit.

(@ "-Playerlist").function() makes it entirely clear that you are working with the -Playerlist object.

"-Playerlist".function() makes it look like you are performing a function on the string itself, which could be confusing to some people, especially if they have used other scripting languages where that syntax would mean you are always performing functions on the string.
I second that.

Also,
temp.i = findWeapon( "-Playerlist" );
temp.i.function();
__________________
Reply With Quote
  #10  
Old 05-10-2007, 12:37 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
findweapon and findnpc are worthless functions in an OO environment =/. I guess they could be used for self-documenting reasons but otherwise unneccessary.
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 12:05 AM.


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