Jump to content
  • 0

[Curios]Script Commands Visible?


Azeroth

Question


  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  383
  • Reputation:   121
  • Joined:  03/31/12
  • Last Seen:  

Hi, i'm just wondering or curios if there is a script_commands that is visible? let say, there is 3 'MENUS' i would like to add the other menu will be visible after he will choose a menu e.g {set #freebies,1;} after he will choose the one i 'set' it would not appear anymore if he will talk to the NPC. or might i'm just missing reading with script_commands?

Anythoughts?

I'd be happy to hear it some feedback.

Thank you for reading my Topic.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  1315
  • Reputation:   372
  • Joined:  12/10/11
  • Last Seen:  

You just need to create two sets of menus with the second one checking if a variable is set to X.

Example

if ( #freebies ==  0 ) menu "Menu 1 here",L_Menu1,"Menu 2 here",L_Menu2,"Menu 3 here",L_Menu3;
if ( #freebies ==  1 ) menu "Menu 2 here",L_Menu2,"Menu 3 here",L_Menu3;


L_Menu1:
set #freebies,1;
close;

Hopefully that made sense.

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:  

You could also construct the menu string dynamically, and include checks for your #freebies variable.

set .@menu$, ""; // make sure menu string is empty

set .@menu$, .@menu$ + "Option 1:"; // everyone gets this option
set .@menu$, .@menu$ + "Option 2:"; // everyone gets this option
if (#freebies == 1) set .@menu$, .@menu$ + "Special Option 3:"; // only players who have #freebies set to 1

// show them the menu
switch(select(.@menu$)) {
case 1:
   // stuff
   break;
case 2:
   // stuff
   break;
case 3:
   // stuff
   break;
}

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