Paste #4794: Ancient Artifact script

Date: 2014/05/26 13:20:47 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


//Make them obtainable
'Get_Artifacts':
  type: world
  events:
    - listen block type:break block:diamond_block qty:1
    - drop item:Ancient_Artifact qty:1

//The actual artifact
'Ancient_Artifact':
  type: item
  material: iron_ingot
  display name: Ancient Artifact
  lore:
  - "<light purple>Right-Click with this in your hand to"
  - "<light purple>get a mighty artifact from times long"
  - "<light purple>since past.  <green>Cost: 15 levels"
  enchantments:
  - loot_bonus_blocks:1

//Trade them in for weapons and armor
'Redeem Artifacts':
  type: world
  events:
    on player right click Ancient_Artifact:
      - if <player.xp.level> >= 15 {
        - execute as_server "xp <player> -15L"
        - take Ancient_Artifact qty:1
        - run s@Random_Artifact
        }

        else {
          - narrate "You're not experienced enough to do that."
        }

//Make the artifact gained random
Random_Artifact:
  type: type
  script:
    - random 14
    - give item:Virandra qty:1
    - give item:Excaliju qty:1
    - give item:Serenade qty:1
    - give item:Stirge qty:1
    - give item:El_Swordo qty:1
    - give item:Serenade qty:1
    - give item:Stirge qty:1
    - give item:El_Swordo qty:1
    - give item:Serenade qty:1
    - give item:Stirge qty:1
    - give item:El_Swordo qty:1
    - give item:Serenade qty:1
    - give item:Stirge qty:1
    - give item:El_Swordo qty:1

//template for weapons and armor
//'[Name]':
//  type: item
//  material: [material]
//  display name: [name]
//  lore:
//  - "[loreline1]"
//  - "[loreline2]"
//  enchantments:
//  - enchant1:lvl
//  - enchant2:lvl

'Virandra':
  type: item
  material: bow
  display name: Virandra
  lore:
  - "<light purple>This bow was once a beautiful dwarven lass"
  - "<light purple>until Bruce Willakers married her and turned"
  - "<light purple>her into a mighty bow.   <gold> Legendary"
  enchantments:
  - arrow_knockback:10
  - Durability:10

'Excaliju':
  type: item
  material: golden_sword
  display name: Excaliju
  lore:
  - "<light purple>Forged by the great blacksmith Frobobits"
  - "<light purple>for a dwarven hero. It is said to be"
  - "<light purple>sharp as diamond.   <gold> Legendary"
  enchantments:
  - durability:10
  - damage_all:5

//Give the OldManWillakers Super Strength
'proc':
  type:world
  events:
    on entity kills entity:
      - if <context.damager.item.in_hand> == Excaliju {
        - cast strength <player.name> d:3 p:20
        - playeffect <player.location> <magic_crit>
        }

'Serenade':
  type: item
  material: iron_sword
  display name: Serenade
  lore:
  - "<light purple>This blade belonged to some bard."
  - "<light purple>Music plays as you hit people, which"
  - "<light purple>is cool, I guess.   <blue>Rare"
  enchantments:
  - damage_all:3
  - durability:10

//let's make it sing
'singing blade':
  type: world
  events:
    on entity damages entity:
      - if <context.damager.item.in_hand> == Serenade {
        - playsound <player.location.find.players.within[5].as_list> <sound:note.pling>
        - playeffect <player.location> <note>
        }

'Stirge':
  type: item
  material: iron_sword
  display name: Stirge
  lore:
  - "<light purple>Named for the annoying little bugger"
  - "<light purple>that sucks your blood.   <blue>Rare"
  enchantments:
  - durability:10

//sucking blood
'vampirism':
  type: world
  events:
    on entity damages entity:
      - if  <context.damager.item.in_hand> == Stirge {
        - cast regeneration <player.name> d:1 p:3
        }

'Ifrit':
  type: item
  material: wooden_sword
  display name: Ifrit
  lore:
  - "<light purple>This sword helps brave the heat"
  - "<light purple>of fell flames.   <blue>Rare"
  enchantments:
  - fire_aspect:2
  - durability:10

//make ifrit give you fire resistance when you right click with it.
'fireproof':
  type:world
  events:
    on player right clicks with Ifrit:
      - if <player.item_in_hand_slot> == Ifrit {
        - cast fire_resistance <player.name> d:240 p:2
        }

'healing_sword':
  type: item
  material: gold_sword
  display name: [placeholder]
  lore:
  - "<light purple>"
  - "<light purple>"
  enchantments:
  - durability:10
  - enchant2:lvl

'El_Swordo':
  type: item
  material: [material]
  display name: El Swordo de Racismo
  lore:
  - "<light purple>Crafted in the depths of America, this"
  - "<light purple>sword embodies hispanic racism.   <blue>Rare"
  enchantments:
  - enchant1:lvl
  - enchant2:lvl

'funchat':
  type: world
  events:
    on player damaged by player:
      - if <context.damager.as_player.item_in_hand> == El_Swordo {
        - flag <context.entity> racism_is_fun duration:1m
    on player chats:
      - if <player.flag[racism_is_fun]> {
        -determine "Ole!"


//for serenade and stuff.
//on entity damages entity
//- if <context.damager.item.in_hand> == [item name]

//for playing sound
//- playsound <player.location.find.players.within[5].as_list> <sound:note.pling>

//and visual effects
//- playeffect <player.location> <note>