Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-27-2003, 04:59 AM
a1tjm a1tjm is offline
Registered User
Join Date: Aug 2003
Posts: 12
a1tjm is on a distinguished road
Angry Door -.-

I know its simple but

//#CLIENTSIDE
if(playerchats && strequals(#c,open) && strequals(#a,a1tjm)){
hidelocal;
}
if(playerchats && strequals(#c,close) && strequals(#a,a1tjm)){
showlocal;
}
if(playerchats && strequals(#c,open) && strequals(#a,papajchris)){
hidelocal;
}
if(playerchats && strequals(#c,close) && strequals(#a,papajchris)){
showlocal;
}

If I use it it would only work for my account and it would not block or open for other users who try to enter =o

I am not a great scripter
Reply With Quote
  #2  
Old 09-27-2003, 05:05 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
http://forums.graal2001.com/forums/s...threadid=46557
__________________
Reply With Quote
  #3  
Old 09-27-2003, 05:07 AM
a1tjm a1tjm is offline
Registered User
Join Date: Aug 2003
Posts: 12
a1tjm is on a distinguished road
:(

I still don't get it x.x
Reply With Quote
  #4  
Old 09-27-2003, 08:24 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
*claps* (not bad for a beginner really)
*points to KSI link*
you should have nested the chat checks in a playerchats event block, and you could just group the account checks together, but that'd be ugly
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #5  
Old 09-27-2003, 05:19 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally posted by a1tjm
If I use it it would only work for my account and it would not block or open for other users who try to enter =o
showlocal will show an hidden NPC only for the current player.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #6  
Old 09-27-2003, 05:41 PM
faenix faenix is offline
Registered User
Join Date: Jul 2003
Posts: 56
faenix is on a distinguished road
If you want it to block for all the players, take out the //#CLIENTSIDE and use the commands hide and show rather than hidelocal and showlocal
__________________
In a mad world, only the mad are sane.
Reply With Quote
  #7  
Old 09-27-2003, 06:25 PM
Goboom Goboom is offline
Pixel Monkey
Goboom's Avatar
Join Date: Dec 2001
Location: Michigan
Posts: 1,702
Goboom is on a distinguished road
Send a message via ICQ to Goboom Send a message via AIM to Goboom Send a message via MSN to Goboom Send a message via Yahoo to Goboom
Re: Door -.-

Quote:
Originally posted by a1tjm
I know its simple but

//#CLIENTSIDE
if(playerchats && strequals(#c,open) && strequals(#a,a1tjm)){
hidelocal;
}
if(playerchats && strequals(#c,close) && strequals(#a,a1tjm)){
showlocal;
}
if(playerchats && strequals(#c,open) && strequals(#a,papajchris)){
hidelocal;
}
if(playerchats && strequals(#c,close) && strequals(#a,papajchris)){
showlocal;
}

If I use it it would only work for my account and it would not block or open for other users who try to enter =o

I am not a great scripter
Kai means dont do this crap you have right now.
NPC Code:

if(playerchats && strequals(#c,open) && strequals(#a,a1tjm)){
hidelocal;
}


Do something like this.
NPC Code:

if (playerchats){
if (strequals(#c,open)){
if (strequals(#a,a1tjm)){
//stuff goes here
}
}
}

__________________
Reply With Quote
  #8  
Old 09-27-2003, 09:02 PM
Ningnong Ningnong is offline
Registered User
Ningnong's Avatar
Join Date: Nov 2002
Location: < -- way
Posts: 262
Ningnong is on a distinguished road
You have to use triggeraction to get from clientside to serverside.

-The playerchat is checked clientside, aswell as the account name. Then use triggeraction, and the hide part goes serverside.
__________________
Former Global Scripting Team Member


Reply With Quote
  #9  
Old 09-27-2003, 09:42 PM
Riot-Starter Riot-Starter is offline
Registered User
Join Date: Aug 2001
Location: Central Florida, USA
Posts: 79
Riot-Starter is on a distinguished road
Send a message via AIM to Riot-Starter
Quote:
Originally posted by Ningnong
You have to use triggeraction to get from clientside to serverside.

-The playerchat is checked clientside, aswell as the account name. Then use triggeraction, and the hide part goes serverside.
Ew why?
Check serverside, perform serverside.
Reply With Quote
  #10  
Old 09-27-2003, 09:59 PM
Ningnong Ningnong is offline
Registered User
Ningnong's Avatar
Join Date: Nov 2002
Location: < -- way
Posts: 262
Ningnong is on a distinguished road
check playerchats serverside....uh huh?
__________________
Former Global Scripting Team Member


Reply With Quote
  #11  
Old 09-27-2003, 10:08 PM
Riot-Starter Riot-Starter is offline
Registered User
Join Date: Aug 2001
Location: Central Florida, USA
Posts: 79
Riot-Starter is on a distinguished road
Send a message via AIM to Riot-Starter
Yep. Something wrong with me doing playerchat checks serverside?
Reply With Quote
  #12  
Old 09-27-2003, 10:15 PM
Ningnong Ningnong is offline
Registered User
Ningnong's Avatar
Join Date: Nov 2002
Location: < -- way
Posts: 262
Ningnong is on a distinguished road
no, no, nothing... appart from the fact it won't work.
__________________
Former Global Scripting Team Member


Reply With Quote
  #13  
Old 09-27-2003, 10:17 PM
Riot-Starter Riot-Starter is offline
Registered User
Join Date: Aug 2001
Location: Central Florida, USA
Posts: 79
Riot-Starter is on a distinguished road
Send a message via AIM to Riot-Starter
Yes it does work, just fine.....

Ever even attempt it?
Reply With Quote
  #14  
Old 09-27-2003, 10:26 PM
Ningnong Ningnong is offline
Registered User
Ningnong's Avatar
Join Date: Nov 2002
Location: < -- way
Posts: 262
Ningnong is on a distinguished road
so your saying this will work?

NPC Code:

if (playerchats){
if (strequals(#c,/test)) sendtorc testing!;
}



?

Sorry but it doesn't.
__________________
Former Global Scripting Team Member


Reply With Quote
  #15  
Old 09-27-2003, 10:30 PM
Riot-Starter Riot-Starter is offline
Registered User
Join Date: Aug 2001
Location: Central Florida, USA
Posts: 79
Riot-Starter is on a distinguished road
Send a message via AIM to Riot-Starter
It works fine for me.
Reply With Quote
  #16  
Old 09-27-2003, 10:33 PM
Ningnong Ningnong is offline
Registered User
Ningnong's Avatar
Join Date: Nov 2002
Location: < -- way
Posts: 262
Ningnong is on a distinguished road
im talking "without the clientside part"

look:

Correct:
NPC Code:

if (actionserverside){
if (strequals(#p(0),test)) sendtorc test worked;
}
//#CLIENTSIDE
if (playerchats){
if (strequals(#c,/test))
triggeraction 0,0,serverside,npc_name,test;
}



Incorrect:

(posted in last post)

Where are you testing this?
__________________
Former Global Scripting Team Member


Reply With Quote
  #17  
Old 09-27-2003, 10:35 PM
Riot-Starter Riot-Starter is offline
Registered User
Join Date: Aug 2001
Location: Central Florida, USA
Posts: 79
Riot-Starter is on a distinguished road
Send a message via AIM to Riot-Starter
Lenoxion Online,
Reply With Quote
  #18  
Old 09-27-2003, 10:35 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Ningnong
no, no, nothing... appart from the fact it won't work.
...o.O you're a scripter, right? since when does playerchats not work serverside
Reply With Quote
  #19  
Old 09-27-2003, 10:36 PM
Ningnong Ningnong is offline
Registered User
Ningnong's Avatar
Join Date: Nov 2002
Location: < -- way
Posts: 262
Ningnong is on a distinguished road
yea I am. I just tested it... Unless theres something really weird going on...
__________________
Former Global Scripting Team Member


Reply With Quote
  #20  
Old 09-27-2003, 10:38 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
DB NPC or local level npc?
Reply With Quote
  #21  
Old 09-27-2003, 10:40 PM
Ningnong Ningnong is offline
Registered User
Ningnong's Avatar
Join Date: Nov 2002
Location: < -- way
Posts: 262
Ningnong is on a distinguished road
DB NPC.


Thats probably where we are getting confused.

I've never actually tried if (playerchats) serverside on a local levels npc.

*trys it*
__________________
Former Global Scripting Team Member


Reply With Quote
  #22  
Old 09-27-2003, 10:42 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Ningnong
DB NPC.


Thats probably where we are getting confused.

I've never actually tried if (playerchats) serverside on a local levels npc.

*trys it*
It should work 100% fine if it's on a DB npc, from your example of a working version using triggeraction it looked like you were using a weapon, you sure you weren't using a weapon before? And the only way it'll work (I think) on a local npc is if the server doesn't optimize it, the npcserver is usually 'ignoring' npcs that don't have any flags or strings on them so it doesn't 'see' them, so technically the npc will be clientside only
Reply With Quote
  #23  
Old 09-27-2003, 10:44 PM
Ningnong Ningnong is offline
Registered User
Ningnong's Avatar
Join Date: Nov 2002
Location: < -- way
Posts: 262
Ningnong is on a distinguished road
yes, I tested on a weapon and It wasn't working....but I see now that it works on a level npc, also a level-db npc.
__________________
Former Global Scripting Team Member


Reply With Quote
  #24  
Old 09-28-2003, 12:02 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Serverside playerchats checks should be working on everything except weapons, as the serverside code there can only be called with a triggeraction.
Reply With Quote
  #25  
Old 09-28-2003, 09:21 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
What happened to the door?

What happened to the conversation about the door?
__________________
Skyld
Reply With Quote
  #26  
Old 10-17-2003, 11:17 AM
Idrox0 Idrox0 is offline
Registered User
Join Date: Oct 2003
Posts: 66
Idrox0 is on a distinguished road
ok, heres a (non-clientside) shortened version of the door you had if you wanted others to get in after you say open...
NPC Code:

if (playerchats) {
if (strequals(#a,a1tjm)||strequals(#a,papajchris) {
if (strequals(#c,open)) hide;
if (strequals(#c,close)) show;
}
}



Note to Kaimetsu: Does it follow the KSI-GS?
__________________
Reply With Quote
  #27  
Old 10-17-2003, 12:37 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by Idrox0
Note to Kaimetsu: Does it follow the KSI-GS?
Not quite. Rule eight.
__________________
Reply With Quote
  #28  
Old 10-17-2003, 09:32 PM
Idrox0 Idrox0 is offline
Registered User
Join Date: Oct 2003
Posts: 66
Idrox0 is on a distinguished road
Okay Kai...(is it ok if i call you that?) here's the code with KSI-GS Standards...
NPC Code:

if (playerchats) {
if (strequals(#a,a1tjm)||strequals(#a,papajchris) {
if (strequals(#c,open)) hide;
else if (strequals(#c,close)) show;
}
}

__________________
Reply With Quote
  #29  
Old 10-18-2003, 02:17 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally posted by Idrox0
Okay Kai...(is it ok if i call you that?) here's the code with KSI-GS Standards...
NPC Code:

if (playerchats) {
if (strequals(#a,a1tjm)||strequals(#a,papajchris) {
if (strequals(#c,open)) hide;
else if (strequals(#c,close)) show;
}
}

You are missing no less than one ) in your second line.
Reply With Quote
  #30  
Old 10-18-2003, 08:22 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally posted by Idrox0
Okay Kai...(is it ok if i call you that?) here's the code with KSI-GS Standards...
Yeah, everybody calls me Kai. And, aside from the little bracket problem, the code looks much nicer now
__________________
Reply With Quote
  #31  
Old 10-18-2003, 11:44 PM
Idrox0 Idrox0 is offline
Registered User
Join Date: Oct 2003
Posts: 66
Idrox0 is on a distinguished road
It must be perfect now.

NPC Code:

if (playerchats) {
if (strequals(#a,a1tjm)||strequals(#a,papajchris)) {
if (strequals(#c,open)) hide;
else if (strequals(#c,close)) show;
}
}



Proplem solved! ^_^
__________________
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 01:45 AM.


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