Advertisement
Mystq

Shock block

Oct 12th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. Damage can be changed to whatever you want in the buffs.xml bit of code. This is an indestructible block so you may want to remove that line or change the upgrade tool to valmar's admin_tool so you can remove them as needed, or you can pblock them to air.
  2.  
  3. in blocks.xml
  4.  
  5. <block id="1742" name="Audio_Electric">
  6. <property name="Extends" value="brickMaster"/>
  7. <property name="Texture" value="534"/>
  8. <property name="CustomIcon" value="brickMaster"/>
  9. <property name="MaxDamage" value="1"/>
  10. <property class="UpgradeBlock"> <property name="ToBlock" value="woodFrameBlock"/>
  11. <property name="Item" value="Admin_axe" />
  12. <property name="ItemCount" value="0" />
  13. <property name="UpgradeHitCount" value="1" />
  14. </property>
  15. <property name="DowngradeBlock" value="Audio_Electric"/>
  16. <drop event="Harvest" name="rockSmall" count="0"/>
  17. <drop event="Destroy" count="0"/>
  18. <drop event="Fall" name="rockSmall" count="0" prob="0.5" stick_chance="0"/>
  19. <property name="CanMobsSpawnOn" value="false"/>
  20. <property name="BuffsWhenWalkedOn" value="Audio_Electric"/>
  21. <property name="CreativeMode" value="Dev"/>
  22. </block>
  23.  
  24. -In Buffs.xml-
  25.  
  26.  
  27. <buff id="Audio_Electric" duration="3" stack="discard" debuffif="ShockAmount equals 0" buffif="ShockAmount greater 0"
  28. actions="attach(ParticleEffects/p_electric_shock, @impact)" castsound="electric_fence_impact"
  29. icon="ui_game_symbol_electric_power" name_key="AudioElectricName" description_key="AudioElectricDesc" tooltip_key="AudioElectricTooltip">
  30. <modify id="0" stat="health" amount="0" rate="1"/>
  31. </buff>
  32.  
  33. -In localization.xml-
  34.  
  35.  
  36. AudioElectricDesc,buffs,Buff,New,"BZZZZZT! Ahh-HaHaHaHaHa!",,,,
  37. AudioElectricName,buffs,Buff,New,"BZZZZZT! Ahh-HaHaHaHaHa!",,,,
  38. AudioElectricTooltip,buffs,Buff,New,"BZZZZZT! Ahh-HaHaHaHaHa!",,,,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement