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-03-2002, 09:38 PM
scottman5587 scottman5587 is offline
Registered User
Join Date: Feb 2002
Location: New York
Posts: 122
scottman5587 is on a distinguished road
Send a message via AIM to scottman5587
help with strings

what does the parameter part of the string scrip do???
__________________
Reply With Quote
  #2  
Old 03-03-2002, 11:08 PM
Dustey Dustey is offline
Registered User
Join Date: Nov 2001
Location: Do You Think I Know?
Posts: 193
Dustey is on a distinguished road
Send a message via AIM to Dustey
here is how a string works. are u sure u are working with strings not ganis?

setstring stringname,stringvalue;

stringvalue can be a numbers or letters. Its used to save information so that it can be accesed by other npcs and itself.
If im wrong in any of that let me know
__________________
And Yes I work For.... Renegade
Reply With Quote
  #3  
Old 03-03-2002, 11:15 PM
Dustey Dustey is offline
Registered User
Join Date: Nov 2001
Location: Do You Think I Know?
Posts: 193
Dustey is on a distinguished road
Send a message via AIM to Dustey
Re: help with strings

Quote:
Josey
-=Josey=-
A string is a stored variable that can be "called upon" at a latter time to be used for various things. Like in Graal, your account name is a string. To do something with it you would use something like:

code:--------------------------------------------------------------------------------
if (playerenters){
message Hello #a;
}--------------------------------------------------------------------------------

or
code:--------------------------------------------------------------------------------
if (playerenters&&strequals(#a,joseyisleet)){
message Hey Josey!;
playerrupees+=500;
}
--------------------------------------------------------------------------------

It's all fairly simply to learn and use.
take a look at that that was in another thread i found
__________________
And Yes I work For.... Renegade
Reply With Quote
  #4  
Old 03-04-2002, 05:18 AM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
-=Josey=-
Also, to acces a string you've set yourself use something like:
NPC Code:

if (playerenters){
setstring client.test,hi;
timeout=1;
}
if (timeout){
setplayerprop #c,#s(client.test);
}


You can also use numbers with something like:
NPC Code:

if (playerenters){
setstring client.test,11;
timeout=1;
}
if (timeout){
setplayerprop #c,strtofloat(#s(client.test));
}


If you need any more help contact me via AIM or MSN Messenger. My contact information is in my signature.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #5  
Old 03-07-2002, 06:25 AM
SaijinGohan SaijinGohan is offline
Registered User
SaijinGohan's Avatar
Join Date: Jul 2001
Location: U.S.A - Ohio
Posts: 536
SaijinGohan is on a distinguished road
Send a message via AIM to SaijinGohan Send a message via MSN to SaijinGohan
And remember, when calling a number from a string use strtofloat otherwise just use #s(stringname);

right...?
__________________

Job: A Legend

And you think that you have played Graal forever? Ha!
Reply With Quote
  #6  
Old 03-07-2002, 10:38 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
well, if its a string array, you would use #I(stringname,index)
__________________
[signature]insert here[/signature]
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:22 AM.


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