Kieren
The OGz
Look for 'internal int _breakTime;'. After that add:
Look for 'private Thread workoutDosLooper;'. After that add:
Look for 'private void punchCoolDown()'. After that void add:
Add this void:
Add this command:
After 'int hit = str_mod * hit_dif_0 + hit_dif_1;' put:
Before 'Room.sendShout(roomUser, "*Swings at " + args[1] + ", causing " + hit + " damage*");' add:
Credits: ProffAwesome
(No screen shots were released, sorry)
Details: This command is to block any target that tries the :hit command for RP hotels.
PHP:
internal bool _isBlocking;
Look for 'private Thread workoutDosLooper;'. After that add:
PHP:
private Thread blockCooldown;
Look for 'private void punchCoolDown()'. After that void add:
PHP:
private void blockCoolDown()
{
int iCount = 0;
try
{
while (true)
{
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
iCount++;
if (iCount > 15)
{
blockCooldown = null;
blockCooldown.Abort();
}
Thread.Sleep(1000);
}
}
}
catch
{
Thread.CurrentThread.Abort();
blockCooldown = null;
}
}
Add this void:
PHP:
private void stopBlocking()
{
Thread.Sleep(3000);
Room.sendSaying(roomUser, "*moves out of defensive stance*");
_isBlocking = false;
roomUser.walkLock = false;
ThreadStart blockCdStarter = new ThreadStart(blockCoolDown);
blockCooldown = new Thread(blockCdStarter);
blockCooldown.Priority = ThreadPriority.Lowest;
blockCooldown.Start();
}
PHP:
#region :block
case "block":
{
if (blockCooldown != null)
{
_isBlocking = true;
Room.sendSaying(roomUser, "*goes into a defensive stance to sustain impact*");
roomUser.walkLock = true;
stopBlocking();
}
else
{
Room.sendWhisper(roomUser, _Username, "You must wait to go into block stance again");
}
break;
}
#endregion
PHP:
if (User._isBlocking == true)
{
User.Room.sendShout(User.roomUser, "*blocks the hit of " + _Username + "*");
if (hit <= 10)
hit = 0;
else
hit = hit - 10;
}
Before 'Room.sendShout(roomUser, "*Swings at " + args[1] + ", causing " + hit + " damage*");' add:
PHP:
if (hit > 0)
Credits: ProffAwesome
(No screen shots were released, sorry)
Details: This command is to block any target that tries the :hit command for RP hotels.