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 03-31-2001, 01:30 AM
JoMomma JoMomma is offline
Registered User
Join Date: Mar 2001
Posts: 43
JoMomma is on a distinguished road
There has GOT to be a way to do this. I don't know if it's thru the new way of scripting on the NPC Server, or an undocumented (or perhaps documented but unnoticed) command.

Let's say we have the string: "say this is a test". Now I want to get the part after "say". I can easily detect the "say" part, but how do I get the rest of it without the say part? Think about things like:
"play dead" "play dancey" etc etc for bomy pets
"setbomy name number" for bomy class

Are these just built-in to the npc and they check every single possibility, and have to change the code a bit once a new animation is added or a new bomy "body" is made?
__________________
Temporary disabled
Stefan Knorr
Reply With Quote
  #2  
Old 03-31-2001, 02:48 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
In reverse order:

if(playerchats&&strcontains(#c,play dead)){

if(playerchats&&strcontains(#c,say)){
message #s(#c-say);
}

I've seen that used a few times with varying degrees of success. Personally, I just steer clear of string manipulation....say and fire is about as far as I'll go there. =P
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #3  
Old 03-31-2001, 04:34 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
no there is no string parsing yet,
although it would be quite easy to make,
may be i should add it soon
Reply With Quote
  #4  
Old 03-31-2001, 06:15 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Quote:
Originally posted by Stefan
no there is no string parsing yet,
although it would be quite easy to make,
may be i should add it soon
That would be really useful for script reducal in some cases
__________________

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 10:58 PM.


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