Author Topic:  Script help  (Read 82 times)

0 Members and 1 Guest are viewing this topic.

SmileYourOnAim

  • Jr. Member
  • **
  • Posts: 42
    • View Profile
    • Awards
Script help
« on: November 20, 2017, 05:58:19 PM »
How would I make a script so that when a player refills a mine, they must wait 5 minutes until they can refill it again. This applies to all players, so if one player refills the mine, and another player tries to refill the mine, they must also wait at least 5 minutes before refilling the mine.

Fuertey

  • Elite Member
  • *****
  • Posts: 786
  • Keyboard not found. Press F1 to continue.
  • Awards Awarded to exemplary forum members 2 years on site+300 posts 3 years on site+600 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Fuertey
  • Steam: Fuertey
Re: Script help
« Reply #1 on: November 20, 2017, 06:10:10 PM »
Don't even use my 360 anymore so the commands wont be accurate but the method should be.

On the button they use to refill use the following:

If
History [minerefill] [false]
Then
History [minerefill] [add]
Your fill script here
wait [timetowaithere]
History [minerefill] [remove]
Else
Notify [You can't refill this mine right now. Please try again later.] [local]



SmileYourOnAim

  • Jr. Member
  • **
  • Posts: 42
    • View Profile
    • Awards
Re: Script help
« Reply #2 on: November 20, 2017, 06:56:36 PM »
Will this add the history to all players?
« Last Edit: November 20, 2017, 07:19:34 PM by SmileYourOnAim »

Fuertey

  • Elite Member
  • *****
  • Posts: 786
  • Keyboard not found. Press F1 to continue.
  • Awards Awarded to exemplary forum members 2 years on site+300 posts 3 years on site+600 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Fuertey
  • Steam: Fuertey
Re: Script help
« Reply #3 on: November 20, 2017, 07:35:47 PM »
No. It adds it as a system history. Think of it like a global history for your world.

But like I said. Be sure to check the exact commands as mine are likely to be wrong.



cY Agent 115

  • Member
  • ***
  • Posts: 210
  • Death to trolls on the forums
  • Awards 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: cY Agent 115
  • Steam: cY Agent 115
Re: Script help
« Reply #4 on: November 20, 2017, 08:10:24 PM »
Player History [name] is a history based on the player that the script targets

History [name] affects your world history. you can find your world history under the history tab in the game menu. your world history is identical to player history in the sense that histories stick or are set to disperse.

CDJ

  • Member
  • ***
  • Posts: 228
  • RPG
  • Awards 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Creative Viperz
  • PSN: N/A
  • Steam: TotalMiner
Re: Script help
« Reply #5 on: November 20, 2017, 08:17:08 PM »
Player History [name] is a history based on the player that the script targets

History [name] affects your world history. you can find your world history under the history tab in the game menu. your world history is identical to player history in the sense that histories stick or are set to disperse.

I was literally about to comment that, you read my mind.
                          Owner Of Our Atmosphere Series!

                     

cY Agent 115

  • Member
  • ***
  • Posts: 210
  • Death to trolls on the forums
  • Awards 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: cY Agent 115
  • Steam: cY Agent 115
Re: Script help
« Reply #6 on: November 20, 2017, 08:19:10 PM »
its a pretty interesting tool, i didn't find out about it until i properly looked at scripts. still cant do anything amazing with it though.