Jump to content

Use the same Item X times and trigger action.


Flammable
 Share

Recommended Posts

I am willing to pay (if not expensive) to be made a simple plugin (with an idea close to GTA collectibles), where you use(open/consume/unwarp) an item/s defined from the config file (in my case, I have one custom item - based on a large Halloween loot bag with skinID and custom name) and upon unwarping 10 (configurable in the config again) of this same item the plugin will trigger something (effect from the rust assets) and most importantly execute rcon command or something else (not sure what for now) but this will allow a lot of possibilities for me later.  Also, if too expensive to have a small UI that can be toggled with a button ON/OFF to display - ( Icon.png 12/35), a chat message will also do the job just to let players know their current progress when typing a command ex. /checkme - "You have found/opened {itemcount} {item custom name}" or You have found {itemcount}/{maxrequired} {itemname}. 
Please reply here, DM me, or we can chat on discord.

Edited by Flammable
Link to comment
Share on other sites

It's doable, but a tad clarification: Is it that ONE item at a time? It's easy to hook behaviour like this to a single item, but the hook will fire in different circumstances for consume and unwrap/open. The example mentioned, a halloween bag will be easy enough to hook on opening/activation, but ANY such opening will cause the plugin to fire, even if only to confirm it is not a "special" item, and ignore it. Eating is a hook that could be a bit heavy on a high pop server. The bag is rare enough that it's pretty likely the hook will be seldom triggered, and so easier on your server.  Counting the activations I'd create a data file, and add a player's steamid and number of activations in there, and fire a command when the number of activations reaches the total, and then reset the count for that player.

This is of course assuming you mean 10 times per player, and not 10 times per server.

I have a similarly structured idea, but I just asked Yamang to add a counting feature to Commands Item, and given your question, I'm pretty sure you already own that plugin. If not, then buy it if he adds the feature. It's a hella versatile plugin.

I'm fiddling around in the meanwhile with a plugin of my own, but mine doesn't play sounds/effects and doesn't fire a command. I just have several different Commands Item "Coins" and use the plugin to keep track of who is using how many of each, but at a push could be modified to do what you want, and there we run into the rule of schlep : advice is free, but coding costs cash, and my coding is basic AF, and fails in part 2. UI. Me no likely to code UI. I know there's a UI editor availiable on the market, but not worth it for me to buy. Also, it's setup already seems like a large schlep. I'd only get interested if it got to having it's own UI.
 

Link to comment
Share on other sites

Already one guy creating this for me. I want to set in config custom item (lets say for example) 
10 unwarps, 25 unwarps, 50 unwarps, 100 unwarps. Then if player opens the item 10 times something happens (lets say RCON command "say You are nice" and give rock 1) then if he opens 10more nothing will happen (he can trigger this 1 time only) but will have 20/25 (or 10/25) not sure if previous progress will stack towards the old new goal but logic is that you can only get the reward for opening 10, 1 time per wipe., same with 25, 50 and 100... values were expamples it can be 1, 2, 5, 10 or whatever amounts are.
I hope it's actually not too heavy as you mentioned above.
 

Edited by Flammable
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

487.3k

Downloads

Total number of downloads.

2.7k

Customers

Total customers served.

36.5k

Files Sold

Total number of files sold.

613.2k

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.