Jump to content
  • 0

hilight text on menu if a condition is set


iraciz

Question


  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   108
  • Joined:  10/05/12
  • Last Seen:  

Good day everybody

is it possible  to change text color inside a menu index if a variable is set? 

for example:   

menu
"^BDBDBD - Amatsu Field ^000000",F1,
"- Yuno Fields",F29;

Amatsu locked, This is a default a gray color like not unlocked yet,   how to change the color to black if this variable is set :    #warpamf

in Few words, I want this text in gray if the map is locked (meaning that not variable set), and black if the map mas unlocked. 

mobchatfix.png.4c793e2fab1cbe859d0ac4154f5c231d.png

 

Actually I am implementing an unlocking warper, where you have to bring items one time for a life time selected field or dungeon unlock.  

Would be even greater if I find a way to change tex colors inside the menu. any idea?

// --------------------------------------------------
	Fields:
// --------------------------------------------------
@f = true;
menu
"- Amatsu Field",F1, 
"- Ayothaya Fields",AYO,
"- Brasilis Fields",BRAF,
"- Comodo Fields",COMO,
"- Dewata Fields",F6,
"- Einbroch Fields",EIN, 
"- El Dicastes Fields",F9,
"- Geffen Fields",FG,
"- Gonryun Fields",F11,
"- Hugel Fields",HUG,
"- Lighthalzen Fields",LIF,
"- Louyang Field",F15,
"- Lutie Field",F16,
"- Malaya Fields",F17,
"- Manuk Fields",MAN,
"- Mjolnir Fields",F19, 
"- Niflheim Fields",F21,
"- Payon Forests ",PFT,
"- Prontera Fields",PF,
"- Rachel Fields",RAF,
"- Sograt Deserts ~ ^B43104Morroc Fields^000000",SOG,
"- Sograt Deserts ~ ^A901DBMorroc Dimensional^000000",MOD,
"- Splendide Fields",F26,
"- Umbala Fields",F27, 
"- Veins Fields",VF,
"- Yuno Fields",F29;

//-------------------------------------------------AMATSU FIELDS DESBLOQUEABLE-----------------------------------------------------------------------
F1: setarray @c[2],174,324;
if(#warpamf ){
cutin "jpn_mid02",2;
mes "^0000FFWarp Agent^000000";
mes "Tienes desbloqueado el Spot de Hydras en Amatsu field:";
specialeffect 567;
specialeffect 618;
npctalk "Warper: Granted Access for "+strcharinfo(0)+".!";
Disp("- Amatsu Field ~ ^0B6121Hydra Spot^000000 ["+getmapusers("ama_fild01")+"]"); Pick("","ama_fild01");
end;
}

if( countitem(748) < 1 ) goto faltarouse;
npctalk "Requiere 1 Witherless Rose para un desbloqueo permanente.";
cutin "jpn_mid05",2;
progressbar "ffff00",1;
specialeffect 567;
cutin "jpn_mid05",2;
npctalk "Vaya! has conseguido la rosa, eres digno merecedor del acceso.!";
specialeffect 618;
cutin "warper",2;
mes "^0000FFAgente Warp^000000";
mes "Felicidades!.";
specialeffect2 367;
specialeffect2 71;
delitem 748,1;
getitem 7539,3;
set #warpamf,1;
announce "Warper: Felicidades, haz desbloqueado un atajo facil!",bc_yellow|bc_self;
Disp("- Amatsu Field ~ ^0B6121Hydra Spot^000000 ["+getmapusers("ama_fild01")+"]"); Pick("","ama_fild01");
end;

faltarouse:
npctalk "Requiere 1 Witherless Rose";
mes "^0000FFAgente Warp^000000";
mes "Me encantaria llevarte, pero necesitas 1 ^FF0000Witherless Rose^000000";
cutin "",255;
end;

 

Edited by iraciz
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  928
  • Reputation:   170
  • Joined:  04/05/13
  • Last Seen:  

You can use select commands.

for (.@i = 0; .@i < getarraysize(.menus); .@i++){
		if(unlocked[.@i]){
			.@menu$ += "- Color";
		}else{
			.@menu$ += "- No Color";
		}
	}
	.@select_menu = select(.@menu$);

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  140
  • Topics Per Day:  0.03
  • Content Count:  562
  • Reputation:   108
  • Joined:  10/05/12
  • Last Seen:  

Don't understand how to apply this. The npc unlocks dungeons each one by one. 

The select suggest grab all  labels at once, and can't be.

Edited by iraciz
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...