nfell2009

MyConomy V2.0 BETA by nfell2009

Apr 17th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 24.59 KB | None | 0 0
  1. #MyConomy - V1.0
  2. #By nfell2009
  3.  
  4. options:
  5.     P: &6[&eMyC&6]&e
  6.     UP: [MyC]
  7.  
  8. variables:
  9.     {myc.startingbal} = 1500
  10.     {myc.currency} = "MC"
  11.     {myc.currency.plural} = "MCs"
  12.     {myc.enabled} = true
  13.     {myc.enabled.txt} = "True"
  14.     {myc.admin.perm} = "myc.admin"
  15.     {myc.player.perm} = "myc.usage"
  16.     {myc.others.perm} = "myc.others"
  17.     {myc.log.prefix} = "[MyC]"
  18.     {myc.minusfixer} = true
  19.  
  20. on skript start:
  21.     set {myc.running.txt} to "True"
  22.     set {myc.running} to true
  23.  
  24. on skript stop:
  25.     set {myc.running.txt} to "False"
  26.     set {myc.running} to false
  27.    
  28. on join:
  29.     if {myc.%player%.started} is not set:
  30.         set {myc.%player%.started} to "True"
  31.         set {myc.%player%.money} to {myc.startingbal}
  32.         set {myc.%player%.lastpayfrom} to "Server - Starting Balance"
  33.         set {myc.%player%.lastpayin} to {myc.startingbal}
  34.         message "{@P} You're balance has now been set to: %{myc.%player%.money}%%{myc.currency.plural}%"
  35.         set {_time} to now
  36.         subtract 1 day from {_time}
  37.         add 1 day to {_time}
  38.         log "{@UP} Created this file! %{_time}%" to "myc/%player%"
  39.         log "{@UP} Payment to: '%player%' from 'Server' with amount '%{myc.startingbal}%'" to "MyC/%player%"
  40.         add {myc.startingbal} to {myc.total.monies}
  41.    
  42. command /myconomy [<text>] [<text>]:
  43.     description: Main MyConomy command
  44.     permission: {myc.player.perm}
  45.     aliases: /myc, /mycon,
  46.     trigger:
  47.         if arg 1 is not set:
  48.             message "{@P} Unknown command! Do /myc help - for help!"
  49.         else if arg 1 is "help":
  50.             if arg 2 is not set:
  51.                 make player execute command "/mycbypass help 1"
  52.             else if arg 2 is "1":
  53.                 make player execute command "/mycbypass help 1"
  54.             else:
  55.                 message "{@P} Unknown page number!"
  56.         else if arg 1 is "info":
  57.             if arg 2 is not set:
  58.                 set {_player} to player
  59.                 message "{@P} Showing details for: %{_player}%"
  60.                 if {myc.%{_player}%.money} is greater than 1:
  61.                     message "{@P} Money: %{myc.%{_player}%.money}%%{myc.currency.plural}%"
  62.                 else:
  63.                     message "{@P} Money: %{myc.%{_player}%.money}%%{myc.currency}%"
  64.                 if {myc.%{_player}%.lastpayout} is greater than 1:
  65.                     message "{@P} L. Payment Out: %{myc.%{_player}%.lastpayout}%%{myc.currency.plural}%"
  66.                 else:
  67.                     message "{@P} L. Payment Out: %{myc.%{_player}%.lastpayout}%%{myc.currency}%"
  68.                 message "{@P} L. Payment To: %{myc.%{_player}%.lastpayto}%"
  69.                 if {myc.%{_player}%.lastpayin} is greater than 1:
  70.                     message "{@P} L. Payment In: %{myc.%{_player}%.lastpayin}%%{myc.currency.plural}%"
  71.                 else:
  72.                     message "{@P} L. Payment In: %{myc.%{_player}%.lastpayin}%%{myc.currency}%"
  73.                 message "{@P} L. Payment From: %{myc.%{_player}%.lastpayfrom}%"
  74.             else if player has permission "%{myc.others.perm}%":
  75.                 if {myc.%arg 2%.started} is "True":
  76.                     set {_player} to arg 2 parsed as offline player
  77.                     message "{@P} Showing details for: %{_player}%"
  78.                     if {myc.%{_player}%.money} is greater than 1:
  79.                         message "{@P} Money: %{myc.%{_player}%.money}%%{myc.currency.plural}%"
  80.                     else:
  81.                         message "{@P} Money: %{myc.%{_player}%.money}%%{myc.currency}%"
  82.                     if {myc.%{_player}%.lastpayout} is greater than 1:
  83.                         message "{@P} L. Payment Out: %{myc.%{_player}%.lastpayout}%%{myc.currency.plural}%"
  84.                     else:
  85.                         message "{@P} L. Payment Out: %{myc.%{_player}%.lastpayout}%%{myc.currency}%"
  86.                     message "{@P} L. Payment To: %{myc.%{_player}%.lastpayto}%"
  87.                     if {myc.%{_player}%.lastpayin} is greater than 1:
  88.                         message "{@P} L. Payment In: %{myc.%{_player}%.lastpayin}%%{myc.currency.plural}%"
  89.                     else:
  90.                         message "{@P} L. Payment In: %{myc.%{_player}%.lastpayin}%%{myc.currency}%"
  91.                     message "{@P} L. Payment From: %{myc.%{_player}%.lastpayfrom}%"
  92.                 else:
  93.                     message "{@P} Couldn't find player: %arg 2%!"
  94.             else:
  95.                 message "{@P} You don't have permission to do that! (Required Node: %{myc.others.perm}%)"
  96.         else if arg 1 is "total":
  97.             if arg 2 is not set:
  98.                 message "{@P} You must give a total you wish to see!"
  99.             else if arg 2 is "money":
  100.                 if {myc.total.monies} is greater than 1:
  101.                     message "{@P} There is: %{myc.total.monies}%%{myc.currency.plural}% money in the economy."
  102.                 else:
  103.                     message "{@P} There is: %{myc.total.monies}%%{myc.currency}% money in the economy."
  104.             else:
  105.                 message "{@P} More totals are coming soon!"
  106.                    
  107. command /pay [<text>] [<text>]:
  108.     description: Pay another player money
  109.     permission: {myc.player.perm}
  110.     trigger:
  111.         set {_player} to arg 1 parsed as player
  112.         set {_amount} to arg 2 parsed as number
  113.         if arg 1 is not set:
  114.             message "{@P} You must enter a player's name!"
  115.         else if arg 2 is not set:
  116.             message "{@P} You must enter an amount to pay!"
  117.         else if {_amount} is number:
  118.             if {_player} is online:
  119.                 set {_player} to arg 1 parsed as offline player
  120.             else:
  121.                 set {_player} to arg 1 parsed as player
  122.             if {myc.%{_player}%.started} is "True":
  123.                 if {myc.%player%.money} is greater than or equal to {_amount}:
  124.                     subtract {_amount} from {myc.%player%.balance}
  125.                     add arg 2 to {myc.%{_player}%.balance}
  126.                     set {myc.%{_player}%.lastpayin} to arg 2
  127.                     set {myc.%{_player}%.lastpayfrom} to player
  128.                     set {myc.%player%.lastpayout} to {_amount}
  129.                     set {myc.%player%.lastpayto} to {_player}
  130.                     if {_amount} is greater than 1:
  131.                         message "{@P} You paided: %arg 2%%{myc.currency.plural}% to %{_player}%"
  132.                         log "{@UP} %player% paided %arg 2%%{myc.currency.plural}% to %{_player}%" to "myc/%player%"
  133.                         log "{@UP} %{_player}% received %arg 2%%{myc.currency.plural}% from %player%" to "myc/%{_player}%"
  134.                         loop all players:
  135.                             if loop-player is {_player}:
  136.                                 send "{@P} You received: %arg 2%%{myc.currency.plural}% from %player%" to {_player}
  137.                     else:
  138.                         message "{@P} You paided: %arg 2%%{myc.currency}% to %{_player}%"
  139.                         log "{@UP} %player% paided %arg 2%%{myc.currency}% to %{_player}%" to "myc/%player%"
  140.                         log "{@UP} %{_player}% received %arg 2%%{myc.currency}% from %player%" to "myc/%player%"
  141.                         loop all players:
  142.                             if loop-player is {_player}:
  143.                                 send "{@P} You received: %arg 2%%{myc.currency}% from %player%" to {_player}
  144.                 else:
  145.                     set {_amt} to {_amount}
  146.                     subtract {myc.%player%.money} from {_amt}
  147.                     if {_amt} is greater than 1:
  148.                         message "{@P} Your funds don't support the payment! You need: %{_amt}%%{myc.currency.plural}% more!"
  149.                     else:
  150.                         message "{@P} Your funds don't support the payment! You need: %{_amt}%%{myc.currency}% more!"
  151.             else:
  152.                 message "{@P} Couldn't find player: %arg 1%"
  153.         else:
  154.             message "{@P} You can only pay using numbers!"
  155.            
  156. command /balance [<text>]:
  157.     description: Show's the player's balance
  158.     permission: {myc.player.perm}
  159.     aliases: /bal, /balancetop, /money,
  160.     trigger:
  161.         if arg 1 is not set:
  162.             if {myc.%{_player}%.money} is greater than 1:
  163.                 message "{@P} Your balance: %{myc.%player%.money}%%{myc.currency.plural}%"
  164.             else:
  165.                 message "{@P} Your balance: %{myc.%player%.money}%%{myc.currency}%"
  166.         else if player has permission "%{myc.others.perm}%":
  167.             set {_player} to arg 1 parsed as player
  168.             if {_player} is online:
  169.                 if {myc.%{_player}%.started} is "True":
  170.                     if {myc.%{_player}%.money} is greater than 1:
  171.                         message "{@P} %{_player}%'s balance: %{myc.%{_player}%.money}%%{myc.currency.plural}%"
  172.                     else:
  173.                         message "{@P} %{_player}%'s balance: %{myc.%{_player}%.money}%%{myc.currency}%"
  174.                 else:
  175.                     message "{@P} Couldn't find that player!"
  176.             else:
  177.                 set {_player} to arg 1 parsed as offline player
  178.                 if {myc.%{_player}%.started} is "True":
  179.                     if {myc.%{_player}%.money} is greater than 1:
  180.                         message "{@P} %{_player}%'s balance: %{myc.%{_player}%.money}%%{myc.currency.plural}%"
  181.                     else:
  182.                         message "{@P} %{_player}%'s balance: %{myc.%{_player}%.money}%%{myc.currency}%"
  183.                 else:
  184.                     message "{@P} Couldn't find that player!"
  185.                    
  186. command /tt <text> <text>:
  187.     trigger:
  188.         execute op command "/myc-transaction normal SK %player% %arg 1% %arg 2%"
  189.                    
  190. command /myc-transaction [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>]: #Type - Script - Player from - Player to - Price == Amount - Item == Reason
  191.     description: For use of other scripts only!
  192.     executable by: players
  193.     trigger:
  194.         set {_type} to arg 1
  195.         set {_script} to arg 2
  196.         set {_playerfrom} to arg 3
  197.         set {_playerto} to arg 4
  198.         set {_price} to arg 5 parsed as number
  199.         if {_type} is "normal":
  200.             if {_script} is not set:
  201.                 if {_playerfrom} is not set:
  202.                     loop all players:
  203.                         send "{@P} There was a problem doing the transaction!" to loop-player
  204.                         send "{@P} Notes: Unknown script caused this error" to loop-player
  205.                         send "{@P} Errors: No script name" to loop-player
  206.                         send "{@P} Please note that the process may still take place if the error checking isn't in place!" to loop-player
  207.                         send "{@P} Error Code: MIS-SCRIPT" to loop-player
  208.                 else:
  209.                     message "{@P} There was a problem doing the transaction!"
  210.                     message "{@P} Notes: Unknown script caused this error"
  211.                     message "{@P} Errors: No script name"
  212.                     message "{@P} Please note that the process may still take place if the error checking isn't in place!"
  213.                     message "{@P} Error Code: MIS-SCRIPT"
  214.             else:
  215.                 if {_playerfrom} is not set:
  216.                     loop all players:
  217.                         send "{@P} There was a problem doing the transaction!" to loop-player
  218.                         send "{@P} Notes: Problem caused by: %{_script}%" to loop-player
  219.                         send "{@P} Errors: No script name" to loop-player
  220.                         send "{@P} Please note that the process may still take place if the error checking isn't in place!" to loop-player
  221.                         send "{@P} Error Code: MIS-PLNAME" to loop-player
  222.                 else:
  223.                     if {_playerto} is not set:
  224.                         message "{@P} There was a problem doing the transaction!"
  225.                         message "{@P} Notes: Problem caused by: %{_script}%"
  226.                         message "{@P} Errors: No player to name given!"
  227.                         message "{@P} Please note that the process may still take place if the error checking isn't in place!"
  228.                         message "{@P} Error Code: MIS-PLNAMETO"
  229.                     else:
  230.                         if {_price} is not set:
  231.                             message "{@P} There was a problem doing the transaction!"
  232.                             message "{@P} Notes: Problem caused by: %{_script}%"
  233.                             message "{@P} Errors: No price was given!"
  234.                             message "{@P} Please note that the process may still take place if the error checking isn't in place!"
  235.                             message "{@P} Error Code: MIS-PRICE"
  236.                         else:
  237.                             if {myc.%{_playerto}%.started} is "True":
  238.                                 if {myc.%player%.money} is greater than or equal to {_price}:
  239.                                     set {myc.%{_playerfrom}%.tcomplete} to true
  240.                                     subtract {_price} from {myc.%{_playerfrom}%.money}
  241.                                     add {_price} to {myc.%{_playerto}%.money}
  242.                                     if {_price} is greater than 1:
  243.                                         message "{@P} You paid: %{_price}%%{myc.currency.plural}% to %{_playerto}%"
  244.                                         log "{@UP} Player: %{_playerfrom}% paid %{_price}%%{myc.currency.plural}% to %{_playerto}%" to "myc/%{_playerfrom}%"
  245.                                         log "{@UP} Player: %{_playerfrom}% paid %{_price}%%{myc.currency.plural}% to %{_playerto}%" to "myc/%{_playerto}%"
  246.                                         loop all players:
  247.                                             if "%loop-player%" is "%{_playerto}%":
  248.                                                 send "{@P} You've been paid: %{_price}%%{myc.currency.plural}% by %{_playerfrom}%." to loop-player
  249.                                                 stop loop
  250.                                     else:
  251.                                         message "{@P} You paid: %{_price}%%{myc.currency}% to %{_playerto}%"
  252.                                         log "{@UP} Player: %{_playerfrom}% paid %{_price}%%{myc.currency}% to %{_playerto}%" to "myc/%{_playerfrom}%"
  253.                                         log "{@UP} Player: %{_playerfrom}% paid %{_price}%%{myc.currency}% to %{_playerto}%" to "myc/%{_playerto}%"
  254.                                         loop all players:
  255.                                             if "%loop-player%" is "%{_playerto}%":
  256.                                                 send "{@P} You've been paid: %{_price}%%{myc.currency}% by %{_playerfrom}%." to loop-player
  257.                                                 stop loop
  258.                                     set {myc.%{_playerfrom}%.lastpayout} to {_price}
  259.                                     set {myc.%{_playerfrom}%.lastpayto} to {_playerto}
  260.                                     set {myc.%{_playerto}%.lastpayin} to {_price}
  261.                                     set {myc.%{_playerto}%.lastpayfrom} to {_playerfrom}
  262.                                 else:
  263.                                     message "{@P} Your funds don't support this transaction!"
  264.                             else:
  265.                                 message "{@P} There was a problem doing the transaction!"
  266.                                 message "{@P} Notes: Problem caused by: %{_script}%"
  267.                                 message "{@P} Errors: The player being paid doesn't exist"
  268.                                 message "{@P} Please note that the process may still take place if the error checking isn't in place!"
  269.                                 message "{@P} Error Code: NO-PTO"
  270.         else:
  271.             if {_playerfrom} is set:
  272.                 if {_script} is set:
  273.                     send "{@P} There was a problem doing the transaction!" to {_playerfrom}
  274.                     send "{@P} Notes: Problem caused by - %{_script}%" to {_playerfrom}
  275.                     send "{@P} Errors: Unknown transaction type given! %{_type}%" to {_playerfrom}
  276.                     send "{@P} Please note that the process may still take place if the error checking isn't in place!" to {_playerfrom}
  277.                     send "{@P} Error Code: INV-TYPE" to {_playerfrom}
  278.                 else:
  279.                     send "{@P} There was a problem doing the transaction!" to {_playerfrom}
  280.                     send "{@P} Notes: MyConomy failed to find the script name!" to {_playerfrom}
  281.                     send "{@P} Errors: Unknown transaction type given! %{_type}%" to {_playerfrom}
  282.                     send "{@P} Please note that the process may still take place if the error checking isn't in place!" to {_playerfrom}
  283.                     send "{@P} Error Code: INV-TYPE" to {_playerfrom}
  284.             else:
  285.                 loop all players:
  286.                     loop-player has permission "%{myc.admin.perm}%":
  287.                         send "{@P} MyConomy has detected a failed transaction!" to loop-player
  288.                         send "{@P} Notes: The player who started the transaction is unset!" to loop-player
  289.                         send "{@P} Errors: Unknown transaction type given! %{_type}%" to loop-player
  290.                         send "{@P} Please note that the process may still take place if the error checking isn't in place!" to loop-player
  291.                         send "{@P} Error Code: INV-TYPE" to loop-player
  292.        
  293. command /myc-admin [<text>] [<text>] [<text>] [<text>]:
  294.     description: Main admin command
  295.     permission: {myc.admin.perm}
  296.     trigger:
  297.         if arg 1 is not set:
  298.             message "{@P} You must give a sub-command! Do /myc-admin help - for help!"
  299.         else if arg 1 is "status":
  300.             player has permission "%{myc.admin.perm}%":
  301.                 message "{@P} MyConomy Status"
  302.                 message "{@P} Running: %{myc.running.txt}%"
  303.                 message "{@P} Currency: %{myc.currency}%"
  304.                 message "{@P} Currency Plural: %{myc.currency.plural}%"
  305.                 message "{@P} Admin Perm: %{myc.admin.perm}%"
  306.                 message "{@P} Player Perm: %{myc.player.perm}%"
  307.         else if arg 1 is "help":
  308.             set {myc.maxahelp} to 3
  309.             make player execute command "/mycbypass adminhelp %arg 2%"
  310.         else if arg 1 is "set":
  311.             set {_amount} to arg 3 parsed as number
  312.             set {_player} to arg 2 parsed as player
  313.             if arg 2 is not set:
  314.                 message "{@P} You must give a player name!"
  315.             else if arg 3 is not set:
  316.                 message "{@P} You must give the value to set the players balance to!"
  317.             else:
  318.                 if {_player} is online:
  319.                     set {_player} to arg 2 parsed as player
  320.                     if {_amount} is greater than 1:
  321.                         log "{@UP} %{_player}%'s money got set to: %arg 3%%{myc.currency.plural}% by %player%" to "myc/%{_player}%"
  322.                         message "{@P} You set: %{_player}%'s money to: %arg 3%%{myc.currency.plural}%"
  323.                         send "{@P} Your balance has been set to: %arg 3%%{myc.currency.plural}% by %player%" to {_player}
  324.                     else:
  325.                         log "{@UP} %{_player}%'s money got set to: %arg 3%%{myc.currency}% by %player%" to "myc/%{_player}%"
  326.                         message "{@P} You set: %{_player}%'s money to: %arg 3%%{myc.currency}%"
  327.                         send "{@P} Your balance has been set to: %arg 3%%{myc.currency}% by %player%" to {_player}
  328.                 else:
  329.                     set {_player} to arg 2 parsed as offline player
  330.                     if {_amount} is greater than 1:
  331.                         log "{@UP} %{_player}%'s money got set to: %arg 3%%{myc.currency.plural}% by %player%" to "myc/%{_player}%"
  332.                         message "{@P} You set: %{_player}%'s money to: %arg 3%%{myc.currency.plural}%"
  333.                     else:
  334.                         log "{@UP} %{_player}%'s money got set to: %arg 3%%{myc.currency}% by %player%" to "myc/%{_player}%"
  335.                         message "{@P} You set: %{_player}%'s money to: %arg 3%%{myc.currency}%"
  336.                 set {myc.total.monies} to {myc.total.monies} - {myc.%{_player}%.money}
  337.                 set {myc.%{_player}%.money} to {_amount}
  338.                 add {myc.%{_player}%.money} to {myc.total.monies}
  339.         else if arg 1 is "add":
  340.             set {_amount} to arg 3 parsed as number
  341.             set {_player} to arg 2 parsed as player
  342.             if arg 2 is not set:
  343.                 message "{@P} You must give a player name!"
  344.             else if arg 3 is not set:
  345.                 message "{@P} You must give the value to add to the players balance!"
  346.             else:
  347.                 if {_player} is online:
  348.                     set {_player} to arg 2 parsed as player
  349.                     if {_amount} is greater than 1:
  350.                         log "{@UP} %arg 3%%{myc.currency.plural}% got added to %{_player}%'s balance by %player%" to "myc/%{_player}%"
  351.                         message "{@P} You added: %arg 3%%{myc.currency.plural}% to %{_player}%'s money"
  352.                         send "{@P} %arg 3%%{myc.currency.plural}% got added to %{_player}%'s balance by %player%" to {_player}
  353.                         set {myc.%{_player}%.lastpayin} to {_amount}
  354.                         set {myc.%{_player}%.lastpayfrom} to "%player% - Money Added"
  355.                     else:
  356.                         log "{@UP} %arg 3%%{myc.currency}% got added to %{_player}%'s balance by %player%" to "myc/%{_player}%"
  357.                         message "{@P} You added: %arg 3%%{myc.currency}% to %{_player}%'s money"
  358.                         send "{@P} %arg 3%%{myc.currency}% got added to %{_player}%'s balance by %player%" to {_player}
  359.                         set {myc.%{_player}%.lastpayin} to {_amount}
  360.                         set {myc.%{_player}%.lastpayfrom} to "%player% - Money Added"
  361.                 else:
  362.                     set {_player} to arg 2 parsed as offline player
  363.                     if {_amount} is greater than 1:
  364.                         log "{@UP} %arg 3%%{myc.currency.plural}% got added to %{_player}%'s balance by %player%" to "myc/%{_player}%"
  365.                         message "{@P} You added: %arg 3%%{myc.currency.plural}% to %{_player}%'s money"
  366.                         set {myc.%{_player}%.lastpayin} to {_amount}
  367.                         set {myc.%{_player}%.lastpayfrom} to "%player% - Money Added"
  368.                     else:
  369.                         log "{@UP} %arg 3%%{myc.currency}% got added to %{_player}%'s balance by %player%" to "myc/%{_player}%"
  370.                         message "{@P} You added: %arg 3%%{myc.currency}% to %{_player}%'s money"
  371.                         set {myc.%{_player}%.lastpayin} to {_amount}
  372.                         set {myc.%{_player}%.lastpayfrom} to "%player% - Money Added"
  373.                 add {_amount} to {myc.%{_player}%.money}
  374.                 add {_amount} to {myc.total.monies}
  375.         else if arg 1 is "subtract":
  376.             set {_amount} to arg 3 parsed as number
  377.             set {_player} to arg 2 parsed as player
  378.             if arg 2 is not set:
  379.                 message "{@P} You must give a player name!"
  380.             else if arg 3 is not set:
  381.                 message "{@P} You must give the value to subtract from the players balance!"
  382.             else:
  383.                 if {_player} is online:
  384.                     set {_player} to arg 2 parsed as player
  385.                     if {_amount} is greater than 1:
  386.                         log "{@UP} %arg 3%%{myc.currency.plural}% got subtracted from %{_player}%'s balance by %player%" to "myc/%{_player}%"
  387.                         message "{@P} You subtracted: %arg 3%%{myc.currency.plural}% from %{_player}%'s money"
  388.                         send "{@P} %arg 3%%{myc.currency.plural}% got subtracted from %{_player}%'s balance by %player%" to {_player}
  389.                     else:
  390.                         log "{@UP} %arg 3%%{myc.currency}% got subtracted from %{_player}%'s balance by %player%" to "myc/%{_player}%"
  391.                         message "{@P} You subtracted: %arg 3%%{myc.currency}% from %{_player}%'s money"
  392.                         send "{@P} %arg 3%%{myc.currency}% got subtract from %{_player}%'s balance by %player%" to {_player}
  393.                 else:
  394.                     set {_player} to arg 2 parsed as offline player
  395.                     if {_amount} is greater than 1:
  396.                         log "{@UP} %arg 3%%{myc.currency.plural}% got subtracted from %{_player}%'s balance by %player%" to "myc/%{_player}%"
  397.                         message "{@P} You subtracted: %arg 3%%{myc.currency.plural}% from %{_player}%'s money"
  398.                     else:
  399.                         log "{@UP} %arg 3%%{myc.currency}% got subtracted from %{_player}%'s balance by %player%" to "myc/%{_player}%"
  400.                         message "{@P} You subtracted: %arg 3%%{myc.currency}% from %{_player}%'s money"
  401.                 subtract {_amount} from {myc.%{_player}%.money}
  402.                 subtract {_amount} from {myc.total.monies}
  403.         else if arg 1 is "currency":
  404.             if arg 2 is not set:
  405.                 message "{@P} You must give a currency type to change!"
  406.             else if arg 3 is not set:
  407.                 message "{@P} You must give a value to set the currency type!"
  408.             else if arg 2 is "s":
  409.                 set {myc.currency} to arg 3
  410.                 message "{@P} Single currency is now set to: %{myc.currency}%"
  411.             else if arg 2 is "p":
  412.                 set {myc.currency.plural} to arg 3
  413.                 message "{@P} Plural currency is now set to: %{myc.currency.plural}%"
  414.         else if arg 1 is "perm":
  415.             if arg 2 is not set:
  416.                 message "{@P} Will you be showing or setting the permissions?"
  417.             else if arg 3 is not set:
  418.                 message "{@P} You need to enter admin or player to set/show!"
  419.             else if arg 2 is "show":
  420.                 if arg 3 is "admin":
  421.                     message "{@P} Admin permission: %{myc.admin.perm}%"
  422.                 else if arg 3 is "player":
  423.                     message "{@P} Player permission: %{myc.player.perm}%"
  424.                 else:
  425.                     message "{@P} I couldn't find that permission group..."
  426.             else if arg 2 is "set":
  427.                 if arg 3 is "admin":
  428.                     log "{@UP} %player% changed the admin permission from: %{myc.admin.perm}% to %arg 4%" to "myc/logs"
  429.                     set {myc.admin.perm} to arg 4
  430.                     message "{@P} Admin permission is now: %{myc.admin.perm}%"
  431.                 else if arg 3 is "player":
  432.                     log "{@UP} %player% changed the player permission from: %{myc.player.perm}% to %arg 4%" to "myc/logs"
  433.                     set {myc.player.perm} to arg 4
  434.                     message "{@P} Player permission is now: %{myc.player.perm}%"
  435.                 else if arg 3 is "others":
  436.                     log "{@UP} %player% changed the other's permission from: %{myc.others.perm}% to %arg 4%" to "myc/logs"
  437.                     set {myc.others.perm} to arg 4
  438.                     message "{@P} Player permission is now: %{myc.others.perm}%"
  439.                 else:
  440.                     message "{@P} I couldn't find that permission group..."
  441.         else if arg 1 is "minusfixer":
  442.             if arg 2 is not set:
  443.                 message "{@P} Do you want to toggle or show the minus fixer status?"
  444.             else if arg 2 is "on":
  445.                 set {myc.minusfixer} to true
  446.                 message "{@P} Turned on minus fixer"
  447.             else if arg 2 is "off":
  448.                 set {myc.minusfixer} to false
  449.                 message "{@P} Turned off minus fixer"
  450.             else if arg 2 is "status":
  451.                 message "{@P} Minus fixer status: %{myc.minusfixer}%"
  452.             else:
  453.                 message "{@P} Unknown Minus Fixer subcommand!"
  454.        
  455.        
  456. command /mycbypass [<text>] [<text>] [<text>] [<text>] [<text>]:
  457.     permission: myc.usage
  458.     trigger:
  459.         if arg 1 is "help":
  460.             message "{@P} ---------- MyConomy Help Menu (%arg 2%/1) ----------"
  461.             message "{@P} /myc help - This menu"
  462.             message "{@P} /myc info [player] - Info on you or a player"
  463.             message "{@P} /pay <player> <amount> - Pay a player"
  464.             message "{@P} /bal [player] - Check your balance or see another players"
  465.         else if arg 1 is "adminhelp":
  466.             if arg 2 is "1":
  467.                 message "{@P} ---------- MyC Admin Help Menu (%arg 2%/%{myc.maxahelp}%) ----------"
  468.                 message "{@P} /myc-admin status - Status of MyConomy"
  469.                 message "{@P} /myc-admin set <player> <amount> - Set a player's balance"
  470.                 message "{@P} /myc-admin add <player> <amount> - Add money to a player"
  471.                 message "{@P} /myc-admin subtract <player> <amount> - Remove money from a player"
  472.                 message "{@P} Do /myc-admin help 2 for more"
  473.             else if arg 2 is "2":
  474.                 message "{@P} ---------- MyC Admin Help Menu (%arg 2%/%{myc.maxahelp}%) ----------"
  475.                 message "{@P} /myc-admin currency <s/p> <name> - Set the currency name"
  476.                 message "{@P} Currency Key:"
  477.                 message "{@P} S = Single. Example: MC"
  478.                 message "{@P} P = Plural. Example: MCs"
  479.                 message "{@P} Do /myc-admin help 3 for more"
  480.             else if arg 2 is "3":
  481.                 message "{@P} ---------- MyC Admin Help Menu (%arg 2%/%{myc.maxahelp}%) ----------"
  482.                 message "{@P} /myc-admin perm <show|set> <admin|player|others> <perm> - Set or show permissions"
  483.                 message "{@P} /myc-admin starting <number> - Set the starting balance"
  484.                 message "{@P} /myc-admin status - Full MyConomy info"
  485.                 message "{@P} /myc-admin minusfixer <on|off|status> - Should accounts with minus be set to 0?"
  486.                 message "{@P} Minus Fixer default = on"
  487.             else:
  488.                 message "{@P} Unknown help page! There are %{myc.maxahelp}% page's that can be viewed."
  489.         else:
  490.             message "{@P} Unknown command!"
  491.            
  492. every 1 second:
  493.     if {myc.minusfixer} is true:
  494.         loop all players:
  495.             if {myc.%loop-player%.money} is less than 0:
  496.                 set {_prevmoney} to {myc.%loop-player%.money}
  497.                 set {myc.%loop-player%.money} to 0
  498.                 log "{@UP} %loop-player%'s money got fixed from: {_prevmoney} to {myc.%loop-player%.money} by Minus Fixer"
  499.                 set {_prevmoney} to ({_prevmoney} - {_prevmoney}) - {_prevmoney}
  500.                 send "{@P} Miuns fixer has reset you balance to: 0" to loop-player
  501.                 set {myc.%loop-player%.lastpayin} to {_prevmoney}
  502.                 set {myc.%loop-player%.lastpayfrom} to "Minus Fixer"
  503.     if {myc.total.monies} is less than 0:
  504.         set {myc.total.monies} to 0
Advertisement
Add Comment
Please, Sign In to add comment