Zarsla

Equip TP Mode RPG Maker MV

Nov 30th, 2016
109
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <Category: Bypass Death Removal>
  2. <Category: Bypass Recover All Removal>
  3. <Custom Passive Condition>
  4. // Get all currently equipped weapons for the user.
  5. var armors = user.armors();
  6. // Set Id of the Armor Id.
  7. var tp = 3;
  8. // Set the initial condition to be false.
  9. condition = false;
  10. // Loop through each of the weapons.
  11. for (var i = 0; i < armors.length; ++i) {
  12. // Get the currently looped weapon.
  13. var armor = armors[i];
  14. // Check if the armor exists and if the user is equip with the needed armor.
  15. if (armor && user.hasArmor($dataArmors[tp])) {
  16. // Set the condition to be true.
  17. condition = true;
  18.  
  19. // TP Mode if Conditon is true
  20. // var ep is the tp mode id.
  21. var ep = 3;
  22. // unlocks the tp mode
  23. user.unlockTpMode(ep);
  24. // sets the tp mode to the unlocked one
  25. user.setTpMode(ep);
  26. // Removing all other tp modes
  27. user.removeAllTpModes();
  28. // Break the loop.
  29. break;
  30. }
  31. }
  32. </Custom Passive Condition>
RAW Paste Data