Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   sendPM, hows it work. (https://forums.graalonline.com/forums/showthread.php?t=134260619)

darkcloud667 09-25-2010 07:04 AM

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

fowlplay4 09-25-2010 07:19 AM

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() @ "!");



darkcloud667 09-25-2010 10:55 PM

is it possible to make it only to where it PMs it when only myself logs on instead of someone else?

Mark Sir Link 09-26-2010 12:19 AM

Quote:

Originally Posted by darkcloud667 (Post 1602372)
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");
  }



cbk1994 09-26-2010 03:01 AM

Quote:

Originally Posted by Mark Sir Link (Post 1602389)
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.

darkcloud667 09-26-2010 03:26 AM

thanks for your help guys, got it to work.


All times are GMT +2. The time now is 06:17 AM.

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