Simanalix343

How to change a sprite

Sep 20th, 2020 (edited)
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.39 KB | None | 0 0
  1. Let's make a game!
  2. name:Bunny Clicker
  3. by:Orteil
  4. desc:This is a simple idle game to showcase some of the basic functionalities of Idle Game Maker.<//>Make bunnies and shoot for the stars!
  5. created:25/7/2017
  6. updated:24/10/2017
  7. version:1
  8. CSS
  9. .thing-icon{background-size:cover;}
  10. Settings
  11. background:stuff/meadow.jpg
  12. building cost increase:115%
  13. building cost refund:50%
  14. spritesheet:icons, 48 by 48, stuff/bunnyIcons.png
  15. stylesheet:stuff/bigBlue.css
  16.  
  17. Layout
  18. use default
  19.  
  20. Buttons
  21. *bunnyButton
  22. name:Make a bunny
  23. desc:Click this little bunny to get more bunnies!
  24. on click:anim icon wobble
  25. on click:yield 1 bunny
  26. on click:if (have goldenTouch and chance(1%)) yield 1 goldenCarrot
  27. icon:stuff/bunny.png
  28. no text
  29. class:bigButton hasFlares
  30. icon class:shadowed
  31. tooltip origin:bottom
  32. tooltip class:red
  33. *ChangedSprite
  34. name:Make a bunny
  35. desc:Click this little bunny to get more bunnies!
  36. on click:anim icon wobble
  37. on click:yield 1 bunny
  38. on click:if (have goldenTouch and chance(1%)) yield 1 goldenCarrot
  39. icon:https://cdn.shopify.com/s/files/1/1061/1924/products/Poop_Emoji_2_grande.png?v=1571606092
  40. no text
  41. class:bigButton hasFlares
  42. icon class:shadowed
  43. tooltip origin:bottom
  44. tooltip class:red
  45. hidden
  46. Resources
  47. *bunny|bunnies
  48. name:Bunny|Bunnies
  49. desc:These are your bunnies. You can use them to purchase things. Your goal is to have as many bunnies as possible!
  50. icon:icons[0,0]
  51. class:noBackground
  52. show earned
  53.  
  54. *goldenCarrot|goldenCarrots
  55. name:Golden carrot|Golden carrots
  56. desc:These shiny carrots are terribly rare, terribly precious and terribly delicious!
  57. icon:icons[0,1]
  58. class:noBackground
  59. hidden when 0
  60.  
  61. Shinies
  62. *luckyBunny
  63. on click:log Woop
  64. movement:onRight moveLeft fade bounce:0.05
  65. frequency:60
  66. frequency variation:30
  67. icon:stuff/luckyBunny.png
  68. class:bigButton
  69. on click:
  70. $boost=1
  71. if (have clover) $boost=4
  72. if (chance(25%))
  73. //get at least 7, or between 1 and 3 minutes of our bunny production
  74. $amount=max(7,random(bunnies:ps*60*1,bunnies:ps*60*3))*$boost
  75. toast The lucky bunny grants you<//><b>[$amount] bunnies</b>.
  76. yield $amount bunnies
  77. else
  78. $amount=1*$boost
  79. toast The lucky bunny grants you<//><b>[$amount] golden carrot[s?$amount]</b>!
  80. yield $amount goldenCarrot
  81. end
  82. end
  83.  
  84. Buildings
  85. *TEMPLATE
  86. on click:anim glow
  87.  
  88. *cage|cages
  89. name:Rabbit cage|Rabbit cages
  90. desc:A tiny little cage.<//><b>Effect:</b><.>Produces 1 rabbit every 10 seconds.
  91. icon:icons[3,0]
  92. cost:15 bunnies
  93. on tick:yield 0.1 bunny
  94. on earn:
  95. if (cage is 1)
  96. show ChangedSprite
  97. hide bunnyButton
  98. end
  99. end
  100. unlocked
  101.  
  102. *hutch|hutches
  103. name:Rabbit hutch|Rabbit hutches
  104. desc:A bit roomier than a cage, with enough space to hop around.<//><b>Effect:</b><.>Produces 1 rabbit every 2 seconds.
  105. icon:icons[3,1]
  106. cost:100 bunnies
  107. on tick:yield 0.5 bunnies
  108. req:100 bunnies:earned
  109.  
  110. *coop|coops
  111. name:Rabbit coop|Rabbit coops
  112. desc:A much nicer rabbit home where full bunny families can live.<//><b>Effect:</b><.>Produces 5 rabbits per second.
  113. icon:icons[3,2]
  114. cost:600 bunnies
  115. on tick:yield 5 bunnies
  116. req:600 bunnies:earned
  117.  
  118. *pen|pens
  119. name:Rabbit pen|Rabbit pens
  120. desc:A lovely enclosure with plenty of green space.<//><b>Effect:</b><.>Produces 12 rabbits per second.
  121. icon:icons[3,3]
  122. cost:4000 bunnies
  123. on tick:yield 12 bunnies
  124. req:4000 bunnies:earned
  125.  
  126. *meadow|meadows
  127. name:Rabbit meadow|Rabbit meadows
  128. desc:A wide open space full of shade and lush grass.<//><b>Effect:</b><.>Produces 90 rabbits per second.
  129. icon:icons[3,4]
  130. cost:20000 bunnies
  131. on tick:yield 90 bunnies
  132. req:20000 bunnies:earned
  133.  
  134. *village|villages
  135. name:Rabbit village|Rabbit villages
  136. desc:Your bunnies are building their own villages now!<//><b>Effect:</b><.>Produces 300 rabbits per second.
  137. icon:icons[3,5]
  138. cost:200000 bunnies, 1 goldenCarrot
  139. on tick:yield 300 bunnies
  140. req:200000 bunnies:earned and independenceDay
  141.  
  142. *city|cities
  143. name:Rabbit city|Rabbit cities
  144. desc:A bustling little city, populated with busy rabbits.<//><b>Effect:</b><.>Produces 1000 rabbits per second.
  145. icon:icons[3,6]
  146. cost:3000000 bunnies, 4 goldenCarrots
  147. on tick:yield 1000 bunnies
  148. req:3000000 bunnies:earned and independenceDay
  149.  
  150. *citadel|citadels
  151. name:Moon citadel|Moon citadels
  152. desc:An ornate palace standing on the moon, ruled by bunny kings and queens and staffed with royal bunny guards.<//><b>Effect:</b><.>Produces 4000 rabbits per second.
  153. icon:icons[3,7]
  154. cost:70000000 bunnies, 16 goldenCarrots
  155. on tick:yield 4000 bunnies
  156. on tick:if (have moonGardens) yield 0.01 goldenCarrot
  157. req:70000000 bunnies:earned and independenceDay
  158.  
  159. *fortress
  160. name:Freedom fortress
  161. text:Freedom fortress ([this]%)
  162. desc:A huge bunny castle. A monument to the adventurous spirit of bunnykind, which will take time and effort to complete.<//><b>The fortress is [this]% complete.</b>
  163. icon:icons[3,8]
  164. cost:300000000 bunnies, 100 goldenCarrots
  165. req:70000000 bunnies:earned and independenceDay
  166. limit:100
  167. cost increase:105%
  168.  
  169. Upgrades
  170. *TEMPLATE
  171. on click:anim glow
  172.  
  173. //food upgrades
  174. //inspiration : http://rabbit.org/suggested-vegetables-and-fruits-for-a-rabbit-diet/
  175.  
  176. *parsley
  177. name:Parsley
  178. desc:A nice little supplement to your bunnies' diet.<//><b>Effect:</b><.>+1 bunny/click
  179. icon:icons[1,1]
  180. cost:100 bunnies
  181. passive:increase bunny yield of bunnyButton by 1
  182. req:10 bunnies:earned
  183.  
  184. *spinach
  185. name:Spinach
  186. desc:Big tasty leaves, perfect for hungry bunnies.<//><b>Effect:</b><.>+1 bunny/click
  187. icon:icons[1,2]
  188. cost:200 bunnies
  189. passive:increase bunny yield of bunnyButton by 1
  190. req:50 bunnies:earned
  191.  
  192. *lettuce
  193. name:Lettuce
  194. desc:Frilly greens loved by all bunnies.<//><b>Effect:</b><.>+1 bunny/click
  195. icon:icons[1,3]
  196. cost:400 bunnies
  197. passive:increase bunny yield of bunnyButton by 1
  198. req:200 bunnies:earned
  199.  
  200. *broccoli
  201. name:Broccoli
  202. desc:Crunchy greens that look like little trees.<//><b>Effect:</b><.>bunnies/click x2<.>bunny production +5%
  203. icon:icons[1,4]
  204. cost:3000 bunnies
  205. passive:multiply bunny yield of bunnyButton by 2
  206. passive:multiply yield of bunnies by 1.05
  207. req:1000 bunnies:earned
  208.  
  209. *apple
  210. name:Apple
  211. desc:Nice pieces of juicy red apples.<//><b>Effect:</b><.>bunnies/click x1.5<.>bunny production +5%
  212. icon:icons[1,5]
  213. cost:10000 bunnies
  214. passive:multiply bunny yield of bunnyButton by 1.5
  215. passive:multiply yield of bunnies by 1.05
  216. req:1000 bunnies:earned
  217.  
  218. *radish
  219. name:Radish
  220. desc:Purple, crunchy, and strangely spicy.<//><b>Effect:</b><.>bunnies/click x1.5<.>bunny production +5%
  221. icon:icons[1,6]
  222. cost:50000 bunnies
  223. passive:multiply bunny yield of bunnyButton by 1.5
  224. passive:multiply yield of bunnies by 1.05
  225. req:10000 bunnies:earned
  226.  
  227. *mint
  228. name:Mint
  229. desc:Tasty, and gives your bunnies a lovely breath.<//><b>Effect:</b><.>bunnies/click x1.5<.>bunny production +5%
  230. icon:icons[1,7]
  231. cost:100000 bunnies
  232. passive:multiply bunny yield of bunnyButton by 1.5
  233. passive:multiply yield of bunnies by 1.05
  234. req:50000 bunnies:earned
  235.  
  236. *chard
  237. name:Chard
  238. desc:Broad leaves that make for a tasty salad.<//><b>Effect:</b><.>bunnies/click x1.5<.>bunny production +5%
  239. icon:icons[1,8]
  240. cost:500000 bunnies
  241. passive:multiply bunny yield of bunnyButton by 1.5
  242. passive:multiply yield of bunnies by 1.05
  243. req:100000 bunnies:earned
  244.  
  245. *cherry
  246. name:Cherry
  247. desc:Your bunnies look like little vampires when they start munching on these!<//><b>Effect:</b><.>bunnies/click x1.5<.>bunny production +5%
  248. icon:icons[1,9]
  249. cost:1000000 bunnies
  250. passive:multiply bunny yield of bunnyButton by 1.5
  251. passive:multiply yield of bunnies by 1.05
  252. req:500000 bunnies:earned
  253.  
  254. *carrot
  255. name:Carrot
  256. desc:The quintessential rabbit food! Crunchy, orange, and perfect.<//><b>Effect:</b><.>bunnies/click x2<.>bunny production +10%
  257. icon:icons[1,0]
  258. cost:100000000 bunnies
  259. passive:multiply bunny yield of bunnyButton by 2
  260. passive:multiply yield of bunnies by 1.1
  261. req:1000000 bunnies:earned
  262.  
  263. //building upgrades
  264.  
  265. *buildingUpgrade1
  266. name:Sippy bottles
  267. desc:Your bunnies can drink their fill!<//><b>Effect:</b><.>rabbit cage production x2<.>rabbit hutch production x2<.>rabbit coop production x2
  268. icon:icons[2,0] icons[3,0]
  269. cost:1000 bunnies
  270. passive:multiply yield of cage by 2
  271. passive:multiply yield of hutch by 2
  272. passive:multiply yield of coop by 2
  273. req:(cages>=10 or hutches>=10 or coops>=10)
  274.  
  275. *buildingUpgrade2
  276. name:Prime grade hay
  277. desc:Not just for horses anymore!<//><b>Effect:</b><.>rabbit cage production x2<.>rabbit hutch production x2<.>rabbit coop production x2
  278. icon:icons[2,0] icons[3,1]
  279. cost:100000 bunnies
  280. passive:multiply yield of cage by 2
  281. passive:multiply yield of hutch by 2
  282. passive:multiply yield of coop by 2
  283. req:(cages>=50 or hutches>=50 or coops>=50)
  284.  
  285. *buildingUpgrade3
  286. name:Shredded newspapers
  287. desc:You'd think they just poop on these, but they really enjoy reading the Sunday comics.<//><b>Effect:</b><.>rabbit cage production x2<.>rabbit hutch production x2<.>rabbit coop production x2
  288. icon:icons[2,0] icons[3,2]
  289. cost:5000000 bunnies
  290. passive:multiply yield of cage by 2
  291. passive:multiply yield of hutch by 2
  292. passive:multiply yield of coop by 2
  293. req:(cages>=100 or hutches>=100 or coops>=100)
  294.  
  295. *buildingUpgrade4
  296. name:Pretty fences
  297. desc:Just the right size so your bunnies can peek through but not hop over!<//><b>Effect:</b><.>rabbit pen production x2<.>rabbit meadow production x2
  298. icon:icons[2,0] icons[3,3]
  299. cost:50000 bunnies
  300. passive:multiply yield of pen by 2
  301. passive:multiply yield of meadow by 2
  302. req:(pens>=10 or meadows>=10)
  303.  
  304. *buildingUpgrade5
  305. name:Bunny playground
  306. desc:If your bunnies are outside, they might as well get some exercise!<//><b>Effect:</b><.>rabbit pen production x2<.>rabbit meadow production x2
  307. icon:icons[2,0] icons[3,4]
  308. cost:5000000 bunnies
  309. passive:multiply yield of pen by 2
  310. passive:multiply yield of meadow by 2
  311. req:(pens>=50 or meadows>=50)
  312.  
  313. *buildingUpgrade6
  314. name:Bunny TVs
  315. desc:Televisions that broadcast bunny cartoons, bunny sitcoms, and bunny news bulletins.<//><b>Effect:</b><.>rabbit village production x2<.>rabbit city production x2
  316. icon:icons[2,0] icons[3,5]
  317. cost:1000000 bunnies
  318. passive:multiply yield of village by 2
  319. passive:multiply yield of city by 2
  320. req:(villages>=10 or cities>=10)
  321.  
  322. *buildingUpgrade7
  323. name:Wee little bunny cars
  324. desc:Your bunnies drive around in these. How nice!<//><b>Effect:</b><.>rabbit village production x2<.>rabbit city production x2
  325. icon:icons[2,0] icons[3,6]
  326. cost:500000000 bunnies
  327. passive:multiply yield of village by 2
  328. passive:multiply yield of city by 2
  329. req:(villages>=50 or cities>=50)
  330.  
  331. *buildingUpgrade8
  332. name:Soothing moon crystals
  333. desc:Just really nice to be around.<//><b>Effect:</b><.>moon citadel production x2
  334. icon:icons[2,0] icons[3,7]
  335. cost:1000000000 bunnies
  336. passive:multiply yield of citadel by 2
  337. req:10 citadels
  338.  
  339. //golden carrot upgrades
  340.  
  341. *goldenTouch
  342. name:Golden touch
  343. desc:The delicate art of finding vegetables made of precious metals.<//><b>Effect:</b><.>1% chance of gaining 1 golden carrot per bunny click
  344. icon:icons[2,5]
  345. cost:1 goldenCarrot
  346. req:1 goldenCarrot:earned
  347.  
  348. *rabbitHaste
  349. name:Rabbit's haste
  350. desc:I'm late! I'm late! For a very important date!<//><b>Effect:</b><.>lucky bunnies appear 30% more often
  351. icon:icons[2,6]
  352. passive:multiply frequency of luckyBunny by 0.7
  353. cost:5 goldenCarrots
  354. req:1 goldenCarrot:earned
  355.  
  356. *independenceDay
  357. name:Independence day
  358. desc:Your bunnies are making their first step towards declaring their independence from the oppressive shackles of pens and cages.<//><b>Effect:</b><.>unlocks new buildings
  359. icon:icons[2,7]
  360. cost:10 goldenCarrots
  361. req:5 goldenCarrots:earned
  362.  
  363. *clover
  364. name:Clover
  365. desc:A delicious herb that tastes lucky.<//><b>Effect:</b><.>lucky bunny effects are 4 times more powerful
  366. icon:icons[2,8]
  367. cost:100 goldenCarrots
  368. req:50 goldenCarrots:earned
  369.  
  370. *moonGardens
  371. name:Moon gardens
  372. desc:The royal botanists in your moon citadels have found new ways of cultivating plants in reduced gravity!<//><b>Effect:</b><.>moon citadels now produce 1 golden carrot every 100 seconds
  373. icon:icons[2,9]
  374. cost:100 goldenCarrots
  375. req:50 goldenCarrots:earned
  376.  
  377. Achievements
  378. *TEMPLATE
  379. on click:anim glow
  380.  
  381. *bunnyAchiev1
  382. name:Run rabbit run
  383. desc:Have <b>1</b> bunny.
  384. req:1 bunny
  385. icon:icons[2,4] icons[0,2] icons[0,6]
  386. *bunnyAchiev2
  387. name:Bunniest home videos
  388. desc:Have <b>1000</b> bunnies.
  389. req:1000 bunnies
  390. icon:icons[2,4] icons[0,3] icons[0,6]
  391. *bunnyAchiev3
  392. name:You got buns, hun
  393. desc:Have <b>1000000</b> bunnies.
  394. req:10000000 bunnies
  395. icon:icons[2,4] icons[0,4] icons[0,6]
  396.  
  397. *clickAchiev1
  398. name:That tickles
  399. desc:Click the bunny <b>10</b> times.
  400. req:10 bunnyButton clicks
  401. icon:icons[2,2] icons[0,2] icons[0,6]
  402. *clickAchiev2
  403. name:Don't squeeze me I'll fart
  404. desc:Click the bunny <b>100</b> times.
  405. req:100 bunnyButton clicks
  406. icon:icons[2,2] icons[0,3] icons[0,6]
  407. *clickAchiev3
  408. name:You're cruising for a bruising, dude
  409. desc:Click the bunny <b>2000</b> times.
  410. req:2000 bunnyButton clicks
  411. icon:icons[2,2] icons[0,4] icons[0,6]
  412.  
  413. *bunnyPsAchiev1
  414. name:Be vewy vewy quiet
  415. desc:Produce <b>10</b> bunnies per second.
  416. req:10 bunnies per second
  417. icon:icons[2,3] icons[0,2] icons[0,6]
  418. *bunnyPsAchiev2
  419. name:Hop and a skip
  420. desc:Produce <b>1000</b> bunnies per second.
  421. req:1000 bunnies per second
  422. icon:icons[2,3] icons[0,3] icons[0,6]
  423. *bunnyPsAchiev3
  424. name:Go forth and multiply
  425. desc:Produce <b>100000</b> bunnies per second.
  426. req:100000 bunnies per second
  427. icon:icons[2,3] icons[0,4] icons[0,6]
  428.  
  429. *carrotAchiev1
  430. name:Isn't it neat
  431. desc:Have <b>1</b> golden carrot.
  432. req:1 goldenCarrot
  433. icon:icons[0,1] icons[0,2]
  434. *carrotAchiev2
  435. name:All that glitters
  436. desc:Have <b>100</b> golden carrots.
  437. req:100 goldenCarrot
  438. icon:icons[0,1] icons[0,3]
  439. *carrotAchiev3
  440. name:Zero nutritional value
  441. desc:Have <b>1000</b> golden carrots.
  442. req:1000 goldenCarrot
  443. icon:icons[0,1] icons[0,4]
  444.  
  445. *fortressAchiev
  446. name:Freedom!
  447. desc:Complete building the <b>freedom fortress</b>.<//>This is it. You beat the game!
  448. req:100 fortress
  449. icon:icons[3,8] icons[0,4]
  450.  
Add Comment
Please, Sign In to add comment