-
Notifications
You must be signed in to change notification settings - Fork 1
Example DSL for class definitions.
This is a working class file, using a domain specific language(dsl). Thats the fancy name, but really its just a structured boo script. Its a cleaner way IMO of configuring your data.
This is working in the latest version of leveling-- but there's still some kinks that need working out. For instance, boo scripting hooks are now supported for the dsl, but not for the json defined classes. Also, it cant determine the difference between json or the boo dsl on its own yet, so I have it hardcoded currently.
Theres also code in place for spitting out a boo dsl, so you could turn your json defined classes into this automatically... but I haven't worked out how to best give you access to the converter yet. Thats actually how this file was built, it originates from a json class file. I added the script hooks by hand.
Name 'hunter'
DisplayName 'Hunter'
DisplayInfo
PrerequisiteLevelNames 'adventurer_5'
PrerequisitePermissions
AllowSwitching true
AllowSwitchingBeforeMastery true
Level 'hunter_0':
DisplayName 'Level 0'
ExpRequired 1
Prefix '[c/b35900:[Hunter][c/b35900:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp
CommandsOnLevelDown
Level 'hunter_1':
DisplayName 'Level 1'
ExpRequired 360
Prefix '[c/b35900:[lv 1 Hunter][c/b35900:]] '
CommandsOnLevelUpOnce ('/giveonce "$name" "Copper Broadsword" 1',
'/giveonce "$name" "Wooden Bow" 1',
'/give "Wooden Arrow" "$name" 40',
'/give "Archery Potion" "$name" 1',
'/giveonce "$name" "Iron Helmet" 1',
'/giveonce "$name" "Iron Chainmail" 1',
'/giveonce "$name" "Iron Greaves" 1',
'/sendto "$name" 255,255,0 You Have Gained Knowledge of The Hunter Skill Set')
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_2':
DisplayName 'Level 2'
ExpRequired 430
Prefix '[c/b35900:[lv 2 Hunter][c/b35900:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_3':
DisplayName 'Level 3'
ExpRequired 430
Prefix '[c/b35900:[lv 3 Hunter][c/b35900:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp ('/addhp "$name" 5',
'/giveonce "$name" "Tin Broadsword" 1',
'/sendto "$name" 255,255,0 Your Skills as a Hunter have Improved you gain Knowledge of the [i:3502]')
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_4':
DisplayName 'Level 4'
ExpRequired 500
Prefix '[c/b35900:[lv 4 Hunter][c/b35900:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_5':
DisplayName 'Level 5'
ExpRequired 800
Prefix '[c/b35900:[lv 5 Hunter][c/b35900:]] '
CommandsOnLevelUpOnce ('/giveonce "$name" "Copper Bow" 1',
'/give "Wooden Arrow" "$name" 40',
'/give "Archery Potion" "$name" 1',
'/giveonce "$name" "Iron Broadsword" 1',
'/sendto "$name" 255,255,0 Your Skills as a Hunter have Improved you gain Knowledge of the [i:4] and [i:3504]')
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_6':
DisplayName 'Level 6'
ExpRequired 882
Prefix '[c/d96c00:[lv 6 Skilled Hunter][c/d96c00:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_7':
DisplayName 'Level 7'
ExpRequired 900
Prefix '[c/d96c00:[lv 7 Skilled Hunter][c/d96c00:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_8':
DisplayName 'Level 8'
ExpRequired 1050
Prefix '[c/d96c00:[lv 8 Skilled Hunter][c/d96c00:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_9':
DisplayName 'Level 9'
ExpRequired 1050
Prefix '[c/d96c00:[lv 9 Skilled Hunter][c/d96c00:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_10':
DisplayName 'Level 10'
ExpRequired 1550
Prefix '[c/d96c00:[lv 10 Skilled Hunter][c/d96c00:]] '
CommandsOnLevelUpOnce ('/giveonce "$name" "Iron Bow" 1',
'/give "Flaming Arrow" "$name" 40',
'/give "Archery Potion" "$name" 1',
'/give "Hunter Potion" "$name" 1',
'/sendto "$name" 255,255,0 Your Skills as a Hunter have Improved you gain Knowledge of the [i:99]')
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_11':
DisplayName 'Level 11'
ExpRequired 1620
Prefix '[c/d96c00:[lv 11 Skilled Hunter][c/d96c00:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_12':
DisplayName 'Level 12'
ExpRequired 1790
Prefix '[c/d96c00:[lv 12 Skilled Hunter][c/d96c00:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5','/sendto "$name" 255,255,0 Your Skills as a Hunter have Improved you gain Knowledge of the [i:923]'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_13':
DisplayName 'Level 13'
ExpRequired 1950
Prefix '[c/d96c00:[lv 13 Skilled Hunter][c/d96c00:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_14':
DisplayName 'Level 14'
ExpRequired 2137
Prefix '[c/d96c00:[lv 14 Skilled Hunter][c/d96c00:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_15':
DisplayName 'Level 15'
ExpRequired 2400
Prefix '[c/ff8000:[lv 15 Deadly Hunter][c/ff8000:]] '
CommandsOnLevelUpOnce ('/giveonce "$name" "Silver Bow" 1',
'/give "Flaming Arrow" "$name" 40',
'/give "Archery Potion" "$name" 2',
'/give "Ironskin Potion" "$name" 2',
'/give "Battle Potion" "$name" 2',
'/give "Hunter Potion" "$name" 2',
'/sendto "$name" 255,255,0 Your Skills as a Hunter have Improved you gain Knowledge of the [i:3510]')
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_16':
DisplayName 'Level 16'
ExpRequired 2740
Prefix '[c/ff8000:[lv 16 Deadly Hunter][c/ff8000:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_17':
DisplayName 'Level 17'
ExpRequired 2840
Prefix '[c/ff8000:[lv 17 Deadly Hunter][c/ff8000:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_18':
DisplayName 'Level 18'
ExpRequired 2920
Prefix '[c/ff8000:[lv 18 Deadly Hunter][c/ff8000:]] '
CommandsOnLevelUpOnce ('/giveonce "$name" "Tungsten Bow" 1',
'/give "Flaming Arrow" "$name" 40',
'/give "Archery Potion" "$name" 2',
'/give "Ironskin Potion" "$name" 2',
'/give "Battle Potion" "$name" 2',
'/give "Hunter Potion" "$name" 2',
'/sendto "$name" 255,255,0 Your Skills as a Hunter have Improved you gain Knowledge of the [i:3486]')
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_19':
DisplayName 'Level 19'
ExpRequired 3215
Prefix '[c/ff8000:[lv 19 Deadly Hunter][c/ff8000:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_20':
DisplayName 'Level 20'
ExpRequired 3739
Prefix '[c/698c00:[lv 20 Skull Hunter][c/698c00:]] '
CommandsOnLevelUpOnce ('/giveonce "$name" "Gold Bow" 1',
'/give "Flaming Arrow" "$name" 40',
'/give "Archery Potion" "$name" 2',
'/give "Ironskin Potion" "$name" 2',
'/give "Battle Potion" "$name" 2',
'/give "Hunter Potion" "$name" 2',
'/sendto "$name" 255,255,0 Your Skills as a Hunter have Improved you gain Knowledge of the [i:3486]')
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_21':
DisplayName 'Level 21'
ExpRequired 3800
Prefix '[c/698c00:[lv 21 Skull Hunter][c/698c00:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_22':
DisplayName 'Level 22'
ExpRequired 3950
Prefix '[c/698c00:[lv 22 Skull Hunter][c/698c00:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_23':
DisplayName 'Level 23'
ExpRequired 3800
Prefix '[c/698c00:[lv 23 Skull Hunter][c/698c00:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_24':
DisplayName 'Level 24'
ExpRequired 3950
Prefix '[c/698c00:[lv 24 Skull Hunter][c/698c00:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_25':
DisplayName 'Level 25'
ExpRequired 4600
Prefix '[c/336600:[lv 25 Master Skull Hunter][c/336600:]] '
CommandsOnLevelUpOnce ('/giveonce "$name" "Platinum Bow" 1',
'/give "Flaming Arrow" "$name" 40',
'/give "Archery Potion" "$name" 3',
'/give "Ironskin Potion" "$name" 3',
'/give "Battle Potion" "$name" 3',
'/give "Hunter Potion" "$name" 3',
'/sendto "$name" 255,255,0 Your Skills as a Hunter have Improved you gain Knowledge of the [i:3480]')
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_26':
DisplayName 'Level 26'
ExpRequired 4960
Prefix '[c/336600:[lv 26 Master Skull Hunter][c/336600:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_27':
DisplayName 'Level 27'
ExpRequired 5000
Prefix '[c/336600:[lv 27 Master Skull Hunter][c/336600:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_28':
DisplayName 'Level 28'
ExpRequired 5300
Prefix '[c/336600:[lv 28 Master Skull Hunter][c/336600:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_29':
DisplayName 'Level 29'
ExpRequired 5450
Prefix '[c/336600:[lv 29 Master Skull Hunter][c/336600:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
Level 'hunter_30':
DisplayName 'Level 30'
ExpRequired 6000
Prefix '[c/336600:[lv 30 Godly Skull Hunter][c/336600:]] '
CommandsOnLevelUpOnce
CommandsOnLevelUp '/addhp "$name" 5'
CommandsOnLevelDown '/addhp "$name" -5'
#Start of event callbacks
def OnMaxiumCurrency(session):
print "OnMaxiumCurrency! Hunter"# this hook is not implemented yet
def OnNegativeCurrency(session):
print "OnNegativeCurrency! Hunter"# not working either
def OnLevelUp(session):
print "OnLevelUp! Hunter"
def OnLevelDown(session):
print "OnLevelDown! Hunter"
def OnClassChange(session):
print "OnClassChange! Hunter"
def OnClassMastered(session):
print "OnClassMastered! Hunter"