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

0 Members and 1 Guest are viewing this topic.

Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 362
  • Awards 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
[Help Needed] Re: Scripting in dig deep
« Reply #75 on: September 12, 2016, 07:54:52 PM »
There is nothing wrong with your commands.

It appears swivel is bugged, and it appears there is no work around :\
That's unfortunate, but not a biggie. At least - health scripts aren't bugged.
Move region made my dig deep map possible xD Already had over a million blocks placed and maybe 500k cleared from buildings alone. Imagine me clearing entire mountains by hand? Those poor sods.

Im currently in a situation on of my survival worlds, that involve clearing a mountain by hand.....takes a lot of tedious and repetitive work :P
I believe you could use a clear region script for that. But you would lose the blocks.
Focus determines reality...

Lord Leo

  • Legendary Member
  • *****
  • Posts: 1132
  • Aka Cat
  • Awards 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Circle cat113
Re: Scripting in dig deep
« Reply #76 on: September 12, 2016, 08:38:08 PM »
That makes sense. I will have to do some tweaking of the survival scripts to slow down or alter the effects. Otherwise new players won't stand a chance. It can be challenging enough to get started in my map for players. I hope to also automate a lot of features in my map thru NPC quest style scripts. With an employment system, economized and itemized shops, and a unique ranking system, there is much ado. I barely get a moment while hosting. Not to mention properties for sale. I have much to learn... I thought making a lighthouse beacon was a tough script... lol. Anyway, thank you all for your insight. I am now just waiting for MS to fix the bug... Impatiently!

The problem with scripted jobs is you will need to provide the pay for every player who joins. You would basically need a chest that is scripted to refill from another chest when empty, and then it transfers money to players per pay period
Doing so you will need to have a way of making money like taxes normally what i do in survival cities like that i economize the shops sell items for 1.5x-2x the price so you have easy profit

Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 362
  • Awards 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
Re: Scripting in dig deep
« Reply #77 on: September 15, 2016, 12:29:45 AM »
I economized also, but for selling items. Because I'm in DD, I don't want to sell most of what my shops bring in. So I adjust the amount you get for selling to 25%. Then I can either resell for 25% profit or use the stuff for expansion. It works great. Most of the 'buy' prices are unchanged.
Focus determines reality...

Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 362
  • Awards 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
Re: Scripting in dig deep
« Reply #78 on: October 06, 2016, 05:23:06 AM »
Is there a way to isolate specfic players for scripts? As in, my ranking system would work smoother for returning players if there was an IsGamertag script option, but there isn't. Any ideas how to do this?
I never figured this out, so I want to talk about it more.
Focus determines reality...

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6617
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
  • Steam: tota1miner
Re: Scripting in dig deep
« Reply #79 on: October 06, 2016, 05:42:20 AM »
Is there a way to isolate specfic players for scripts? As in, my ranking system would work smoother for returning players if there was an IsGamertag script option, but there isn't. Any ideas how to do this?
I never figured this out, so I want to talk about it more.
Why do you need to run a script based on a gamertag?

Can you imagine the script?

if
   IsGamertag [xxx]
then
  do something
elseif
   IsGamertag [xxx]
then
  do something
elseif
   IsGamertag [xxx]
then
  do something
elseif
   IsGamertag [xxx]
then
  do something
elseif
   IsGamertag [xxx]
then
  do something
elseif
   IsGamertag [xxx]
then
  do something
elseif
   IsGamertag [xxx]
then
  do something
elseif
   IsGamertag [xxx]
then
  do something
elseif
   IsGamertag [xxx]
then
  do something
elseif
   IsGamertag [xxx]
then
  do something
elseif
   IsGamertag [xxx]
then
  do something
elseif
   IsGamertag [xxx]
then
  do something
elseif
   IsGamertag [xxx]
then
  do something
elseif
etc

Stoneart

  • Member
  • ***
  • Posts: 245
  • "There's always time to get your block's off"
  • Awards Members who have unlocked the robotic avatar 1 year on site+100 posts
    • View Profile
    • My music page
    • Awards
  • Xbox: stoneart
  • PSN: Xx_Phoenix_Down_xX
Re: Scripting in dig deep
« Reply #80 on: October 06, 2016, 11:09:34 PM »
Is there a way to isolate specfic players for scripts? As in, my ranking system would work smoother for returning players if there was an IsGamertag script option, but there isn't. Any ideas how to do this?
I never figured this out, so I want to talk about it more.

Just give the players who you want to give the special treatment a separate history the next time they join and use that in your Join Event script.
If
HasHistory [VIP]
Then
Notify: [It's time to party. [Gamertag] has arrived.]

Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 362
  • Awards 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
Re: Scripting in dig deep
« Reply #81 on: October 07, 2016, 12:10:29 AM »
Well, yeah that is sort of what I had in mind. But not too many people actually play long enough to achieve even rank 2. So my idea was when someone does I make a player join script for them alone.

If
HasPermission [admin)
Then
Script [ranks\rank5]
ElseIf
IsPlayer [gamertag]
Then
Script [ranks\rank2,3,4] (depending)
Else
Script [ranks\rank1]
Endif

Also, it could be used for auto-kicking banned players who try to join. Or running a custom particle effect for a specific player on their chosen avatar. And I would be able to use for jobs too. Using copy to new script and substitutions, this could be used very easily IMO. I wasn't able to figure out how to use histories to do these things.

Edit; I mixed up IsGamertag with IsPlayer. But I think either could work.
« Last Edit: October 07, 2016, 04:13:20 AM by Rev Elevenclaw »
Focus determines reality...

Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 362
  • Awards 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
Re: Scripting in dig deep
« Reply #82 on: October 08, 2016, 06:33:26 PM »
Well whatever about all that. I'm really trying to figure out how histories work in relation to returning players. For example, my map has hunger scripts. But it defaults when someone rejoins. Instead I would like the game  to 'remember' how low their meter was. If you say just give them some history I will curse you with fleas! Kidding... But seriously, I need specifics here.
Focus determines reality...

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6617
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
  • Steam: tota1miner
Re: Scripting in dig deep
« Reply #83 on: October 08, 2016, 06:51:00 PM »
It's might be resetting because the player join script is setting the value directly?

i.e.

PlayerJoinScript:
History [Hunger] [player] [100]

What it should probably do is:
PlayerJoinScript:
if
   HasHistory [Hunger] [player] [false]
then
   History [Hunger] [player] [100]
endif

Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 362
  • Awards 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
Re: Scripting in dig deep
« Reply #84 on: October 09, 2016, 02:05:50 AM »
It's might be resetting because the player join script is setting the value directly?
Yep, that's totally what's going on. I will have to do some major revisions, but I think I get it now. Thanx for that:)
Focus determines reality...

Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 362
  • Awards 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
Re: Scripting in dig deep
« Reply #85 on: October 09, 2016, 11:54:58 PM »
Can anyone tell me what time night falls in DD, in relation to IsClock?
Focus determines reality...

.ok

  • Supreme Member
  • *****
  • Posts: 2211
  • Awards Site art contributions/TPs in-game/Contest winners 4 years on site+1000 posts Members who have unlocked the robotic avatar Donated a giveaway prize. (Must be a prize of cash value.) 3 years on site+600 posts 2 years on site+300 posts Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site+100 posts
    • View Profile
    • Awards
Re: Scripting in dig deep
« Reply #86 on: October 10, 2016, 12:14:02 AM »
what if for all the special effects you wanna give people or to specific people,why not tie all of the effects into individual scripts

then tie all of those onto a bigger script such as

script [effecta]
script [effectb]
ect

and then make a script thats for multiple playerjoins scripts,and include that main script onto the new one for any playerjoins scripts you want to use

so that way the 2nd script when someone joins,the playerjoins script runs it and it check the player for each history,and then activates the proper effect




Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 362
  • Awards 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
Re: Scripting in dig deep
« Reply #87 on: October 10, 2016, 01:27:24 AM »
I have that set up already. I need to know for a job related purpose. Also, if times for the and day are equal (12/12). Or if the times change during different HD seasons.
Focus determines reality...

Craig

  • Developer
  • Extreme Member
  • ******
  • Posts: 6617
  • Dig Deep
  • Awards Developer 4 years on site+1000 posts 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Members who have unlocked the robotic avatar 1 year on site+100 posts Day 1 w/25+ posts (4/12/13)
    • View Profile
    • Twitter
    • Awards
  • Steam: tota1miner
Re: Scripting in dig deep
« Reply #88 on: October 10, 2016, 07:58:28 AM »
Can anyone tell me what time night falls in DD, in relation to IsClock?
I'm not sure on the exact answer, but here's a little script you could use to find out.

var [time] = [clock:]
SetText [x,y,z] [[time:2]] // x,y,z should be the coordinate of a sign.
loop [100]

run that and watch the sign until you see the time values you need for the job window start and end, then use those values in your job script:

var [time] = [clock:]
if
  IsVar [time] [>=] [start]  // replace start with whatever was shown on the sign at the start time
  IsVar [time] [<=] [end]  // replace end with whatever was shown on the sign at the end time
then
  // job is available
else
   notify [job window closed]
endif

If the job is overnight, it's possible the end time will be a smaller number than the start time, so you might have to jiggle the if statement to accommodate. e.g. start time might be 18.00 and end time might be 6.00, in which case you'd need to do something like this:

var [time] = [clock:]
if
  IsVar [time] [<] [18.00]
  IsVar [time] [>] [6.00]
then
   notify [job window closed]  // we get here if time is between 6am and 6pm.
else
  // job is available - we get here if time is between 6pm and 6am.
endif
« Last Edit: October 10, 2016, 04:31:14 PM by Craig »

Rev Elevenclaw

  • Sr. Member
  • ****
  • Posts: 362
  • Awards 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Rev Elevenclaw
Re: Scripting in dig deep
« Reply #89 on: October 10, 2016, 06:58:15 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!
Focus determines reality...