Jump to content
  • 0

Mapflag NPC


RAWRs

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  76
  • Reputation:   1
  • Joined:  11/17/11
  • Last Seen:  

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?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

There's already @mapflag (set/remove mapflags) and @mapinfo (display map data, including mapflags). o:

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   34
  • Joined:  05/30/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

I wrote this a few years ago, before @mapflag was created:

test_setmapflag.txt

It's missing newer mapflags and it could be improved (like PMing the npc instead of clicking it).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  76
  • Reputation:   1
  • Joined:  11/17/11
  • Last Seen:  

Thanks a lot! i will try this first.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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
Link to comment
Share on other sites

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.

×
×
  • Create New...