Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- * start install script
- inst
- * First, detect metarooms
- * Chione coords
- doif gmap 40704 21781 <> -1
- setv va01 1
- endi
- * NPole coords
- doif gmap 552 5495 <> -1
- setv va02 1
- endi
- * Spawn 10 planted carrots in Chione
- doif va01 eq 1
- reps 10
- gsub car1
- * x and y coords for Chione. x1 is the leftest, x2 is the rightest. Spawn randomly within this range.
- mvto rand 40704 41800 21573
- repe
- endi
- * Spawn 10 uprooted carrots in Chione
- doif va01 eq 1
- reps 10
- gsub car2
- * x and y coords for Chione
- mvto rand 40704 41800 21573
- repe
- endi
- * Spawn 10 planted carrots in NPole
- doif va02 eq 1
- reps 10
- gsub car1
- * x and y coords for NPole. x1 is the leftest, x2 is the rightest. Spawn randomly within this range.
- mvto rand 552 750 5090
- repe
- endi
- * Spawn 10 uprooted carrots in NPole
- doif va02 eq 1
- reps 10
- gsub car2
- * x and y coords for NPole
- mvto rand 552 750 5090
- repe
- endi
- * If no metarooms exist, spawn in Norn Terranium
- doif va01 ne 1 and va02 ne 1
- reps 10
- gsub car1
- mvto rand 500 1200 500
- repe
- reps 10
- gsub car2
- repe
- endi
- subr car1
- new: simp 2 11 14879 "needlcarr" 7 0 50
- attr 199
- accg 5
- aero 20
- bhvr 48
- elas 0
- setv ov61 60
- emit 8 0.5
- retn
- subr car2
- new: simp 2 11 14879 "needlcarr" 7 0 5000
- attr 199
- accg 5
- aero 20
- bhvr 48
- elas 0
- setv ov61 60
- emit 8 0.5
- setv va00 rand 0 1
- mulv va00 4
- addv va00 2
- pose va00
- perm 60
- tick 2400
- retn
- endm
- * carrot pick up script
- scrp 2 11 14879 4
- * set pose to 1 when picked up (carrot vertical)
- pose 1
- perm 60
- endm
- * collision script (normal carrots)
- scrp 2 11 14879 6
- lock
- sndc "smit"
- endm
- * collision script (rotting carrots)
- scrp 2 10 14879 6
- lock
- sndc "smit"
- endm
- * carrot dropped script
- scrp 2 11 14879 5
- inst
- * if timer not initialized
- doif tick eq 0
- * set 8 min timer
- tick 2400
- endi
- * create temporary variable randomly 0 or 1
- setv va00 rand 0 1
- * multiply b4
- mulv va00 4
- * add 2
- addv va00 2
- * set pose to result (carrot lays on floor facing a random direction)
- pose va00
- * do if not being carried
- doif carr eq null
- * set z = middle ground
- plne 5000
- endi
- endm
- * carrot timer script - I HATE THESE!
- scrp 2 11 14879 9
- * do if not being carried, not falling
- doif carr eq null and fall eq 0
- inst
- * temporary var tracking X coord
- setv va00 posl
- * temporary var tracking Y coord
- setv va01 post
- setv va02 rand 0 1
- mulv va02 4
- addv va02 2
- * spawn detritus carrot, has 4 images starting from image #2 or #6, z = middle ground
- new: simp 2 10 14879 "needlcarr" 4 va02 5001
- * in carr.c16, detritus images are 2,3,4,5 (uneaten, facing right) or 6,7,8,9 (uneaten, facing left)
- accg 5
- aero 20
- * suffers gravity, has boundaries, can be moused, can be carried
- attr 195
- * can be picked up, can be eaten - why would you?!
- bhvr 48
- elas 0
- * do if position of the saved X & Y coords of the healthy carrot is valid (i.e. not in a wall)
- doif tmvt va00 va01 eq 1
- * move to a healthy carrot position
- mvto va00 va01
- * or, if the saved position is not valid
- else
- * move to a nearby valid position
- mvsf va00 va01
- endi
- setv ov61 20
- * set 4 mins timer
- tick 1200
- * target healthy carrot again, since we've been dealing with detritus
- targ ownr
- doif prop room targ 2 le 0.2
- * carrot in the ground
- pose 0
- * stop motion
- velo 0 0
- * no timer (remember in the 'drop' script, there is a doif tick 0?)
- tick 0
- * I guess what's happening here is the carrot is checking how much nutrients are in the room?
- * and if there's enough, instead of killing the carrot when it rots, it just re-plants the carrot and pretends it's new
- * but I see no way for the carrot to know its timer is 0 unless the drop script is activated???
- * if there's not enough "property #3" here
- else
- * KILL CARROT
- kill ownr
- endi
- * if there's not enough "property #2" and "property #4" here
- else
- * KILL CARROT
- kill ownr
- endi
- * and now we are left with a rotting detritus carrot in its place
- endm
- * carrot eat script
- scrp 2 11 14879 12
- snde "chwp"
- * add coldness and coldness back up drive effects, to benefit cold-loving creatures only!
- targ from
- driv 152 0.3
- driv 135 0.3
- targ ownr
- * temp variable to save X pos
- setv va00 posl
- * temp variable to save X pos
- setv va01 post
- * eaten food stimuli
- stim writ from 79 1
- * 10-tick delay
- wait 10
- inst
- setv va02 rand 0 1
- mulv va02 4
- * can be either 10 or 14
- addv va02 10
- * in carr.c16, image #10 is eaten facing right, image #14 is eaten facing left
- * turn randomly-facing, half-eaten carrot into detritus
- new: simp 2 10 14879 "needlcarr" 4 va02 5001
- accg 5
- aero 20
- attr 195
- bhvr 48
- elas 0
- setv ov61 10
- * move left a tiny bit
- subv va01 20
- * are the saved coords valid?
- doif tmvt va00 va01 eq 1
- * move there
- mvto va00 va01
- * or, if they are not valid
- else
- * find a nearby position and move there
- mvsf va00 va01
- endi
- * set 1 min timer
- tick 300
- * KILL THE CARROT, only detritus exists now
- kill ownr
- endm
- * detritus timer script
- scrp 2 10 14879 9
- doif carr eq null and fall eq 0
- doif pose lt 3
- * remember, in carr.c16, detritus images are 2,3,4,5 (uneaten, right) or 6,7,8,9 (uneaten, left)
- * pose counts from 0, so 3 is actually image #5, aka the final stage of rotting away
- * in other words, do if we're still in the process of rotting
- * temp var set to current stage of rot
- setv va00 pose
- * increase stage of rot by 1
- addv va00 1
- * set the pose
- pose va00
- inst
- * if carrot exists in a valid room and am not being carried
- doif room targ ne -1 and carr eq null
- * does this mean add nutrients or smell?
- altr room targ 4 0.01
- altr room targ 3 0.01
- endi
- slow
- * otherwise, we're fully rotted, time to disappear
- else
- inst
- doif room targ ne -1 and carr eq null
- altr room targ 4 0.01
- altr room targ 3 0.01
- endi
- slow
- * temp pos X
- setv va00 posl
- * temp pos Y
- setv va01 post
- inst
- * do if the room's conditions are right: check heat CA
- doif prop room targ 2 le 0.2
- * spawn new healthy carrot!
- new: simp 2 11 14879 "needlcarr" 7 0 50
- attr 199
- accg 5
- * I guess it flings the new carrot a few pixels away?
- aero 20
- bhvr 48
- elas 0
- doif tmvt va00 va01 eq 1
- * move to the location
- mvto va00 va01
- * or, if that position isn't valid
- else
- * move to a nearby location
- mvsf va00 va01
- endi
- * stop moving
- velo 0 0
- setv ov61 60
- * it smells like food
- emit 8 0.5
- endi
- endi
- * KILLLLLLL ITTTTTTTT
- kill ownr
- endi
- endm
- * detritus eaten script
- scrp 2 10 14879 12
- lock
- targ from
- * I have eaten detritus (ew!)
- stim writ from 81 1
- * small trace of alcohol for toxic breeds
- chem 75 0.05
- * 10-tick delay
- wait 10
- * KILL THE MOULDY CARROT (okay, it was eaten)
- kill ownr
- endm
- * remove script
- rscr
- enum 2 11 14879
- * kill all carrots
- kill targ
- next
- enum 2 10 14879
- * kill all detritus carrots
- kill targ
- next
- * don't know what '2 10 14879 90' is, but it was in the original c3 carrot remove script?
- scrx 2 10 14879 90
- scrx 2 11 14879 4
- scrx 2 11 14879 6
- scrx 2 10 14879 6
- scrx 2 11 14879 5
- scrx 2 11 14879 9
- scrx 2 11 14879 12
- scrx 2 10 14879 9
- scrx 2 10 14879 12
Advertisement
Add Comment
Please, Sign In to add comment