Jump to content
  • 0

Need help adjusting a set menu..


sizenine

Question


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  149
  • Reputation:   12
  • Joined:  02/17/12
  • Last Seen:  

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

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  59
  • Reputation:   1
  • Joined:  01/15/12
  • Last Seen:  

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.

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