Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   How To Password Protect? (https://forums.graalonline.com/forums/showthread.php?t=63072)

Drag999 12-30-2005 02:28 AM

How To Password Protect?
 
Does anyone know how to make so that if the player says a certain thing an NPC will dissapear? Please help!

excaliber7388 12-30-2005 02:45 AM

um try playerchats and strequals(#c,texthere) that's all i'll say ;)

Matt 12-30-2005 03:11 AM

I'm not exactly good with scripting, but you can try this.

NPC Code:
function onPlayerChats()
if (player.chat == "texthere")
hide;


ZeLpH_MyStiK 12-30-2005 03:25 AM

Quote:

Originally Posted by Drag999
Does anyone know how to make so that if the player says a certain thing an NPC will dissapear? Please help!

I think a little common sense and commands.rtf are adequate enough to answer this question.

excaliber7388 12-30-2005 05:57 AM

copy + paste=bad
please try to modify these, don't just copy and paste them, it will be no help to you later on if you just copy them. read through the commands, the wiki, and figure out why certain things are done, then, make a few on your own, each different use different commands etc.

Kronan 12-30-2005 06:26 AM

Quote:

Originally Posted by Matt
I'm not exactly good with scripting, but you can try this.

NPC Code:
function onPlayerChats()
if (player.chat == "texthere")
hide;


Event blockers is your best friend.

If you use GS2, this is what to do:
NPC Code:
function onPlayerChats() {
if (player.chat == "yourpassword") {
// do stuff here such as:
hide();
}
}


ApothiX 12-30-2005 10:49 AM

Quote:

Originally Posted by Kronan
Event blockers is your best friend.

If you use GS2, this is what to do:
NPC Code:
function onPlayerChats() {
if (player.chat == "yourpassword") {
// do stuff here such as:
hide();
}
}


His version works aswell, because there is only one line after each [mind just went blank, whatever those things are called x_x]

ZeLpH_MyStiK 12-30-2005 08:48 PM

Quote:

Originally Posted by excaliber7388
copy + paste=bad
please try to modify these, don't just copy and paste them, it will be no help to you later on if you just copy them. read through the commands, the wiki, and figure out why certain things are done, then, make a few on your own, each different use different commands etc.

Yes, it is very true. Now only if you followed your own advice and read.

===On Topic===
Of course in place of simply checking a player's chat text, gscript does offer password protection functions.


All times are GMT +2. The time now is 02:44 PM.

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