Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: spkka on December 28, 2007, 09:51:32 am

Title: NickName Registration
Post by: spkka on December 28, 2007, 09:51:32 am
Script Name:
NickName Registration

Script Description:
Script will store players Name/IP/Password/Kills/Deaths/Selfkills/Date last played.
Will only store stats of players that are logged in.
Players are able to change their Password and Nickname ingame.
!commands will display info ingame

Original Author:
Spkka
Makes use of Keydon's xSplit
Thanks to Toumaz and Sai`ke and some others i forgot!!!  :-* :-* :-*

Core Version:
2.6.3

Code:
See attachments

NOTE! The script needs  2 folders in your soldat server directory
Make sure those 2 folders got write acces!!!


c:/soldatserver/stats/nickreg

If there are any problems with the script drop a message or join #soldat.ttw on Quakenet.

Alter the code to your own likings to store more information or what-so-ever.
Title: Re: NickName Registration
Post by: Szewczuq on December 28, 2007, 11:20:58 am
great! i search this script! :D GJ!

but i found 1 english error:

Code: [Select]
WriteConsole(ID,'Commands are: /login, /logout, /changepass, /changenick, /stats',GOOD);
WriteConsole(ID,'!login for example will display info how to login',GOOD);
end

if (copy(Text,1,6) = '!login') then
begin
WriteConsole(ID,'Type /login ''your password'' to login',GOOD);
end

In: WriteConsole(ID,'Typ /login ''your password'' to login',GOOD);
   end
Maybe Type? lol  ;)

Date Posted: December 28, 2007, 10:29:42 am
sorry for second post but i've got problem, when i type: /apple and killed enemy etc... I DONT GIFT stats on /stats.
i killed 3 enemy, my /stats:
Killed: 0
Deaths: 0
Selfkills: 0
WTF? please help me. :)
Title: Re: NickName Registration
Post by: DorkeyDear on December 28, 2007, 11:36:54 am
Suggestions:
average Kills per minute/hour
average Kills per map
average kills on <mapname>
total kills on <mapname>

average Deaths per minute/hour
average deaths per map
average deaths on <mapname>
total deaths on <mapname>

average selfkills per minute/hour
average selfkills per map
average selfkills on <mapname>
total selfkills on <mapname>

(only for ctf, or inf, otherwise don't show the msg at all)
total caps
average caps per hour
average caps per map
average caps on <mapname>
total caps on <mapname>

setting for not including selfkills when survival mode is enabled and at the end of a round, when every1 selfkills themselves

<mapname> is current map being played, unless u want to make ur own command to get stats on a specific map..
per map is for every map played..

May require a dramatic change in format of your accounts files though.. :P
Title: Re: NickName Registration
Post by: spkka on December 28, 2007, 11:42:58 am
/apply was a mistake it was still in there from the TTW script.
It will update when you leave the server or when the mapchanges now.
Please re-download the attachment

Date Posted: December 28, 2007, 11:40:22 am
Thanks for letting me know Szewczuq and thanks for those suggestions DorkeyDear!
Request stuff and i will write the Nickregistration script you need! (when i got the time)
Gimme a list of things you want to save within the player accounts.
I'll be working on this script tho, forgot to change minor things.
Title: Re: NickName Registration
Post by: Szewczuq on December 28, 2007, 11:57:10 am
sorry but after up-date this script again is not working :(
Title: Re: NickName Registration
Post by: spkka on December 28, 2007, 12:42:59 pm
Fixed i forgot to add the filterfilename on updatenickname  [retard]
Title: Re: NickName Registration
Post by: Szewczuq on December 28, 2007, 12:57:13 pm
eh! bad script, ~ SERVER SHUT DOWN ~ :(
Title: Re: NickName Registration
Post by: spkka on December 28, 2007, 01:01:02 pm
Fixed my bad...
Title: Re: NickName Registration
Post by: Szewczuq on December 28, 2007, 01:08:35 pm
good :) now scirpt is working :) tlx
Title: Re: NickName Registration
Post by: spkka on December 28, 2007, 06:20:22 pm
Could someone else aswell test it on Debian?
It does not seem to work on that Distro..

Date Posted: December 28, 2007, 04:10:17 pm
Please download it again!
In the old version was a bug that causes to overwrite other player profiles!
Title: Re: NickName Registration
Post by: Szewczuq on December 28, 2007, 07:04:19 pm
after 3h -> server shut down :(
Title: Re: NickName Registration
Post by: spkka on December 28, 2007, 07:45:22 pm
Next  time if you post please give me the error so i can see what happened.
Title: Re: NickName Registration
Post by: Szewczuq on December 29, 2007, 08:14:08 am
ok look at forum -> Server Help and Topic: -> Server shut Down. And look at screens :(
Title: Re: NickName Registration
Post by: danmer on December 31, 2007, 11:00:34 am
Zomg!

Since you're using xsplit anyway... Why don't you do stuff := xsplit(text) in OnPlayerCommand and such and then do a Case(stuff[1])? Instead of all those If's with Copy(text ... o.O
Title: Re: NickName Registration
Post by: PKS|Shooter on January 03, 2008, 05:56:16 pm
well, Nice Gob ;D thx
Title: Re: NickName Registration
Post by: Szewczuq on January 11, 2008, 12:09:21 pm
sorry of Offtopic but PKS|SHOOTER:
Your all post are:

GJ;D
GJ nice Script ^^
well, Nice Gob :D thx
nice, nie :D
thx :D
Title: Re: NickName Registration
Post by: DorkeyDear on January 18, 2008, 04:05:37 pm
Whats up with "NickRegistration.pas~"?
Title: Re: NickName Registration
Post by: chrisgbk on January 19, 2008, 02:50:22 am
Whats up with "NickRegistration.pas~"?

Probably a side effect of using an IDE to write it; Delphi IDE makes a backup of your old file whenever you save a file with that filename.
Title: Re: NickName Registration
Post by: Pawi on February 22, 2008, 03:28:04 am
Hello!

Could someone edit this script, to kick after 15 sec a unregistered player? And it would be great, if one IP can create only one profile.

I've tried it on my own, but i still got same error ;(

Code: [Select]
[*] Compiling default -> NickRegistration.pas...
[*] default -> [Error] (103:15): Unknown identifier 'ID'
Title: Re: NickName Registration
Post by: spkka on February 24, 2008, 01:16:04 pm
Zomg!

Since you're using xsplit anyway... Why don't you do stuff := xsplit(text) in OnPlayerCommand and such and then do a Case(stuff[1])? Instead of all those If's with Copy(text ... o.O

I kinda wrote it so people would understand what everything does. I agree its not written perfectly :P
---

Pawi thats not so hard, you mind trying it yourself? Im a bit busy with other things lately.
Just check on onjointeam if that player/ip got a profile or not. So something like if fileexist(nameprofile.txt) = false then kick player..
Do the same for the 1 profile per ip.
Its not that hard :D

Title: Re: NickName Registration
Post by: Pawi on February 25, 2008, 09:25:05 am
C'mon guys, i really need that improve. :(
Title: Re: NickName Registration
Post by: Miszkol_ on April 23, 2008, 03:23:42 am
Hey!

My server i survival mode on and i see my stats(example):
Kills: 8
Deaths: 4
Selfkills: 100

I think survival mode on collide with script...

H.E.L.P M.E
Title: Re: NickName Registration
Post by: DorkeyDear on April 23, 2008, 02:49:49 pm
I think he is suggesting a check to ignore selfkills if survival is enabled, and the number of alive players on the victim's team is 1 (0 in reality, but it doesn't update yet)
Title: Re: NickName Registration
Post by: Miszkol_ on April 24, 2008, 01:19:22 pm
Sorry i DON'T understand...
Can you do it??(yes/no write, because my English s very looooow...but i teach it ^^).

@EDIT
Can you do this script ignore kills when end round(survival) and not add to stats??
Title: Re: NickName Registration
Post by: DorkeyDear on April 28, 2008, 03:23:52 pm
Sorry i DON'T understand...
Can you do it??(yes/no write, because my English s very looooow...but i teach it ^^).

@EDIT
Can you do this script ignore kills when end round(survival) and not add to stats??
Try this...

Tell me if it works.
Title: Re: NickName Registration
Post by: Miszkol_ on April 29, 2008, 09:03:57 am
Bugs...
Forever 0, 0, 0 or sometimes crazy stats... when i killed my enemy and no deads: 0, 4, 1...
Title: Re: NickName Registration
Post by: DorkeyDear on April 29, 2008, 02:30:30 pm
Bugs...
Forever 0, 0, 0 or sometimes crazy stats... when i killed my enemy and no deads: 0, 4, 1...
i think it updates the stats when the map changes or something like that..
Title: Re: NickName Registration
Post by: Miszkol_ on April 30, 2008, 08:06:40 am
Yes, stats are updated if map is change.
But, may you change it to stats be actualize after round?? Or add to stats "now"??
Title: Re: NickName Registration
Post by: DorkeyDear on April 30, 2008, 03:54:45 pm
Try this
Title: Re: NickName Registration
Post by: Crimson Goth on June 08, 2008, 02:15:42 pm
When I register a nick it doesn't save the profile, stats, ect. I'm nooby at scripting, so idk if it's smtn I didn't do to the script. I just downloaded, added, and recompiled....is there more to it?
Title: Re: NickName Registration
Post by: spkka on June 08, 2008, 03:17:29 pm
NOTE! The script needs  2 folders in your soldat server directory
Make sure those 2 folders got write acces!!!

c:/soldatserver/stats/nickreg
Title: Re: NickName Registration
Post by: Jack the CAMPER on June 21, 2008, 06:26:37 am
hey guys is it possible that one of you can modified the script that when someone joins and his nickname is registered that he have to login or he will be kicked after 30 sec?  i tried it by my onw but i never script something before and i doesn't know much about pascal.
pls help me
Title: Re: NickName Registration
Post by: spkka on June 21, 2008, 08:11:12 am
yes no problem, might do when im back from work tonight or tomorrow
Title: Re: NickName Registration
Post by: Jack the CAMPER on June 21, 2008, 09:31:14 am
oh rly? :o  man ty spkka rly rly ty.     oh i don't know if it's important but i need it for an R/S server
and again i am so happy that you help me and the fast answer    i can't say it too often TY xD.
Title: Re: NickName Registration
Post by: spkka on June 22, 2008, 09:51:44 am
Hope this will work, still need to fix some things...
It will kick a player after 30 seconds if he doesn't login. He can still use logout tho..
Title: Re: NickName Registration
Post by: Jack the CAMPER on June 22, 2008, 11:13:28 am
the first thing i have to say is thx spkaa <3     i have one question: can you make it that a player only get kicked if his nickname is registered and he doesn't login in 30 sec., so that guys with unregistered nickname can play normal?
Title: Re: NickName Registration
Post by: spkka on June 22, 2008, 12:46:23 pm
done
Title: Re: NickName Registration
Post by: Jack the CAMPER on June 22, 2008, 05:18:41 pm
thx spkka that you offer your time for an annoying guy like me
i have one more question and this is rly the last one xD is it possible that this msg: WriteConsole(ID,'You got 30 seconds to login!',BAD); only appeares to players whose nickname's are registered? i hope you want help me again and sry that i am so annoying
Title: Re: NickName Registration
Post by: spkka on June 22, 2008, 07:48:00 pm
ok this checks when a player join a team if he got a profile.. if he does it will check the ip and if it matches with the last time he played it will autologin. Otherwise he got 30 seconds to login..

And i don't mind. Just ask away, if im lazy i will probably don't do anything :P
Title: Re: NickName Registration
Post by: Jack the CAMPER on June 23, 2008, 10:22:53 am
sry spkka it's me again  i have a problem, my server is a R/S/A server now and in the stats it counts selfkills when the round is over and i had surive it and then i die for next round.
Title: Re: NickName Registration
Post by: spkka on June 23, 2008, 10:36:59 am
so you don't want to count selfkills?
Title: Re: NickName Registration
Post by: Jack the CAMPER on June 23, 2008, 12:38:12 pm
no spkka sry that i wrote it so confusing
in Surival mod all guys that surive until the end of the round will get killed so that the next round can start but i don't want that this kills count as selfkills     is that possible?
Title: Re: NickName Registration
Post by: spkka on June 24, 2008, 07:51:39 pm
yes i removed the selfkills from /stats
Title: Re: NickName Registration
Post by: dominikkk26 on January 17, 2010, 01:51:05 pm
What I do not work on server version 2.6.5
Title: Re: NickName Registration
Post by: dominikkk26 on January 20, 2010, 09:07:50 am
_________________________________________________ _________________________________________________ ________
Title: Re: NickName Registration
Post by: echo_trail on January 20, 2010, 10:34:56 am
_________________________________________________ _________________________________________________ ________

User warned.
Title: Re: NickName Registration
Post by: dominikkk26 on February 21, 2010, 08:03:10 am
So he wanted to suggest adding rank calculation and deleting K/D ratio.

(http://i50.tinypic.com/ip44zn.jpg)
Title: Re: NickName Registration
Post by: freestyler on February 21, 2010, 09:32:48 am
...
His translator TLed 'dorobić' as 'earn some extra money', which in this case simply means 'add' (earning extra money isn't wrong translation though, but google translate doesn't support that meaning). So he wanted to suggest adding rank calculation and deleting K/D ratio.

dominikkk26: Nie używaj google translate, bo on nie potrafi dobrze tłumaczyć zdań (zwłaszcza, że po polsku też nie potrafisz pisać). Pisz na polskim forum zamiast tutaj.
Title: Re: NickName Registration
Post by: dominikkk26 on February 21, 2010, 01:52:56 pm
So he wanted to suggest adding rank calculation and deleting K/D ratio.

(http://i50.tinypic.com/ip44zn.jpg)

This version of what I added in the Attach
Title: Re: NickName Registration
Post by: dominikkk26 on June 26, 2010, 02:29:19 am
Hey, if you can earn some extra money in the style spkka auto delete profiles every month and a half. If no one enters a given icku or IP. And remove your own functions. /delete_profile 'nick_name' 'password'

If you know how to let 's do it like zitro ranking stats.

For this version of the script
here (http://forums.soldat.pl/index.php?action=dlattach;topic=23470.0;attach=24313)
Title: Re: NickName Registration
Post by: Cehennem Kamyonu on July 01, 2012, 11:11:21 am
This Script is Don't Work in Soldat 1.6.3 Version How to fix?