Jump to content
  • 0

Need help adjusting a set menu..


Question

Posted (edited)

set .@menu$, "";
for(set .@i,1; .@i < 11; set .@i,.@i+1){
  if(.@menu$ == "")
  set .@menu$, (($@status[.@i]==0)?"Level 1 (Easy)":""+(($@status[.@i]==1)?"Level 2 (Medium)":"Level 3 (Hard)")+"");
  else
  set .@menu$,.@menu$ +":"+(($@status[.@i]==0)?"Level 1 (Easy)":""+(($@status[.@i]==1)?"Level 2 (Medium)":"Level 3 (Hard)")+"");
}
set .@room, select(.@menu$);

This is a code that someone else made for me, so I'm not too familiar with these types of menus... but if anyone can help, I would like to add one more level to this menu.

Right now, when I do "set $@status[.@room], $status[.@room] + 1;", the status on the menu will change from "Level 1 (Easy)" to "Level 2 (Medium)" and if +1 again, it would change the status to "Level 3 (Hard)". I seem to have trouble when trying to add a fourth status after level 3. It's a little bit tricky (the format of this menu), so if someone can help me add Level 4, that would be great.

Edited by sizenine

1 answer to this question

Recommended Posts

Posted

set .@menu$, "";

for(set .@i,1; .@i < 11; set .@i,.@i+1){

if(.@menu$ == "")

set .@menu$, (($@status[.@i]==0)?"Level 1 (Easy)":""+(($@status[.@i]==1)?"Level 2 (Medium)":""+(($@status[.@i]==2)?"Level 3 (Hard)":"Level 3 (SuperHard)")+"");

else

set .@menu$,.@menu$ +":"+(($@status[.@i]==0)?"Level 1 (Easy)":""+(($@status[.@i]==1)?"Level 2 (Medium)":""+(($@status[.@i]==2)?"Level 3 (Hard)":"Level 4 (Super Hard)")+"");

}

set .@room, select(.@menu$);

I couldn't test it, but it should be work.

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...