DistanceIssues Posted October 31, 2020 Share Posted October 31, 2020 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 More sharing options...
Breeze0505 Posted November 1, 2020 Share Posted November 1, 2020 (edited) 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 November 1, 2020 by Breeze0505 Link to comment Share on other sites More sharing options...
DistanceIssues Posted November 1, 2020 Author Share Posted November 1, 2020 Thank you! Link to comment Share on other sites More sharing options...
Breeze0505 Posted November 2, 2020 Share Posted November 2, 2020 No Problem I also made it so if the paper has a ore itll work because players can just do /iname (name of paper) Link to comment Share on other sites More sharing options...
Chickhenry Posted November 3, 2020 Share Posted November 3, 2020 (edited) 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 November 3, 2020 by Chickhenry spelling mistake lol Hi I'm Henry, owner of multiple unsuccessful servers Link to comment Share on other sites More sharing options...
UntitledGoose Posted November 3, 2020 Share Posted November 3, 2020 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. 1 VIP since January 7th, 2020 Support since September 19th, 2020 Helper since November 3rd, 2020 Moderator since March 8th, 2021 Link to comment Share on other sites More sharing options...
Chickhenry Posted November 5, 2020 Share Posted November 5, 2020 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now