Trammel Rulset Script

Got any custom JavaScript additions/tweaks you think other people would like to see? Post 'em here!
Post Reply
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Trammel Rulset Script

Post by dragon slayer »

This is a quick and dirty ruleset.
function onCombatStart( pAttacker, pDefender )
{
    if( pAttacker.worldnumber == 0 && pDefender.isChar )
    {
        pAttacker.SysMessage( "You cannot perform beneficial acts on your target." );
        return false;
    }
}

function onSpellTarget( myTarget, myTargetType, pCaster, spellID )
{
    var socket = pCaster.socket;
    if( socket != null )
    {
        if( pCaster.worldnumber == 0 )
        {
            if( myTarget.isChar )
            {
                pCaster.SysMessage( "You cannot perform beneficial acts on your target." );
            }
        }
    }
    return 2;
}

function onSteal( pThief, iStolen, pVictim )
{
    if( pThief.worldnumber == 0 && pVictim.isChar )
    {
        pThief.SysMessage( "You cannot perform beneficial acts on your target." );
        return true;
    }
}
These users thanked the author dragon slayer for the post:
Xuri
Post Reply