Author Topic:  Scripting  (Read 213 times)

0 Members and 1 Guest are viewing this topic.

Sammy2018

  • Fresh Meat
  • *
  • Posts: 1
    • View Profile
    • Awards
  • Xbox: Samuel M Stoner
Scripting
« on: November 15, 2017, 02:27:09 AM »
  I'm having a little trouble understanding the scripts involved in total miner forge. I'm creating a realistic world and I have ideas of scrips I would like to incorporate into the world itself. Could you help me? Here are some ideas id like. Id like a script that a player can open and close a bank account from an NPC player however they please. Id like a separate NPC player to ask if the player wants to deposit money into there account as well as a separate NVP player to do the opposite, withdraw! Id also like an ATM where they can do both deposits and withdraws buy a push of one button. On the other hand id like a script where a player can buy a home/apartment and be able to sell if they choose to. id like a script that can jail somebody if they do something illegal in the world. last but not least id like a script that a player can go to the store and buy an item, as well as they can go to a store and return it for there money back.

                           Thank You,
                               Sammy2018

KeefdaQueef

  • Jr. Member
  • **
  • Posts: 41
  • I am a teen and legally depressed
    • View Profile
    • Awards
  • Xbox: Keefer511
  • Steam: Keit511
Re: Scripting
« Reply #1 on: November 15, 2017, 08:02:21 PM »
Little tl so dr. But there are scripts of such that are explained, just go to creative features section and look through the pages to get your script needs there.
Keep Calm n' Keep Er' Goin!

bob

  • Administrator
  • Legendary Member
  • ******
  • Posts: 1429
  • Awards Award for outstanding excellence in the field of bob 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
    • Awards
Re: Scripting
« Reply #2 on: November 15, 2017, 08:31:31 PM »
Try these. It's probably the closest you'll get to what you're looking for. You're unlikely to find anything that meets all your requirements, so you'll need to do a bit of legwork.

http://totalminerforums.net/index.php?topic=13258.msg142180
http://totalminerforums.net/index.php?topic=10394.msg120802

Lunar

  • Elite Member
  • *****
  • Posts: 938
  • The God of the Galaxy
  • Awards 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Qvzw
  • PSN: Widumn_Boise
Re: Scripting
« Reply #3 on: November 19, 2017, 07:35:27 PM »
Open Account Script:

If
   [HasHistory] [bank] [player] [true]
Then
   Notify [You already own a bank account] [local]
Else
   History [player] [bank] [1]
   Notify [You have successfully opened a bank account.] [local]
EndIf




Deposit Script:

If
   HasHistory [bank] [player] [true]
Then
   Notify [Input the amount of gold you would like to deposit.] [local]
   Input [amount]
   Script [Deposit2] [vars:amount]
Else
   Notify [You do not have a bank account.] [local]
EndIf




Deposit2 Script:

var [amount] = [amount]
var [gp] = [inv:goldpieces]

If
   IsVar [amount] [>] [gp]
Then
   Notify [You only have [gp] gold, and you attempted to deposit [amount].] [local]
ElseIf
   IsVar [amount] [<] [1]
Then
Else
   Inventory [player] [take] [goldpieces] [amount]
   History [bankgold] [player] [amount]
   Notify [You have successfully deposited [amount] gold.] [local]
EndIf




Withdraw Script:

If
   HasHistory [bank] [player] [true]
Then
   Notify [Input the amount of gold you would like to withdraw.] [local]
   Input [amount]
   Script [Withdraw2] [vars:amount]
Else
   Notify [You do not have a bank account.] [local]
EndIf




Withdraw2 Script:

var [amount] = [amount]
var [gp] = [history:bankgold]

If
   IsVar [amount] [>] [gp]
Then
   Notify [You only have [gp] gold, and you attempted to withdraw [amount].] [local]
ElseIf
   IsVar [amount] [<] [1]
Then
Else
   History [bankgold] [player] [-amount]
   Inventory [player] [add] [goldpieces] [amount]
   Notify [You have successfully withdrew [amount] gold.] [local]
EndIf




Check Balance Script:

If
   HasHistory [bank] [player] [true]
Then
   Notify [You have [history:bankgold] gold in your bank account.] [local]
Else
   Notify [You do not have a bank account.] [local]
EndIf