MikuAuahDark: Reconnect-Restore v1.1 
15 comments 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
MikuAuahDark: Log Capture v1.0 (2))
Delete saved data after x seconds(configurable, uses
Timer Extra function(timerEx) v4.0 (12))
You also can use
[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(
log,
leave,
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
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
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
Saving only works for player with ID 1
V1.0
...
I'm sure that screenshot doesn't needed


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


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.














Install it as usual(see download page)













* - Doesn't re-allocated when already exists











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*)")






















I'm sure that screenshot doesn't needed
edited 1×, last 22.12.14 11:06:00 am

Comments
15 comments



Log in!
You need to log in to be able to write comments!Log in
@
VADemon: Ok, i'm gonna add it later. Now i'm focus at music(learn to make music).

@
VADemon: well, restoring someone building can cause undefined berhaviour when someone also building at same position


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
mp_killbuildings allows buildings to remain. How about restoring these? (Only when the buildings were not destroyed or rebuilt)
I thought a bit about construction servers: they tend to run for hours without restarts, but when a player leaves


When I was reading the title.. I tought it was going to fix the issue with the /reconnect fix. But it's useful.
@
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.

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.
@
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)

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)
@
Hellcat: Nope:
The only thing this needs is a cleaner description. I can't stand reading this.

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.



