Jump to content
  • 0

Mapflag NPC


Question

Posted

Looking for map flag NPC,we can set listed map flag on any map.Example

  • It will ask to set map flag or to turn it off/disable it.

menu "Set mapflag",setmap,"Disable mapflag",disable,"Close",close;

  • It will ask what mapflag we want to use, nobranch,nowarp,nowarpto,etc.

mes "Select which mapflag you want to use?"

menu "No Branch",nobranch,"No Warp",nowarp,"No warp To",nowarpto,"Close",close;

  • after that which map we want to set it.

mes "Name of the map.";

input .@mapname;

  • including turn off/disable the maps functions
  • the other one,only GM can see which maps have set the mapflag(using this NPC).

mes "List of map thats you put mapflags";

prontera : nowarp

prontera : nobranch

payon : nobranch

Is this thing possible?

5 answers to this question

Recommended Posts

Posted (edited)

As far as I know some of the @mapflags doesn't work

may this helps you

- script mf -1,{
OnWhisperGlobal:
set .@name$,"[^0000FFMap Flag Manager^000000]";
if(getgmlevel() >= 50) {
 mes .@name$;
 mes "I can ^00FF00activate^000000 or ^FF0000deactivate^000000 Map Flags on any map.";
 mes "[^FF0000NOTE: Do not use this system on special maps such as PVP, GvP, BG, or Towns.^000000]";
 set .@act1,select("Activate Map Flag:Deactivate Map Flag");
 next;
 mes .@name$;
 mes "Please enter the desired ^0000FFMap^000000";
 input(.@map$);
 next;
 mes "Please select Map Flag";
 set .@act2,select("No Memo:No Teleport:No Save:No Branch:PvP:PvP No Party:PvP No Guild:GvG:GvG No Party:No Trade:No Skill:No Warp:Party Lock:No Ice Wall:Indoors:No Go:No Base EXP Gain:No Job EXP Gain:No EXP Penalty:No Mob Loot:No MvP Loot:No Return:No Warp To:No Nightmare Drop:No Command:No Drop:No Vending:No Chat:Guild Lock") - 1;
 close2;
 setarray .@mf_name[0],mf_nomemo,mf_noteleport,mf_nosave,mf_nobranch,mf_pvp,mf_pvp_noparty,mf_pvp_noguild,mf_gvg,mf_gvg_noparty,mf_notrade,mf_noskill,mf_nowarp,mf_partylock,mf_noicewall,mf_indoors,mf_nogo,mf_nobaseexp,mf_nojobexp,mf_noexppenalty,mf_nomobloot,mf_nomvploot,mf_noreturn,mf_nowarpto,mf_nonightmaredrop,mf_nocommand,mf_nodrop,mf_novending,mf_nochat,mf_guildlock;
 if(.@act2 == 3) {
  switch(.@act1) {
   case 1:
    setmapflag .@map$,.@mf_name[.@act2],"SavePoint";
    break;
   case 2:
    removemapflag .@map$,.@mf_name[.@act2];
    break;
  }
 } else {
  switch(.@act1) {
   case 1:
    setmapflag .@map$,.@mf_name[.@act2];
    break;
   case 2:
    removemapflag .@map$,.@mf_name[.@act2];
    break;
  }
 }
 dispbottom "Command sent.";
} else {
 message strcharinfo(0),"Access Denied: You are not authorized to use this system.";
}
end;
}

Edited by AnnieRuru
use [codebox] if the script > 10 lines
Posted
I wrote this a few years ago, before @mapflag was created:
LOL !!

I also wrote one 5 years ago before I became scripting moderator in eathena forum

just almost the same as your script

anyways, I just rewrite another one from scratch

-	script	jlsfsdkjfhsd	-1,{
OnInit:
bindatcmd "mapflag", strnpcinfo(0)+"::Onaaa", 99, 100; // only GM99 can use

setarray .mapflag, mf_nomemo, mf_noteleport, mf_nosave, mf_nobranch, mf_nowarp, mf_nowarpto; // put in more as needed
setarray .mapflag$, "nomemo", "noteleport", "nosave", "nobranch", "nowarp", "nowarpto";

.size = getarraysize( .mapflag );
end;
Onaaa:
.@map$ = strcharinfo(3);
while (1) {
	mes "Current map -> ^0000FF"+ .@map$ +"^000000";
	for ( .@i = 0; .@i < .size; .@i++ )
		mes .mapflag$[.@i] +" -> "+( ( getmapflag( .@map$, .mapflag[.@i] ) )? "^00CC00On" : "^FF0000Off" )+"^000000";
	next;
	.@menu$ = "Current map -> ^0000FF"+ .@map$ +"^000000";
	for ( .@i = 0; .@i < .size; .@i++ )
		.@menu$ = .@menu$ +":"+ .mapflag$[.@i] +" -> "+( ( getmapflag( .@map$, .mapflag[.@i] ) )? "^00CC00On" : "^FF0000Off" )+"^000000";
	.@s = select( .@menu$ ) -2;
	if ( .@s == -1 ) {
		if ( !input( .@tmp$, 2, 12 ) ) {
			if ( getmapusers(.@tmp$) != -1 ) {
				.@map$ = .@tmp$;
			}
		}
	}
	else if ( getmapflag( .@map$, .mapflag[.@s] ) )
		removemapflag .@map$, .mapflag[.@s];
	else
		setmapflag .@map$, .mapflag[.@s];
}
close; // shouldn't reach
}

  • Upvote 1

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...