English MikuAuahDark: Reconnect-Restore v1.1 icon

15 comments
21.07.14 01:27:21 pm
like 7 like it!
3 kb, 385 Downloads
MikuAuahDark
User
Offline Off
Reconnect-Restore by MikuAuahDark

∗ Table of Contents ∗
1. Description
2. Features
3. Installation
4. Configuration
5. Reserved Variables
6. Useful Info
7. Notes
8. Limitations
9. Rules
10. Version History

∗ Description ∗
Just long time not uploading a script. Hey wait, i'm still alive, i'm just start learn to be a music producer.
This Lua allows you to restore all of your stats, position, weapons, and addtional script-specific stats data when you reconnect from connection problems.

∗ Features ∗
> Restores weapon and ammo(uses file cs2d MikuAuahDark: Log Capture v1.0 (2))
> Delete saved data after x seconds(configurable, uses file cs2d Timer Extra function(timerEx) v4.0 (12))
> You also can use file cs2d [ADMN, DEV] Permissions - WIP (13) if you want.
> Should compatible with another scripts(also you can save script-specific data, example: your saved position in blocker's roleplay lua)

∗ Installation ∗
Install it as usual(see download page)

∗ Configuration ∗
> Recs.Permissions - Use VADemon's permissions(default false). The permission is reconnect.restore
> Recs.IPMatch - Match only x sequence of IP(default 3). If you only expect static-ip only, set to 4
> Recs.Timeout - Delete saved player data after x seconds(default 60)
> Recs.AddtionalData - List of table reference that retrieved when timeout(another script-specific table should be here. Just put the table name without quotes)

∗ Reserved Variables ∗
> Recs
> timerEx*
> freetimerEx*
> LogCapture*
* - Doesn't re-allocated when already exists

∗ Useful Info ∗
> 223 lines of code
> You can add your addtional data with table.insert(Recs.AddtionalData,<your data table name without quotes>)(key is player id)
> Uses 3 hooks(cs2d lua hook log,cs2d lua hook leave,cs2d lua hook join)
> It only save player data when leave reason is 1 or 9

∗ Notes ∗
1. Again, again, and again. Your feedbacks, bug reports on comments.
2. This is my first lua which uses UNIX End-Of-Line system.
3. I just test some parts of it. Like, it's basic feature.
4. Sometimes it doesn't set your weapon to your last-used weapon
5. Because bug in v1.0, you can update to v1.1 by replacing line 174 with this
Code:
local t,ain,a=w:match("Titem: #0, pl: %d+, typ: (%d*) %([^,]*%), a: (%d*)|(%d*)")


∗ Limitations ∗
> Skin look doesn't saved.

∗ Rules ∗
√ You can use it for your lua and your server
√ You can edit it
√ Share to others
√ Say user MikuAuahDark made it
√ Reupload with me on credits
× Say you made it
× Redistribute your edited version
× Re-upload without me on credits

∗ Version History ∗
> V1.1
>> FIXED Saving only works for player with ID 1
> V1.0
>> INFO ...

I'm sure that screenshot doesn't needed
edited 1×, last 22.12.14 11:06:00 am
ok This file has been reviewed and approved by Seekay (04.12.15 01:06:16 pm)

Comments

15 comments
Goto Page
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in
24.11.14 01:52:46 pm
like I like it!
Up
BountyHunter
User
Offline Off
10/10
07.10.14 08:52:26 pm
like I like it!
Up
Ajmin
User
Offline Off
1 of the Awefull lua
07.10.14 08:46:16 pm
like I like it!
Up
NiceBad
User
Offline Off
Itihink this simple but good
23.07.14 05:17:59 pm
like I like it!
Up
SpriNG
User
Offline Off
Its pretty much useful, it really deserves a like.
23.07.14 05:03:33 pm
Up
MikuAuahDark
User
Offline Off
@user VADemon: Ok, i'm gonna add it later. Now i'm focus at music(learn to make music).
23.07.14 04:14:23 pm
like I like it!
Up
VADemon
User
Offline Off
user MikuAuahDark in case when there's another building - simply do not restore.
22.07.14 05:07:54 am
Up
MikuAuahDark
User
Offline Off
@user VADemon: well, restoring someone building can cause undefined berhaviour when someone also building at same position
21.07.14 10:41:00 pm
like I like it!
Up
VADemon
User
Offline Off
A nice script for RPGs.
I thought a bit about construction servers: they tend to run for hours without restarts, but when a player leaves cs2d cmd mp_killbuildings allows buildings to remain. How about restoring these? (Only when the buildings were not destroyed or rebuilt)
21.07.14 05:25:10 pm
like I like it!
Up
TrialAndError
User
Offline Off
When I was reading the title.. I tought it was going to fix the issue with the /reconnect fix. But it's useful.
21.07.14 03:49:33 pm
Up
XoOt
Super User
Offline Off
@user Hellcat:
Pointless. If you want to learn how this works open the lua and simply read it. Screenshots wont help as its not supposed to be visible. Its a auto stat saving system. Means if you lag out of the game and reconnect you will just continue where you stoped before.
21.07.14 03:35:26 pm
like I like it!
Up
UnkN
User
Offline Off
Restore money, level, after reconnect. Good description.
21.07.14 01:45:29 pm
Up
MikuAuahDark
User
Offline Off
@user Yates: What does i mean stats is health, armor, maxhealth, and money. Please note that it doesn't save score and deaths because it would lead to problems in stats file.
Also what i mean script-specific stats data is a data that only another script have(example, worldedit selection). It only saved when a player getting connections problems(timeout)
21.07.14 01:43:36 pm
Up
Hellcat
GAME BANNED
Offline Off
user Yates: Screenshots for to learn better
21.07.14 01:40:54 pm
Up
Yates
Reviewer
Offline Off
@user Hellcat: Nope:
Quote:
This Lua allows you to restore all of your stats, position, weapons, and addtional script-specific stats data when you reconnect from connection problems.

The only thing this needs is a cleaner description. I can't stand reading this.
21.07.14 01:32:22 pm
Up
Hellcat
GAME BANNED
Offline Off
Yes, Screenshoot needed.
To the start Previous 1 Next To the start