Jump to content
  • 0

Allow command when item is equipped


Question

Posted (edited)

Hey all!

What is the best approach to do what the title says?

 

Example: Suppose there's a command @dosomething, and by default nobody can use it. Now, there's an item called AnItem that when equipped allow me to use the @dosomething command. Again, it ALLOWS me to use the command, it doesn't automatically activate it.

Edited by Althezier
Add more details

3 answers to this question

Recommended Posts

  • 0
Posted
-	script	asdsadas	-1,{
	OnDoSmtg:
		if (!countitem(.item_id)) end;
		dispbottom "Command activated.";
		end;
	
	OnInit:
		bindatcmd "dosomething", strnpcinfo(1) + "::OnDoSmtg";
		.item_id = 5001;
		end;
}

 

  • Upvote 1
  • 0
Posted

If it was bindatcommand just use countitem function

If it was source command it need to do it on src folders. (Find all by put target commands in finding box then use count item function (Not sure how to count it but you can try search in src folders))

  • Upvote 1

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