spiders.js
// Gives the spider a chance to freeze player any time damage is done towards him just change the iNum > 700 to what ever number of chance you want to make it do more.
function onDefense( pAttacker, pDefender )
{
var iNum = RandomNumber( 0, 1000 );
if( iNum > 700 )
{
if( pDefender.health < pDefender.maxhp )
{
pAttacker.frozen = 1;
pAttacker.StaticEffect( 0x10DD, 0, 20 );
pAttacker.SoundEffect( 0x01f2, true );
pAttacker.EmoteMessage("You are caught in the spiders web ");
pAttacker.StartTimer(5000, 0, true);
}
}
}
function onTimer(pAttacker,timerID)
{
var socket = pAttacker.socket;
if(timerID == 0)
{
pAttacker.frozen = 0;
pAttacker.EmoteMessage( "You break free of the web");
}
}
function onDefense( pAttacker, pDefender )
{
var iNum = RandomNumber( 0, 1000 );
if( iNum > 700 )
{
if( pDefender.health < pDefender.maxhp )
{
pAttacker.frozen = 1;
pAttacker.StaticEffect( 0x10DD, 0, 20 );
pAttacker.SoundEffect( 0x01f2, true );
pAttacker.EmoteMessage("You are caught in the spiders web ");
pAttacker.StartTimer(5000, 0, true);
}
}
}
function onTimer(pAttacker,timerID)
{
var socket = pAttacker.socket;
if(timerID == 0)
{
pAttacker.frozen = 0;
pAttacker.EmoteMessage( "You break free of the web");
}
}