![]() |
Npc Message
how can i make the npc server send out another message when the player pms it saying a word like "Nat Applacation"
|
Quote:
There's a function, onPM(), that is called when the player PMs the NPCServer. Fiddle around with the params, I think the first one is the account and the second one is the text. Using some crazy if-statements, you can find a way to check if the text is equal to something. Then, you can use the sendpm(text) function to send the reply. Note, this is serverside, yanno. |
If you are using GS1, instead of onPM(), use:
PHP Code:
|
In GS2, you'd have something pretty close to this:
PHP Code:
|
Just curious, is it possible to leave the account part blank?
|
Quote:
If so, I think you can probably do: PHP Code:
|
Quote:
PHP Code:
|
Quote:
("",message) |
Quote:
But then again, does it have to be nothing? |
|
Quote:
and as for the params, use all or none. also, adding variables there doesn't tell the function what to put where, it just gives names for things. the first variable will always be the first paramater, and the second variable will always be the second. Quote:
|
Quote:
PHP Code:
'key' is the key Memorize that Ashy. :P |
lol, I didn't know how to bypass a param. I guess the " " isn't a good idea then >_<.
|
what's the syntax for omPM() then?
|
try this (GS2):
PHP Code:
|
| All times are GMT +2. The time now is 10:10 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.