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 11-25-2004, 06:06 PM
Crono1508 Crono1508 is offline
*Shadow (Convoy)
Crono1508's Avatar
Join Date: Jun 2004
Location: United States
Posts: 488
Crono1508 will become famous soon enough
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!
__________________

Reply With Quote
  #2  
Old 11-25-2004, 08:21 PM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
playerkills is serverside. It is also very insecure to have a client. string. You should make the level up part serverside, for more security.
__________________
-Kjetil Valen
Reply With Quote
  #3  
Old 11-25-2004, 11:33 PM
ZeroTrack ZeroTrack is offline
G2K1 Developer
ZeroTrack's Avatar
Join Date: Apr 2004
Location: LongIsland, NY
Posts: 402
ZeroTrack is on a distinguished road
Send a message via AIM to ZeroTrack
why not also make a custom kill system?
__________________

Reply With Quote
  #4  
Old 11-25-2004, 11:47 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Not all of us are talented..
__________________
Reply With Quote
  #5  
Old 11-26-2004, 08:11 AM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
Quote:
Originally Posted by xAndrewx
Not all of us are talented..
Speak for yourself.
Reply With Quote
  #6  
Old 11-26-2004, 10:20 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by Slash-P2P
Speak for yourself.
Sorry for not wasting my life learning how to script pro.
__________________
Reply With Quote
  #7  
Old 11-26-2004, 03:22 PM
Crono1508 Crono1508 is offline
*Shadow (Convoy)
Crono1508's Avatar
Join Date: Jun 2004
Location: United States
Posts: 488
Crono1508 will become famous soon enough
You guys didn't really help there.
__________________

Reply With Quote
  #8  
Old 11-26-2004, 04:33 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by xAndrewx
Sorry for not wasting my life learning how to script pro.
What important things did you do instead?
__________________
Reply With Quote
  #9  
Old 11-26-2004, 04:59 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
You are now semi-officially warned for bad form.
Reply With Quote
  #10  
Old 11-26-2004, 09:39 PM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
Quote:
Originally Posted by Crono1508
You guys didn't really help there.
What about my post...?
__________________
-Kjetil Valen
Reply With Quote
  #11  
Old 11-26-2004, 10:08 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
sex
__________________
Reply With Quote
  #12  
Old 11-26-2004, 10:39 PM
Zero Hour Zero Hour is offline
Stiff Upper Lip
Zero Hour's Avatar
Join Date: Oct 2006
Location: Nova Scotia, Canada
Posts: 0
Zero Hour is on a distinguished road
Send a message via AIM to Zero Hour
Disaster.
__________________
Reply With Quote
  #13  
Old 11-26-2004, 10:41 PM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
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]
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")

Last edited by Loriel; 11-27-2004 at 02:00 AM..
Reply With Quote
  #14  
Old 11-26-2004, 11:13 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Okiesmokie is right in his identification of the problem, but horribly wrong in his suggested solution. See KSI-GS.
__________________
Reply With Quote
  #15  
Old 11-29-2004, 07:24 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
You scripters and your "talk".
__________________
Do it with a DON!
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 02:15 PM.


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