Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-16-2001, 11:36 PM
Knightoffrost Knightoffrost is offline
and Delph Inc.
Knightoffrost's Avatar
Join Date: Jul 2001
Location: Canada
Posts: 1,162
Knightoffrost is on a distinguished road
Send a message via ICQ to Knightoffrost Send a message via AIM to Knightoffrost Send a message via Yahoo to Knightoffrost
I noticed that..

A lot of people use "(playerchats&&strequals(#c,blah)" instead of "(playersays(blah))" ...

Why is that? playersays is much more easy and smaller which means less characters which means less time the computer takes reading the info (even if its a fast simple action anyway) which just means slightly more speed in it all I guess. But why do people use playerchats and strequals instead of playersays?
__________________
Xerphier Dintch
Featuring
Reply With Quote
  #2  
Old 08-16-2001, 11:40 PM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
I used to use playersays but I was told by many that its widely discouraged. I guess its not as fast or efficient or somthing.
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #3  
Old 08-16-2001, 11:50 PM
Knightoffrost Knightoffrost is offline
and Delph Inc.
Knightoffrost's Avatar
Join Date: Jul 2001
Location: Canada
Posts: 1,162
Knightoffrost is on a distinguished road
Send a message via ICQ to Knightoffrost Send a message via AIM to Knightoffrost Send a message via Yahoo to Knightoffrost
Quote:
Originally posted by ownerofbabylon
I used to use playersays but I was told by many that its widely discouraged. I guess its not as fast or efficient or somthing.
Stupid (not you)
I cant see why its not efficient. I use it all the time "Online" and it works fine. And its smaller in characters so it would be the more efficient one.
__________________
Xerphier Dintch
Featuring
Reply With Quote
  #4  
Old 08-17-2001, 12:39 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
By using playerchats though...You get a whole slew of stuff like startswith(), tokenize, and all that fun stuff....people just get used to using playerchats outa habit because they use it for stuff like I just said...Anyways..thats why I think they do it...
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #5  
Old 08-17-2001, 12:41 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
yea i just got used to it so i use that now =\
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #6  
Old 08-17-2001, 02:36 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
actually its because Stefan never put playersays in the npc server. so if you do playersays in a p2p script it wont work .you need playerchats&&strequals(#c,whatever)
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #7  
Old 08-17-2001, 03:00 AM
Brady2 Brady2 is offline
Registered User
Brady2's Avatar
Join Date: Mar 2001
Location: Phoenix, AZ and Wichita Falls, TX
Posts: 924
Brady2 is on a distinguished road
Jadis:

BECAUSE PLAYERSAYS GETS BUGGED EVERY OTHER VERSION SO IF YOU DO LIKE
IF (PLAYERSAYS(NO)) SAY2 NO!;

THE SIGN WILL KEEP APPEARING IF THE #C IS EQUAL TO NO

Also because you're anus is sore.
Reply With Quote
  #8  
Old 08-17-2001, 03:15 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
Quote:
Originally posted by Brady2
Jadis:

BECAUSE PLAYERSAYS GETS BUGGED EVERY OTHER VERSION SO IF YOU DO LIKE
IF (PLAYERSAYS(NO)) SAY2 NO!;

THE SIGN WILL KEEP APPEARING IF THE #C IS EQUAL TO NO

Also because you're anus is sore.
no=\
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #9  
Old 08-17-2001, 03:30 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Re: I noticed that..

Quote:
Originally posted by Knightoffrost
A lot of people use "(playerchats&&strequals(#c,blah)" instead of "(playersays(blah))" ...

Why is that? playersays is much more easy and smaller which means less characters which means less time the computer takes reading the info (even if its a fast simple action anyway) which just means slightly more speed in it all I guess. But why do people use playerchats and strequals instead of playersays?
Ok. Playersays(text) is the same as strequals(#c,text). People use
NPC Code:

if (playerchats && strequals(#c,text)) { }


because the code will only run WHEN the player changes his chat field.
Try these codes out:
NPC Code:

if (playersays(buy me)) {
playerrupess-=10;
}


NPC Code:

if (playerchats && strequals(#c,buy me)) {
playerrupees-=10;
}


See the difference?
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #10  
Old 08-17-2001, 03:36 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
playersays was removed from npc server wasnt it?
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #11  
Old 08-17-2001, 03:55 AM
Knightoffrost Knightoffrost is offline
and Delph Inc.
Knightoffrost's Avatar
Join Date: Jul 2001
Location: Canada
Posts: 1,162
Knightoffrost is on a distinguished road
Send a message via ICQ to Knightoffrost Send a message via AIM to Knightoffrost Send a message via Yahoo to Knightoffrost
Quote:
Originally posted by LiquidIce00
playersays was removed from npc server wasnt it?
Errm I wouldnt know actually.Why would it be?
__________________
Xerphier Dintch
Featuring
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 04:55 PM.


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