Permanent Gate Barricade OnCommand

MikZ

New member
Messages
461
Points
0
Good day Master scripters.

Seeking for assistance please.

How to set the barricade permanent if I enable them no other command can disable them unless I disable them.
I want them to be permanent until I disable them.

Scenario is:

  • If I @reloadscript the barricade will disappear.
  • If I restart the server the barricade will disappear too
// =============================
/* Novice Barricade: http://herc.ws/board/topic/13730-gate-script-request/
----------------------------
by: Legend
compatible w/: Hercules
----------------------------
Description:
* Enables you to activate or deactivate
barricades on "new_1-1" map
* Can be activated by using "@barricade" command
* Visual barricades were added (NPC dummies)
*/
// =============================

- script request#3 FAKE_NPC,{
OnInit:
bindatcmd "barricade",strnpcinfo(3)+"::OnMain",99,99;
.npc$ = "[ Barricade Manager ]";
.map$ = "new_1-1";
.checkbarricade = 0;
delwall "OnBarricade";
disablenpc "Barricade#1";
disablenpc "Barricade#2";
disablenpc "Barricade#3";
disablenpc "Barricade#4";
end;

OnMain:
mes .npc$;
mes "What would you like to do?";
mes "Status: "+(.checkbarricade? "[ ^28bf00Active^000000 ]":"[ ^777777Inactive^000000 ]");
next;
menu (.checkbarricade? "^777777Disable Barricades^000000":"^28bf00Enable Barricades^000000"),L_status,
"Nevermind",L_close;
L_status:
close2;
if (!.checkbarricade) {
.checkbarricade = 1;
dispbottom "Barricades were deployed!";
setwall .map$,68,113,4,4,1,"OnBarricade";
enablenpc "Barricade#1";
enablenpc "Barricade#2";
enablenpc "Barricade#3";
enablenpc "Barricade#4";
end;
}
.checkbarricade = 0;
dispbottom "Barricades were removed!";
delwall "OnBarricade";
disablenpc "Barricade#1";
disablenpc "Barricade#2";
disablenpc "Barricade#3";
disablenpc "Barricade#4";
end;

L_close:
mes .npc$;
mes "Anytime you wish";
close;
}

// -- NPC Dummies & Duplicates
new_1-1,68,113,4 script Barricade#1 BARRICADE,{
end;
}
new_1-1,68,112,4 duplicate(Barricade#1) Barricade#2 BARRICADE
new_1-1,68,111,4 duplicate(Barricade#1) Barricade#3 BARRICADE
new_1-1,68,110,4 duplicate(Barricade#1) Barricade#4 BARRICADE


Kindly Disregard: SOLVE

OnInit:
    bindatcmd "barricade",strnpcinfo(3)+"::OnMain",99,99;
    .npc$ = "[ Barricade Manager ]";
    .map$ = "new_1-1";
    setwall .map$,68,113,4,4,1,"OnBarricade";
    end;
 

 
Last edited by a moderator:
Back
Top