Graal Forums

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

Crono1508 11-25-2004 06:06 PM

Help Scripters!!!
 
Alright, I'm trying to create an easy flat out levels system off of a RC NPC.
Here is the Script I've made.

//#CLIENTSIDE
if (created){
setstring client.level,1;
}
if (playerkills==10){
setplayerprop#c,Gained Level!;
setstring client.level,#v(strtofloat(#s
(client.level))+1);
say2 You've gained a level!
#bCurrent Level: #s(client.level);
}
}

This doesn't work at all. Even if I always changed the if (playerkills==10){ part.
I've tried
if (playerkills=10){
if (playerkills==10){
if (playerkills<10){
if (playerkills>10){
if (created&&playerkills=10){
if (created&&playerkills==10){

None of it works.
So when I put
if (playerchats&&strequals(#c,/autolevel){
then the basic script, it did give me a level and it showed in my profile Level: 2

I got the profilevars=Level:=client.level

And it just doesn't work.
Am I using the wrong thing?
Like..
severr.flag
server.flag
this.flag
client.flag
clientr.flag

What do I use?
I need all your help out their. I just want it so if my kills are 10 I'll gain a level and it'll add +1 to my client.level!

VeX_RaT_Boy 11-25-2004 08:21 PM

playerkills is serverside. It is also very insecure to have a client. string. You should make the level up part serverside, for more security.

ZeroTrack 11-25-2004 11:33 PM

why not also make a custom kill system?

xAndrewx 11-25-2004 11:47 PM

Not all of us are talented..

Slash-P2P 11-26-2004 08:11 AM

Quote:

Originally Posted by xAndrewx
Not all of us are talented..

Speak for yourself.

xAndrewx 11-26-2004 10:20 AM

Quote:

Originally Posted by Slash-P2P
Speak for yourself.

Sorry for not wasting my life learning how to script pro.

Crono1508 11-26-2004 03:22 PM

You guys didn't really help there.

Kaimetsu 11-26-2004 04:33 PM

Quote:

Originally Posted by xAndrewx
Sorry for not wasting my life learning how to script pro.

What important things did you do instead?

Loriel 11-26-2004 04:59 PM

You are now semi-officially warned for bad form.

VeX_RaT_Boy 11-26-2004 09:39 PM

Quote:

Originally Posted by Crono1508
You guys didn't really help there.

What about my post...?

xAndrewx 11-26-2004 10:08 PM

sex ;)

Zero Hour 11-26-2004 10:39 PM

Disaster.

ApothiX 11-26-2004 10:41 PM

Quote:

Originally Posted by Crono1508
//#CLIENTSIDE
if (created){
setstring client.level,1;
}
if (playerkills==10){
setplayerprop#c,Gained Level!;
setstring client.level,#v(strtofloat(#s
(client.level))+1);
say2 You've gained a level!
#bCurrent Level: #s(client.level);
}
}

I think the script will only run once, unless it is in a timeout, so it only checks for playerkills==10 right when the script is initialized, to correct this you could go:

[edit]I do not think I want you to make him stop thinking on his own. --Loriel[/edit]

Kaimetsu 11-26-2004 11:13 PM

Okiesmokie is right in his identification of the problem, but horribly wrong in his suggested solution. See KSI-GS.

zokemon 11-29-2004 07:24 PM

You scripters and your "talk".

osrs 11-29-2004 07:44 PM

Quote:

Originally Posted by zokemon
You scripters and your "talk".

Hard to understand or with a desire to "talk" same?

zokemon 11-29-2004 08:30 PM

You must understand my humor in say that.


All times are GMT +2. The time now is 11:43 AM.

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