Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

View Poll Results: Do You Know How To Do This
Yes 6 85.71%
No 1 14.29%
Voters: 7. You may not vote on this poll

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-30-2005, 02:28 AM
Drag999 Drag999 is offline
Registered User
Join Date: Dec 2005
Posts: 1
Drag999 is on a distinguished road
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!
Reply With Quote
  #2  
Old 12-30-2005, 02:45 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
um try playerchats and strequals(#c,texthere) that's all i'll say
Reply With Quote
  #3  
Old 12-30-2005, 03:11 AM
Matt Matt is offline
iZone Administrator
Matt's Avatar
Join Date: Apr 2005
Location: United States
Posts: 2,690
Matt is a jewel in the roughMatt is a jewel in the rough
I'm not exactly good with scripting, but you can try this.

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

__________________
Need Playerworld or Account support?
GraalOnline/Toonslab Support Center
Reply With Quote
  #4  
Old 12-30-2005, 03:25 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
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.
__________________
Reply With Quote
  #5  
Old 12-30-2005, 05:57 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to 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.
Reply With Quote
  #6  
Old 12-30-2005, 06:26 AM
Kronan Kronan is offline
yo
Kronan's Avatar
Join Date: May 2001
Location: Florida, USA
Posts: 682
Kronan is on a distinguished road
Send a message via ICQ to Kronan Send a message via AIM to Kronan Send a message via Yahoo to Kronan
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();
}
}

__________________
Reply With Quote
  #7  
Old 12-30-2005, 10:49 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
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 ]
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #8  
Old 12-30-2005, 08:48 PM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
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.
__________________
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 02:44 PM.


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