Jump to content
  • 0

Use Custom Command To Recall NPC Massage And check Item To Display Text


Dolphin86

Question


  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.06
  • Content Count:  709
  • Reputation:   16
  • Joined:  01/07/12
  • Last Seen:  

hi i would like to ask a script when player use custom commands as @status it will pop up an NPC massage box as normal, and when check item in player inventory it will display text,

example when player use @status

(when use @status this massage will pop up)
menu:
mes "=== (Player Name) status ===";
switch(select("- Weapon Skill:- Bow Skill:- Cancel")){
  case 1:
    mes "Your (check item in inventory = Wepon skill lvl 1 )";
    switch(select("- Check other skill:- Cancel")){
      case 1:
        goto menu;
        end;
       
      case 2:
        mes "cancel";
        close;
   		 }
  case 2:
        mes "Your (check item in inventory = Bow skill lvl 1 )";
    switch(select("- Check other skill:- Cancel")){
      case 1:
        goto menu;
        end;
       
      case 2:
        mes "cancel";
        close;
   		 }
	}
}
inventory items :
40040 Weapon skill lvl 1 (etc)
40041 Bow Skill lvl 1 (etc)

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  132
  • Reputation:   53
  • Joined:  06/02/12
  • Last Seen:  

-	script	StatusMessage#command	HIDDEN_WARP_NPC,{
OnMenu:
	mes "=== " + strcharinfo(0) + " status ===";
	switch(select("- Weapon Skill", "- Bow Skill", "- Cancel")) {
		case 1:
			if (countitem(40040)) {
				mes "Your ^0000FFWeapon Skill^000000 is Lvl 1.";
			}
			else {
				mes "^FF0000You don't have this Skill.^000000";
			}
			break;
		case 2:
			if (countitem(40041)) {
				mes "Your ^0000FFBow Skill^000000 is Lvl 1.";
			}
			else {
				mes "^FF0000You don't have this Skill.^000000";
			}
			break;

		case 3:
			close;
	}

	switch(select("- Check other skill:- Cancel")) {
		case 1:
			clear;
     		goto OnMenu;
     	case 2:
	        close;
	}

OnInit:
	.@command$ = "status";	//CHANGE HERE @COMMAND TO SEE MESSAGE

	bindatcmd .@command$,strnpcinfo(3)+"::OnMenu";
	end;
}

 

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