Jump to content
  • 0
Sign in to follow this  
MikZ

Permanent Gate Barricade OnCommand

Question

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;
 

 

Edited by MikZ
Solved

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.