viewing paste @pvp on|off + die drop equip | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
 
-   script  atcmd_example   -1,{
OnInit:
    bindatcmd "pvp",strnpcinfo(3)+"::OnAtcommand";
    end;
OnAtcommand:
    if( .@atcmd_parameters$[0] == "on" ){
        @killer = 1;
        if( @killer )
            atcommand "@killer";
    }
    else if( .@atcmd_parameters$[0] == "off" ){
        if( @killer )
            atcommand "@killer";
        @killer = 0;
    }
    else{
        dispbottom "Usage: "+.@atcmd_command$+" <on|off>";
    }
    end;
    
OnPCDieEvent:
    if @killer ){
        do{
            .@equip = getequipid( rand( 1,10 ) );
        }while( .@equip == -1 );
        delequip .@equip;
        getmapxy( .@map$,.@x,.@y,0 );
        makeitem .@equip,1,.@map$,.@x,.@y;
    }
    end;
}
 
Viewed 1309 times, submitted by Emistry.