Example Configs
Default Config
v6.0
Weaponsmithing: visible: true custom: level 1: xpneeded: 1000 up_commands: - give @p 1 2 down_commands: - time set 0 skills: - Wood Swords level 2: xpneeded: 2000 up_commands: - give @p 1 2 down_commands: - time set 2000 skills: - Wood Swords 2 level 3: xpneeded: 3500 up_commands: - give @p 1 2 down_commands: - time set 4000 skills: - Stone Swords 1 level 4: xpneeded: 5000 up_commands: - give @p 1 2 down_commands: - time set 6000 skills: - Stone Swords 2 Armorsmithing: visible: true custom: level 1: xpneeded: 1000 up_commands: - give @p 1 2 down_commands: - time set 8000 skills: - Leather Armor level 2: xpneeded: 2000 up_commands: - give @p 1 2 down_commands: - time set 10000 skills: - Leather Armor 2 level 3: xpneeded: 3500 up_commands: - give @p 1 2 down_commands: - time set 10999 skills: - Leather Armor 3 Lockpicking: visible: true custom: level 1: xpneeded: 100 up_commands: - say A player gained level 1 in lockpicking down_commands: - time set 11000 skills: - Basic Locks 1 level 2: xpneeded: 200 up_commands: - say A player gained level 2 in lockpicking down_commands: - time set 11999 skills: - Basic Locks 2 level 3: xpneeded: 300 up_commands: - say Debug Message that this works. down_commands: - time set 13999 skills: - Basic Locks 3 level 4: xpneeded: 400 up_commands: - say Debug Message that this works. down_commands: - time set 15999 skills: - Basic Locks 4 Magic: visible: false custom: level 1: xpneeded: 100 up_commands: - say A player gained level 1 in Msgic down_commands: - time set 17999 skills: - Basic Magic level 2: xpneeded: 200 up_commands: - say A player gained level 2 in Magic down_commands: - time set 19999 skills: - Basic Magic 2 level 3: xpneeded: 300 up_commands: - say Debug Message that this works. down_commands: - time set 21999 skills: - Basic Magic 3 level 4: xpneeded: 400 up_commands: - say Debug Message that this works. down_commands: - time set 23999 skills: - Basic Magic 4
OtherDrops
Item Granting Skill Points Example
GRASS: - trigger: RIGHT_CLICK tool: PAPER command: /$cpa %p Weaponsmithing 100 drop: dirt message: test successful
Get Money And Skill Points
ZOMBIE: - tool: PLAYER money: +10 command: /$cpa %p Hunting 100 message: You've received $10 and increased your hunting skills.
What is the above code? Well, basically the first one shows you how to make an item grant you experience in a skill that you have in your current config. When you right click Grass while holding Paper you receive the indicated amount of experience for the indicated skill. Note that you have to have the skill "Weaponsmithing" in your config as well for it to work right out of the box.
The 2nd config example basically makes it so that when you kill a zombie with any item, you get 10 of your server's currency and an increase in the skill "Hunting" which is not included in any example configs for Custom Professions so you'd have to add it yourself for this code to work right out of the box.
LoreLocks
First you setup your config like this:
Lockpicking: level 1: xpneeded: 100 skills: - Basic Locks 1 permissions: # - no perm needed here because its first level Lockpicking: level 2: xpneeded: 200 skills: - Basic Locks 2 permissions: - lorelocks.pick.2
Then you'd edit the config for LoreLocks like this:
events: success1: event: success permission: player.success.expgain #this permission is customizable action: server-command payload: 'cpa <player> lockpicking 50' success2: event: success permission: player.success.expgain #this permission is customizable action: server-command payload: 'cpa <player> lockpicking 50'
So now, apart from the permissions part in the custom professions config example, all of this is usable and I'll give you code down below that you can simply copy and paste so its not confusing.
Basically, whenever you successfully lockpick a chest, you get 50 experience. When you successfully lockpick 2 chests, you level up to level 2 and gain access to level 2 lockpicking because Custom Professions adds it to the player's permission automatically.
Here is the code that is usable right now:
Lockpicking: level 1: xpneeded: 100 skills: - Basic Locks 1 Lockpicking: level 2: xpneeded: 200 skills: - Basic Locks 2
With the latest versions of Custom Professions there are now notifications in place. However, even with the above configuration, I've not been able to get it to work properly and The01Guy is working on fixing that as its command related.
Skript Example
on crafting of wood sword: execute the command "cpa %player% Weaponsmithing 10" send "Weaponsmithing increased by 10 xp." to the player on crafting of stone sword: execute the command "cpa %player% Weaponsmithing 20" send "Weaponsmithing increased by 20 xp." to the player on crafting of gold sword: execute the command "cpa %player% Weaponsmithing 30" send "Weaponsmithing increased by 30 xp." to the player on crafting of iron sword: execute the command "cpa %player% Weaponsmithing 40" send "Weaponsmithing increased by 40 xp." to the player on crafting of diamond sword: execute the command "cpa %player% Weaponsmithing 50" send "Weaponsmithing increased by 50 xp." to the player on crafting of wood axe: execute the command "cpa %player% Weaponsmithing 10" send "Weaponsmithing increased by 10 xp." to the player on crafting of stone axe: execute the command "cpa %player% Weaponsmithing 20" send "Weaponsmithing increased by 20 xp." to the player on crafting of gold axe: execute the command "cpa %player% Weaponsmithing 30" send "Weaponsmithing increased by 30 xp." to the player on crafting of iron axe: execute the command "cpa %player% Weaponsmithing 40" send "Weaponsmithing increased by 40 xp." to the player on crafting of diamond axe: execute the command "cpa %player% Weaponsmithing 50" send "Weaponsmithing increased by 50 xp." to the player on crafting of wood shovel: execute the command "cpa %player% Weaponsmithing 10" send "Weaponsmithing increased by 10 xp." to the player on crafting of stone shovel: execute the command "cpa %player% Weaponsmithing 20" send "Weaponsmithing increased by 20 xp." to the player on crafting of gold shovel: execute the command "cpa %player% Weaponsmithing 30" send "Weaponsmithing increased by 30 xp." to the player on crafting of iron shovel: execute the command "cpa %player% Weaponsmithing 40" send "Weaponsmithing increased by 40 xp." to the player on crafting of diamond shovel: execute the command "cpa %player% Weaponsmithing 50" send "Weaponsmithing increased by 50 xp." to the player on crafting of wood hoe: execute the command "cpa %player% Weaponsmithing 10" send "Weaponsmithing increased by 10 xp." to the player on crafting of stone hoe: execute the command "cpa %player% Weaponsmithing 20" send "Weaponsmithing increased by 20 xp." to the player on crafting of gold hoe: execute the command "cpa %player% Weaponsmithing 30" send "Weaponsmithing increased by 30 xp." to the player on crafting of iron hoe: execute the command "cpa %player% Weaponsmithing 40" send "Weaponsmithing increased by 40 xp." to the player on crafting of diamond hoe: execute the command "cpa %player% Weaponsmithing 50" send "Weaponsmithing increased by 50 xp." to the player on crafting of leather helmet: execute the command "cpa %player% Armorsmithing 10" send "Armorsmithing increased by 10 xp." to the player on crafting of leather chest: execute the command "cpa %player% Armorsmithing 20" send "Armorsmithing increased by 20 xp." to the player on crafting of leather leggings: execute the command "cpa %player% Armorsmithing 30" send "Armorsmithing increased by 30 xp." to the player on crafting of leather boots: execute the command "cpa %player% Armorsmithing 40" send "Armorsmithing increased by 40 xp." to the player
So what I've done here is made a Skript where it detects any player making the item in the code and gives them experience relating to the item they just crafted. You can do this with a number of other items and in the next version of Custom Professions you won't need the "send" part of the skript because it will be done for you.
Magic Spells
This section coming soon after testing!
Comments