Jump to content

Help please


Landec

Recommended Posts

I found this script that gives everyone a random item every 30 seconds and really need a toggle on it i did see it already exists but it didnt work on my server so could someone please add a toggle to this script

 

every 30 seconds:
    add 1 of (random item out of all items) to inventory of all players

 

thanks

Link to comment
Share on other sites

 

options:
	permission: toggle.permission
	permission message: &cInsufficient Permissions
	item timer: 30
	toggle on: &aEnabled random items
	toggle off: &cDisabled random items

every {@item timer} seconds:
	if {itemtoggle} is true:
		add 1 of (random item out of all items) to inventory of all players


command /toggle:
	permission: toggle.permission
	permission message: &cInsufficient Permissions
	trigger:
		if {itemtoggle} is not set:
			set {itemtoggle} to true
			send "{@toggle on}"
		else:
			delete {itemtoggle}
			send "{@toggle off}"

 

Link to comment
Share on other sites

The person above sent a skript thats a global toggle meaning a staff member can toggle weather or not people get items. If you want a per person toggle, meaning each person can toggle it for themselves, here it is.

every 30 seconds:
	give a random item out of all items to all players where [{random::%input's uuid%} is set]

command /toggle:
	trigger:
		if {random::%player's uuid%} is set:
			delete {random::%player's uuid%}
			send "random items disabled"
		else:
			set {random::%player's uuid%} to true
			send "random items enabled"

Not sure if this will 100% work but try it. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

10 minutes ago, _Tarna_ said:

The person above sent a skript thats a global toggle meaning a staff member can toggle weather or not people get items. If you want a per person toggle, meaning each person can toggle it for themselves, here it is.


every 30 seconds:
	give a random item out of all items to all players where [{random::%input's uuid%} is set]

command /toggle:
	trigger:
		if {random::%player's uuid%} is set:
			delete {random::%player's uuid%}
			send "random items disabled"
		else:
			set {random::%player's uuid%} to true
			send "random items enabled"

Not sure if this will 100% work but try it. 

ok ill try it thx

Link to comment
Share on other sites

27 minutes ago, Landec said:

it works although does it give each individual player a random item or does every player get the same item

Not sure. Think it gives the every person the same item. If so, try changing the every 30 seconds part to this.

every 30 seconds:
	loop all players:
		{random::%loop-player's uuid%} is set
		give a random item out of all items to loop-player

 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

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
×
×
  • Create New...