### Author Topic: [Help Needed] Scripting in dig deep  (Read 5607 times)

0 Members and 1 Guest are viewing this topic.

#### Dryym

• Supreme Member
• Posts: 4326
• What's yours is mine. ~TM's Resident Master Thief~
• Awards
• Xbox: dryym
##### [Help Needed] Re: Scripting in dig deep
« Reply #90 on: October 10, 2016, 07:32:05 PM »
var [time] = [clock:]
SetText [x,y,z] [[time:2]] // x,y,z should be the coordinate of a sign.
loop [100]
That's awesome!

Keep in mind that if you want game minutes to be displayed properly, You'll need to do

Var [Time] = [clock:]
Var [Min] = [Time] % [1]
Var [Min] = [Min] * [100] / [1.6666]
SetText [x,y,z] [[Time:0]:[Min:0]]

You can divide by 1.66 if you have no plans of using game seconds.

Creator of the term "Deathmine ©"
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

#### Rev Elevenclaw

• Sr. Member
• Posts: 362
• Awards
• Xbox: Rev Elevenclaw
##### Re: Scripting in dig deep
« Reply #91 on: October 10, 2016, 09:49:33 PM »
var [time] = [clock:]
SetText [x,y,z] [[time:2]] // x,y,z should be the coordinate of a sign.
loop [100]
That's awesome!

Keep in mind that if you want game minutes to be displayed properly, You'll need to do

Var [Time] = [clock:]
Var [Min] = [Time] % [1]
Var [Min] = [Min] * [100] / [1.6666]
SetText [x,y,z] [[Time:0]:[Min:0]]

You can divide by 1.66 if you have no plans of using game seconds.
Yeah. I noticed it counting in .100's. I'll make the adjustment. Totally cool script!
Focus determines reality...

#### Rev Elevenclaw

• Sr. Member
• Posts: 362
• Awards
• Xbox: Rev Elevenclaw
##### Re: Scripting in dig deep
« Reply #92 on: October 10, 2016, 10:14:14 PM »
It's displaying time properly. But it changes hour at 30 seconds, not 60. Also doesn't read 01, 02, 03 minutes etc. Just says 1, 2, 3, ... 10, 11.
Focus determines reality...

#### Rev Elevenclaw

• Sr. Member
• Posts: 362
• Awards
• Xbox: Rev Elevenclaw
##### Re: Scripting in dig deep
« Reply #93 on: October 19, 2016, 03:22:36 AM »
Some people believe scripting cannot be done in DD. This is untrue! You have only to find the script block blueprint.  Or possibly get a script block from a mob drop. Then, script away!
Focus determines reality...

#### Rev Elevenclaw

• Sr. Member
• Posts: 362
• Awards
• Xbox: Rev Elevenclaw
##### Re: Scripting in dig deep
« Reply #94 on: January 19, 2018, 09:03:44 PM »
Does anyone know how to script a history gain for 'punching' water?
Focus determines reality...

#### Rev Elevenclaw

• Sr. Member
• Posts: 362
• Awards
• Xbox: Rev Elevenclaw
##### Re: Scripting in dig deep
« Reply #95 on: January 25, 2018, 03:30:38 PM »
... See above...
Focus determines reality...

#### Rev Elevenclaw

• Sr. Member
• Posts: 362
• Awards
• Xbox: Rev Elevenclaw
##### Re: Scripting in dig deep
« Reply #96 on: January 26, 2018, 02:10:53 PM »
Here is an awesome script, not sure who originated it. It was handed down to me. I renamed and expanded it for my purposes.

Script 1, Mark.

If
HasHistory [mana] [player] [>=] [50]
Then
History [tp\x] [player] [delete]
History [tp\y] [player] [delete]
History [tp\z] [player] [delete]
Var
• = [pos:x]

Var [y] = [pos:x]
Var [z] = [pos:x]
History [tp\x] [player]

History [tp\y] [player] [y]
History [tp\z] [player] [z]
Script [particle\teleswitch2]
History [mana] [-50]
Notify [A magical mark has been placed.] [local] [0,0,0]
Else
Notify [You don't have enough mana.] [local] [0,0,0]
End if

Script 2, Recall.

If
HasHistory [mana] [player] [>=] [50]
Then
Var
• = [history:tp\x]

Var [y] = [history:tp\y]
Var [z] = [history:tp\z]
Script [particle\teleswitch2]
History [mana] [player] [-50]
Teleport [player] [x,y,z]
Else
Notify [You need more mana.] [local] [0,0,0]
End If

That's it...

Edit; this script is screwed up by the forum text changing stuff. What ever it's called... IDK.
« Last Edit: February 04, 2018, 05:30:02 PM by Rev Elevenclaw »
Focus determines reality...

#### Rev Elevenclaw

• Sr. Member
• Posts: 362
• Awards
• Xbox: Rev Elevenclaw
##### Re: Scripting in dig deep
« Reply #97 on: February 09, 2018, 05:59:36 PM »
Does giving a player a HUD bar, fill said bar?
Focus determines reality...