summaryrefslogblamecommitdiff
path: root/npc/023-4/traps.txt
blob: 9de778cc8c431559d563f1c640c68a907204a973 (plain) (tree)

























































                                                                    
// TMW2 Scripts
// Author:
//   Jesusalva
// Description:
//   Advanced Spike Traps

/////////////////////////////
023-4,60,51,0	script	#SpikeTrap	NPC_TRAP_B,1,1,{
    end;

OnInit:
    .damage=0;
    .time=0;
    .goal=rand2(5,10);
    initnpctimer;
	end;

OnTouch:
OnTouchNPC:
    if (.damage) {
        if (playerattached()) {
            percentheal -80, 0;
        } else {
            sc_start SC_WALKSPEED, 15000, 60;
            sc_start SC_STUN, rand2(3000), 1;
        }
    }
    specialeffect(11, AREA, strnpcinfo(0));
    end;

OnTimer1000:
	.time+=1;
    if (.time > .goal) {
        .damage = !(.damage);
        .time = 0;
        if (.damage)
            setnpcdisplay strnpcinfo(0), NPC_TRAP_ONLINE_B;
        else
            setnpcdisplay strnpcinfo(0), NPC_TRAP_B;
    }
    initnpctimer;
    end;
}

023-4,50,60,0	duplicate(#SpikeTrap)	#SpikeTrap001	NPC_TRAP,1,1
023-4,31,59,0	duplicate(#SpikeTrap)	#SpikeTrap002	NPC_TRAP,1,1
023-4,31,48,0	duplicate(#SpikeTrap)	#SpikeTrap003	NPC_TRAP,1,1
023-4,22,50,0	duplicate(#SpikeTrap)	#SpikeTrap004	NPC_TRAP,1,1
023-4,39,39,0	duplicate(#SpikeTrap)	#SpikeTrap005	NPC_TRAP,1,1
023-4,42,42,0	duplicate(#SpikeTrap)	#SpikeTrap006	NPC_TRAP,1,1
023-4,52,44,0	duplicate(#SpikeTrap)	#SpikeTrap007	NPC_TRAP,1,1
023-4,50,46,0	duplicate(#SpikeTrap)	#SpikeTrap008	NPC_TRAP,1,1
023-4,47,28,0	duplicate(#SpikeTrap)	#SpikeTrap009	NPC_TRAP,1,1
023-4,44,28,0	duplicate(#SpikeTrap)	#SpikeTrap010	NPC_TRAP,1,1
023-4,42,25,0	duplicate(#SpikeTrap)	#SpikeTrap011	NPC_TRAP,1,1
023-4,39,24,0	duplicate(#SpikeTrap)	#SpikeTrap012	NPC_TRAP,1,1