Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   String Help! (https://forums.graalonline.com/forums/showthread.php?t=16887)

fireball_dolphonia 11-14-2001 11:23 AM

String Help!
 
ok i need help on how to make it if you say show lemons it shows homany lemons u got

TDO2000 11-14-2001 07:54 PM

if the string is called lemons for example

if(playerchats && strequals(#c,lemons)){
say2 You got #s(lemons) Lemons;
}

TDK_Admin1 11-14-2001 08:49 PM

Yup =) Not that hard.

Saga2001 11-14-2001 11:57 PM

ummmmm....
 
I think you should keep it organized...
NPC Code:

if (playerchats) {
if (strequals(#c,Show Lemons)) setplayerprop #c,#s(client.lemons);
}


note the client. :rolleyes:
--PastAustin

Saga2001 11-15-2001 12:00 AM

lol
 
I am a retard...but I like to keep client strings so that they have client before them it makes me happy. And I am NAT Chief on Doomsday....so listen to me! :-D. I am happy now that you all know that I am obsessive compulsive.
--PastAustin :rolleyes:

AlexH 11-15-2001 12:01 AM

hmm
NAT Chief that doesnt know how to use strings
odd

TDO2000 11-15-2001 12:16 AM

um... it has no use on non p2p PWs like Doomsday so this are useless bits ;)

AlexH 11-15-2001 12:18 AM

nvm my last post
it made no sense at all
i got everyone names mixed up completly
opps

TDO2000 11-15-2001 12:21 AM

Quote:

Originally posted by AlexH
nvm my last post
it made no sense at all
i got everyone names mixed up completly
opps

Welcome in club :D

Saga2001 11-15-2001 01:48 AM

Damn Skipy...
 
Me not able to use strings?
yeah right.
what do you want?
try me.
--PastAustin

AlexH 11-15-2001 01:50 AM

i did say nvm my last post
i thought you started the thread
but i relized you didnt

royce 11-15-2001 03:20 AM

Quote:

Originally posted by AlexH
i did say nvm my last post
i thought you started the thread
but i relized you didnt

lol i knew i saw a difference in sigs

nyghtGT 11-15-2001 06:18 AM

Re: lol
 
Quote:

Originally posted by Saga2001
I am a retard...but I like to keep client strings so that they have client before them it makes me happy. And I am NAT Chief on Doomsday....so listen to me! :-D. I am happy now that you all know that I am obsessive compulsive.
--PastAustin :rolleyes:

uhh, thats dumb ... didn't you just ask for the time script or something the other day?

entravial 11-15-2001 10:25 AM

~AlphaFlame~

If the string is a number... strtofloat(#s(stringname))...
If the string is a number and you're adding to it... setstring stringname,#v(strtofloat(#s(stringname))+1);....
Otherwise, #s(stringname) works... by the way, did any of you realize you can add to strings? :-P
setstring stringname,#s(stringname) newtext;... useful for a couple of things... like anti-curse systems that replaces the text...

And don't diss Saga. If he ever gets on a p2p server as a NAT, the habit of using client. will be useful....

Faheria_GP2 11-15-2001 10:27 AM

Saga uses the "icepick" method of scripting :rolleyes:


All times are GMT +2. The time now is 12:49 AM.

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