Author Topic: [Scripts] Infinite Upgrades (Requested)  (Read 299 times)

0 Members and 1 Guest are viewing this topic.


  • Elite Member
  • *****
  • Posts: 954
  • The God of the Galaxy
  • Awards 3 years on site 2 years on site 1 year on site
    • View Profile
    • Awards
  • Xbox: Qvzw
  • PSN: Widumn_Boise
[Scripts] Infinite Upgrades (Requested)
« on: June 08, 2017, 03:20:28 PM »
Script: Infinite Upgrade

var [price] = [history:upgradeprice]
var [gold] = [inv:goldpieces]
// The first variable is set to the price of the upgrade, the second one is set to the amount of gold pieces the player has in their inventory, can be replaced by a history.

   IsVar [gold] [<] [price]
   MessageBox [You do not have enough Gold for this!]
   Inventory [player] [take] [goldpieces] [price]
   // Dont confuse the [price] with something you choose, this is a variable.
   History [upgradename] [player] [+1]
   var [newprice] = [price] * [1.5]
   // I set it so the next upgrade cost is 1.5x more, you can change that to whatever you want.
   History [upgradeprice] [player] [newprice]
   MessageBox [Your next upgrade will cost [newprice].]