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 09-25-2010, 07:04 AM
darkcloud667 darkcloud667 is offline
That One Guy.
darkcloud667's Avatar
Join Date: Dec 2009
Location: Missouri
Posts: 40
darkcloud667 will become famous soon enough
sendPM, hows it work.

alright
heres the thing.
i have some stuff to do when i log onto npulse and i want it to PM me my task list whenever i log in to player.

i tried function onPlayerLogin, then a check for the account "if(player.account == "darkcloud667") { and then sendPM("Blah");
then closed it with 2 brackets n such.

its not working.
who can help troubleshoot and tell me why.

EDIT: im not a prostatus scripter, just an fyi xD
__________________
"Time is a great teacher, but unfortunately it kills all its pupils."

"Friendship is like peeing on yourself: everyone can see it, but only you get the warm feeling that it brings."

"The man who smiles when things go wrong has thought of someone to blame it on."
Reply With Quote
  #2  
Old 09-25-2010, 07:19 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Usage:

PHP Code:
function onCreated() {
  
findplayer("account").sendPM("MESSAGE!");

Common Example:

PHP Code:
// In Control-NPC
function onActionPlayerOnline() {
  
// Remove response from server if PMed
  
setpm("");
  
// Send PM to player
  
player.sendpm("Welcome to " getservername() @ "!");

__________________
Quote:
Reply With Quote
  #3  
Old 09-25-2010, 10:55 PM
darkcloud667 darkcloud667 is offline
That One Guy.
darkcloud667's Avatar
Join Date: Dec 2009
Location: Missouri
Posts: 40
darkcloud667 will become famous soon enough
is it possible to make it only to where it PMs it when only myself logs on instead of someone else?
__________________
"Time is a great teacher, but unfortunately it kills all its pupils."

"Friendship is like peeing on yourself: everyone can see it, but only you get the warm feeling that it brings."

"The man who smiles when things go wrong has thought of someone to blame it on."
Reply With Quote
  #4  
Old 09-26-2010, 12:19 AM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
Quote:
Originally Posted by darkcloud667 View Post
is it possible to make it only to where it PMs it when only myself logs on instead of someone else?
could have a weapon somewhere with just

PHP Code:
function onPlayerLogin(pl){
  if(
pl.communityname == "darkcloud667"){
    
pl.sendpm("to do list in here");
  }

Reply With Quote
  #5  
Old 09-26-2010, 03:01 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 Mark Sir Link View Post
could have a weapon somewhere with just

PHP Code:
function onPlayerLogin(pl){
  if(
pl.communityname == "darkcloud667"){
    
pl.sendpm("to do list in here");
  }

It's better to put all login **** in the Control-NPC so you can easily find it later.
__________________
Reply With Quote
  #6  
Old 09-26-2010, 03:26 AM
darkcloud667 darkcloud667 is offline
That One Guy.
darkcloud667's Avatar
Join Date: Dec 2009
Location: Missouri
Posts: 40
darkcloud667 will become famous soon enough
thanks for your help guys, got it to work.
__________________
"Time is a great teacher, but unfortunately it kills all its pupils."

"Friendship is like peeing on yourself: everyone can see it, but only you get the warm feeling that it brings."

"The man who smiles when things go wrong has thought of someone to blame it on."
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 08:01 PM.


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