|
||
|
|||||||
| Custom Script Release Archive This is a pre-script database archive of what our users had released. |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Guest
Posts: n/a
|
SafeResContext by Xanthos
This code provides a way to make players invulnerable for a short time upon resurrection so they will not be killed immediately after. It also allows one or more skills to be disabled while players are invulnerable so they wont exploit their temporary safe status. Players stats are restored to full and the death robe is removed. If a player loses connection or logs out while invulnerable they are made mortal again. This code is server friendly in that it adds no additional timers to the system. It relys on an already implemented periodically called method to make players vulnerable again once the time limit has been reached. This means that it may not be quite as precise as a Timer based res-kill protection feature, but it wont be far off and this is preferred to increasing server lag by adding additional timers. This feature consists of two parts. A C# class file that is added to your custom folder, and a few lines of code that must be inserted into your PalyerMobile.cs (see PlayerMobileMods.txt). You are free to use or modify this code in anyway you see fit. I ask that you leave the orginal header intact if you redistribute it in any way. - Xan |
|
|
#5 (permalink) |
|
Guest
Posts: n/a
|
Looks like I made a change in my PlayerMobile and forgot to merge it back into the text file. In playerMobile.cs change the line:
Code:
if ( null != m_SafeResContext ) m_SafeResContext.CheckTimer( this ); // <- Xanthos Safe Res change this line only to if ( null != m_SafeResContext ) m_SafeResContext.Check(); // <- Xanthos Safe Res change this line only |
|
|
#8 (permalink) | ||
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Quote:
just add something in OnLogin if AccessLevel == AccessLevel.Player Blessed = false; that isnt exactly what you'd need to add but it should get you going in the right direction.
__________________
Quote:
Just a Simple Staff Tool You can leave me messages. Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else." |
||
|
|
|
|
#9 (permalink) | |
|
Guest
Posts: n/a
|
Quote:
|
|
|
|
#10 (permalink) | |
|
Guest
Posts: n/a
|
Quote:
|
|
|
|
#11 (permalink) | ||
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
Quote:
I was only offering a suggestion. It was where i had my check, since I have something that offers 2 minutes invuln so they can get back to there corpse and get their stuff... but your method would be fine. It is your script afterall.
__________________
Quote:
Just a Simple Staff Tool You can leave me messages. Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else." |
||
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|