Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   How to (https://forums.graalonline.com/forums/showthread.php?t=43865)

mhermher 03-29-2003 02:40 PM

How to
 
Hi.. i made a admin message script and i need some help..
This is not the whole script so don't delete thread..

In the npc i have this:
NPC Code:

if (playerenters) {
toweapons -adminmsg;
}
if (!strequals(#s(client.sm),)&&client.smz==0.6) {
timeout=3;
}
if (timeout&&client.smz>0) {
client.smz=client.smz-0.1;
timeout=0.1;
}
if (client.smz==0) {
setstring client.sm,;
client.smz=0.6;
}



And then in another (test npc):
NPC Code:

if (playerchats&&startswith(/msg,#c)) {
tokenize #c;
setstring client.sm,#t(1);
client.smz=0.6;
}



The test NPC's job is to change the string.. and when it's changed, 3 seconds shall pass and the text should be smaller untill it dissapears.. but now it don't even change a bit...

Help?

mhermher 03-29-2003 04:16 PM

Quote:

Originally posted by Kaimetsu
http://forums.graal2001.com/forums/s...threadid=43866
Yes, but it don't help my code.

mhermher 03-29-2003 04:30 PM

Quote:

Originally posted by Kaimetsu


I was merely stating that I'm not going to look at your code until it conforms with the KSI-GS standard.

KSI-GS?

mhermher 03-29-2003 05:15 PM

Quote:

Originally posted by Kaimetsu
Kaimetsu Standards Institute - Graal Script

^_^

LOL!

Well cmon Kai.. you know i'm not as good as you.. please help :P

HoudiniMan 03-29-2003 07:50 PM

Quote:

Originally posted by mhermher


LOL!

Well cmon Kai.. you know i'm not as good as you.. please help :P

Just hit style =\

mhermher 03-29-2003 11:04 PM

Quote:

Originally posted by Kaimetsu


No, it's more than that. Tyrial, you don't need to be a scripting master just to follow those three rules.

Yeah, but i never understood that ya ment with KSI-GS.
But anyhow, it's fixed now.. close this thread. ^^

HoudiniMan 03-30-2003 05:35 AM

Quote:

Originally posted by Kaimetsu


No, it's more than that. Tyrial, you don't need to be a scripting master just to follow those three rules.

If you mean not nesting events and such, then yeah... but it's still not rocket science

Codeboy 04-21-2003 07:42 AM

o.O Why even bother with making script conform to an opinionated list of rules made by a person who has their own indivitual opinions, whos don't really conform and agree to others?

Translation:

So what if people use this 'Kam-Code' formatt, people can script however they want to script. Look at Shadow Knight, for example, he never, ever used spaces to designate a command.

Shiftk03- 04-21-2003 07:53 AM

Quote:

Originally posted by Codeboy
o.O Why even bother with making script conform to an opinionated list of rules made by a person who has their own indivitual opinions, whos don't really conform and agree to others?

Translation:

So what if people use this 'Kam-Code' formatt, people can script however they want to script. Look at Shadow Knight, for example, he never, ever used spaces to designate a command.

Its common courtesy for another scripter who will be reading the script... Now, if you like having sloppy scripts, thats your progative.

adam 04-21-2003 09:12 AM

Quote:

Originally posted by Codeboy
o.O Why even bother with making script conform to an opinionated list of rules made by a person who has their own indivitual opinions, whos don't really conform and agree to others?

Translation:

So what if people use this 'Kam-Code' formatt, people can script however they want to script. Look at Shadow Knight, for example, he never, ever used spaces to designate a command.

Yep, you may script how you wish. But I will backup Kai with his apparently Standardized Format. It's very nice.

PrinceDark 04-22-2003 07:53 AM

Quote:

Originally posted by Codeboy
o.O Why even bother with making script conform to an opinionated list of rules made by a person who has their own indivitual opinions, whos don't really conform and agree to others?

Translation:

So what if people use this 'Kam-Code' formatt, people can script however they want to script. Look at Shadow Knight, for example, he never, ever used spaces to designate a command.

It makes things a lot easier to read and understand.

Welcome to the forums. I haven't seen you in a long time. :)

Knuckles 04-22-2003 08:17 AM

He's just showing the correct syntax.
And yea, it's alot easier to understand...

FOR EXAMPLE.
IF someone decided to put a 99 line code, on 1 line... It'd be annoying for the rest of the Graal Scripters to understand or read... I know i've had to debug some other peoples codes with very messy syntax, and since it wasn't how I did it, it was really hard for me.


All times are GMT +2. The time now is 02:22 AM.

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