Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-07-2006, 12:09 AM
Prozac Prozac is offline
one of the good guys
Prozac's Avatar
Join Date: Jan 2006
Posts: 245
Prozac is on a distinguished road
Send a message via AIM to Prozac
startswith gs2 equivelant?

What is the startwith(part,str) equivelant in gs2?
I searched on the wiki and the Graal Bible and they only mention it under NPC server and old gscript.

for example, I am trying:

PHP Code:
//#CLIENTSIDE
function onPlayerchats()
  {
    if (
startswith("test",player.chat))
     {
      
player.chat="test worked!";    // it never gets here when i say test
     
}
  } 
is there a gs2 version of this command? any suggestions?
Reply With Quote
  #2  
Old 02-07-2006, 12:18 AM
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
PHP Code:
if (str.starts("foo")) 
__________________
Skyld
Reply With Quote
  #3  
Old 02-07-2006, 05:38 AM
talkingnoodle talkingnoodle is offline
Rapidwolve
talkingnoodle's Avatar
Join Date: Nov 2005
Location: Leominster, MA
Posts: 229
talkingnoodle is on a distinguished road
Send a message via AIM to talkingnoodle Send a message via MSN to talkingnoodle
Quote:
Originally Posted by Skyld
PHP Code:
if (str.starts("foo")) 
foo? wtf? why is everyone using that in scripts all of a sudden z.z
__________________


AIM: Rapidwolve Graal
MSN: [email protected]


2/12/06 - Crossroads NPC Admin
Reply With Quote
  #4  
Old 02-07-2006, 05:48 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by talkingnoodle
foo? wtf? why is everyone using that in scripts all of a sudden z.z
"foo" "bar" "foobar"

Been around forever.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #5  
Old 02-07-2006, 11:35 PM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Quote:
Originally Posted by talkingnoodle
foo? wtf? why is everyone using that in scripts all of a sudden z.z
http://en.wikipedia.org/wiki/Metasyntactic_variable
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 12:08 AM.


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