Jump to content

XpPaper Skript


DistanceIssues

Recommended Posts

So recently I was looking around for a XpPaper skript, found one but it didnt work, I fixed it tho. Im giving this one for everybody who wanted one but couldn't find one that worked!

 

command /xppaper:
    trigger:
        give a paper named "&c[&fXP PAPER&c]" to player
 
on right click with paper:
    if name of player's tool is "&c[&fXP PAPER&c]":
        give 100 xp to player

Link to comment
Share on other sites

Nice just add perms to /xppaper and add a player,

command /xppaper [<player>]:

    Trigger:

        Give a paper named "&c[&fXP PAPER&c]" to %arg 1%

 

 

this would be useful if you could buy it on buycraft anyway good idea 😄

make the buycraft console execute, "/xppaper {player}" and the player will have it

Edited by Breeze0505
Link to comment
Share on other sites

On 11/2/2020 at 2:33 AM, Breeze0505 said:

Nice just add perms to /xppaper and add a player,

command /xppaper [<player>]:

    Trigger:

        Give a paper named "&c[&fXP PAPER&c]" to %arg 1%

 

 

this would be useful if you could buy it on buycraft anyway good idea 😄

make the buycraft console execute, "/xppaper {player}" and the player will have it

You can only use percentage signs in a string or variable so giving an item to %arg-1% will not work in the context you've put it in. Also not specifying a player in the first argument will not give anything to anyone.

This is a better way of doing it
 

command /xppaper [<player>]:
	trigger:
		give 1 of paper named "&c[&fXP PAPER&c]" to (arg-1 ? sender)

 

The "?" in the expression stats that if the argument is not set, then it will send to the person who executed the command. I hope you can learn from the example above :))
 

Edited by Chickhenry
spelling mistake lol

Hi I'm Henry, owner of multiple unsuccessful servers

 

Link to comment
Share on other sites

9 hours ago, Chickhenry said:

You can only use percentage signs in a string or variable so giving an item to %arg-1% will not work in the context you've put it in. Also not specifying a player in the first argument will not give anything to anyone.

This is a better way of doing it
 


command /xppaper [<player>]:
	trigger:
		give 1 of paper named "&c[&fXP PAPER&c]" to (arg-1 ? sender)

 

The "?" in the expression stats that if the argument is not set, then it will send to the person who executed the command. I hope you can learn from the example above :))
 

An even better way would be:

command xppaper <player=%player%>:
  	trigger:
  		give paper named "&c[&fXP PAPER&c]" to arg-player

This adds a optional <player> argument, if it isn't set, then arg-player is set to the executed user, otherwise, if it is set, it'll be set to the user provided

 

This second part doesn't matter at all, but you don't need to put "1 of", that's completely unnecessary if you're only giving a single item.

  • Like 1

VIP since January 7th, 2020

Support since September 19th, 2020

Helper since November 3rd, 2020

Moderator since March 8th, 2021

unknown.png

5.png.e14b1bf83edf0ac2edc1bfb822177184.png

image.png.fe30b7b2c0be5a541ba4ed2187b23030.png

Link to comment
Share on other sites

On 11/4/2020 at 2:30 AM, TheGoose said:

An even better way would be:


command xppaper <player=%player%>:
  	trigger:
  		give paper named "&c[&fXP PAPER&c]" to arg-player

This adds a optional <player> argument, if it isn't set, then arg-player is set to the executed user, otherwise, if it is set, it'll be set to the user provided

 

This second part doesn't matter at all, but you don't need to put "1 of", that's completely unnecessary if you're only giving a single item.

thanks professor goose

Hi I'm Henry, owner of multiple unsuccessful servers

 

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