Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Pming the npc server. (https://forums.graalonline.com/forums/showthread.php?t=42705)

adam 02-12-2003 09:13 PM

Pming the npc server.
 
Is there not an event that is triggered when the npc server recieves a pm? And perhaps params that say the message and who sent it. And dare I say, a way to change the default message.

I can't find any of this. If any of you know please tell me. :-(

Somehow I think there is a way, but im not sure.

osrs 02-12-2003 09:27 PM

Using setpm,you are allowed to change the message of the NPC-Server,but the original message 'I'm the NPC-Server..blablabla' wont back.

Quote:

setpm;
if(pm){
sendpm Welcome to 'Playerworld' #n!;
}
or

Quote:

if(actionplayeronline){
sendpm Welcome #n!;
}
  • if(pm) means if you send a pm to NPC-Server.
  • if(actionplayeronline) means if you entered the server.
  • #n means your nickname.


Edit:These scripts must be added at Control-NPC.

adam 02-12-2003 10:16 PM

Quote:

Originally posted by osrs
Using setpm,you are allowed to change the message of the NPC-Server,but the original message 'I'm the NPC-Server..blablabla' wont back.



or


  • if(pm) means if you send a pm to NPC-Server.
  • if(actionplayeronline) means if you entered the server.
  • #n means your nickname.


Edit:These scripts must be added at Control-NPC.


Well, I haven't gotten if (pm) to work. if I pm it. nothing inside if (pm) runs. It is serverside, it is in the control npc.

The rest of that stuff I knew already.

Python523 02-13-2003 12:40 AM

do
setpm;
if(pm) sendpm test;
and reset the Control-NPC

adam 02-13-2003 07:02 AM

Quote:

Originally posted by Python523
do
setpm;
if(pm) sendpm test;
and reset the Control-NPC

Thanx, it works. but now im being warned about it lagging for no reason becouse of that. >.< I don't get it. Aw well.

#p(1) seems to be the message,

but there doesn't seem to be a #p(0)

why not put setpm; inside if (created) { } so it doesn't run all the time. >.<

Python523 02-13-2003 11:52 PM

Quote:

Originally posted by adam


Thanx, it works. but now im being warned about it lagging for no reason becouse of that. >.< I don't get it. Aw well.

#p(1) seems to be the message,

but there doesn't seem to be a #p(0)

why not put setpm; inside if (created) { } so it doesn't run all the time. >.<

#p(0) would be the advertisement URL (currently empty), and #p(1) is only the first line

middo 03-02-2003 02:22 AM

its not working for me!
The npc server just keeps sending the same PM i programmed it to by using setpm [message];

i tried
if (pm) sendpm test;
-reset npc server
NOTHING
its not working!
someonme please help!

Knuckles 03-02-2003 02:55 AM

Quote:

its not working for me!
The npc server just keeps sending the same PM i programmed it to by using setpm [message];

i tried
if (pm) sendpm test;
-reset npc server
NOTHING
its not working!
someonme please help!
Are you putting your script inside the control NPC?
And your missing: setpm;

NPC Code:

setpm;
if (pm) sendpm Hey#K(44) i'r an uber NPC Server!;



#K(44) is just a comma.


All times are GMT +2. The time now is 01:04 AM.

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