Custom Commands by badplayer

Name: Add Funds From Discord

Usage: /bankadd {player name or steamid} {amount of currency to send}

Type: Discord Public Chat

Conditionals: STARTSWITH:/bankadd

Script:
.BANKMODIFY:{1},{2}
.BANKBALANCE:{1}
.DSAY:{1} has been given {2} Zombucks and their balance is {bank_balance}.
sayplayer {1} "[00FF00] You have been given {2} Zombucks from {discord_author} and your balance is {bank_balance}."

This works great since the player killed zombie event is not functioning right now and you don't have to be in game to use it. I use this multiple times a day to update the players currency on both my servers.

If you use this and you have a discord chat to game going, make sure to use STARTSWITH:. (use whatever starting punctuation you want except the / as you are using that for the admin commands) in the discord to game chat so that the admin commands don't spam the in game chat. Thanks Ciro!
 
Last edited:
  • Like
Reactions: Trekkan
Name: Player Balance From Discord

Usage: /balance {player name or steamid}

Type: Discord Public Chat

Conditionals: STARTSWITH:/balance

Script:
.BANKBALANCE:{1}
.DSAY:{1} has {bank_balance} Zombucks in their bank account.

If you use this and you have a discord chat to game going, make sure to use STARTSWITH:. (use whatever starting punctuation you want except the / as you are using that for the admin commands) in the discord to game chat event so that the admin commands don't spam the in game chat. Thanks Ciro!
 
Last edited:
  • Like
Reactions: Trekkan
Name: Arrest Player From Discord

Usage: /arrest {player name}

Type: Discord Public Chat

Conditionals: STARTSWITH:/arrest

Script:
teleportplayer {1} {tele_jail}
admin add {1} 1000
say "[FFFF00]{1} has been sent to jail by {discord_author}"
sayplayer {1} "[FFFF00]Warning! You have been arrested and your teleport powers have been removed. An admin will be in touch shortly."
.DSAY: {1} has been arrested.

This is a complex command that removes teleports too. It is just like the in game command but can be used from discord.

If you use this and you have a discord chat to game going, make sure to use STARTSWITH:. (use whatever starting punctuation you want except the / as you are using that for the admin commands) in the discord to game chat event so that the admin commands don't spam the in game chat. Thanks Ciro!
 
Last edited:
  • Like
Reactions: Trekkan
Name: Release Player From Discord

Usage: /release {player name}

Type: Discord Public Chat

Conditionals: STARTSWITH:/release

Script:
teleportplayer {1} {tele_safehouse}
admin add {1} 800
say "[FFFF00]{1} has been released from jail by {discord_author}"
sayplayer {1} "[FFFF00]You are being released from jail and being telelported to the Safehouse. Your teleport powers have been restored. Remember we are watching you....."
.DSAY: {1} has been released from jail.

This is a complex command that reinstates teleports too. It is just like the in game command but can be used from discord.

If you use this and you have a discord chat to game going, make sure to use STARTSWITH:. (use whatever starting punctuation you want except the / as you are using that for the admin commands) in the discord to game chat event so that the admin commands don't spam the in game chat. Thanks Ciro!
 
Last edited:
  • Like
Reactions: Trekkan
Name: Poop Potatos From Discord

Usage: /poop {player name}

Type: Discord Public Chat

Conditionals: STARTSWITH:/poop

Script:
say "[00FF00]{1} is pooping potatos!! Don't forget to clean them before you eat them."
give {1} foodBakedPotato 1
give {1} foodBakedPotato 1
give {1} foodBakedPotato 1
give {1} foodBakedPotato 1
give {1} foodBakedPotato 1
give {1} foodBakedPotato 1
give {1} foodBakedPotato 1
give {1} foodBakedPotato 1
.DSAY: You made {1} poop potatos, what is wrong with you {discord_author}?

If you use this and you have a discord chat to game going, make sure to use STARTSWITH:. (use whatever starting punctuation you want except the / as you are using that for the admin commands) in the discord to game chat event so that the admin commands don't spam the in game chat. Thanks Ciro!
 
Last edited:
  • Like
Reactions: Trekkan
Name: Remove Player Teleports From Discord

Usage: /remove {player name}

Type: Discord Public Chat

Conditionals: STARTSWITH:/remove

Script:
admin add {1} 1000
.DSAY: {1}'s teleports have been removed.
sayplayer {1} "[00FF00] Your teleports have been removed for breaking the rules."

This is a complex command that removes teleports. It is just like the in game command but can be used from discord.

If you use this and you have a discord chat to game going, make sure to use STARTSWITH:. (use whatever starting punctuation you want except the / as you are using that for the admin commands) in the discord to game chat event so that the admin commands don't spam the in game chat. Thanks Ciro!
 
Last edited:
  • Like
Reactions: Trekkan
Name: Reinstate Player Teleports From Discord

Usage: /reinstate {player name}

Type: Discord Public Chat

Conditionals: STARTSWITH:/reinstate

Script:
admin add {1} 800
.DSAY: {1}'s teleports have been reinstated.
sayplayer {1} "[00FF00] Your teleports have been reinstated."

This is a complex command that reinstates teleports. It is just like the in game command but can be used from discord.

If you use this and you have a discord chat to game going, make sure to use STARTSWITH:. (use whatever starting punctuation you want except the / as you are using that for the admin commands) in the discord to game chat event so that the admin commands don't spam the in game chat. Thanks Ciro!
 
Last edited:
  • Like
Reactions: Trekkan
Name: Teleport Player To Safehouse From Discord

Usage: /safehouse {player name}

Type: Discord Public Chat

Conditionals: STARTSWITH:/safehouse

Script:
teleportplayer {1} {tele_safehouse}
.DSAY:{1} is at the safehouse.

You can use this to teleport a player to any location you have setup on RAT.

If you use this and you have a discord chat to game going, make sure to use STARTSWITH:. (use whatever starting punctuation you want except the / as you are using that for the admin commands) in the discord to game chat event so that the admin commands don't spam the in game chat. Thanks Ciro!
 
Last edited:
  • Like
Reactions: Trekkan
Name: Timer Events

Usage: Automatic Or Player Activated

Type: Timer Tick

Conditionals: TIMER:zombies

Script: se {player_id} 82

Stay with me, this is a series of events. It takes 3 events to make this work.

Type: Player Spawn Join

Script: .TIMERCREATE:zombies:30:true

Type: Player Disconnected

Script: .TIMERSETSTATUS:zombies:false

Okay, there is a lot to unpack here.

For the actual timer to work, you need the Timer Tick event with the name of the timer in it. This name is the one you are going to use in the other 2 timer events.

Next you need to start the timer with the .TIMERCREATE RAT command. This can be a player activated command like /killme in a Player Any Chat event.

Now, when you want to stop the timer, you need to use the .TIMERSETSTATUS RAT command to set the timer to false.

You can also restart the timer to true using the .TIMERSETSTATUS RAT command.

Use your imagination on this one!
 
  • Like
Reactions: Trekkan
Name: Teleport to the Safehouse

Usage: /safehouse

Type: Player Any Chat

Conditionals: STARTSWITH:/safehouse

Script:
teleportplayer {player_steamid} {tele_safehouse}
sayplayer {player_steamid} "[AE00FF] Whoosh, your at the safehouse."

This is an easy command to setup and modify for other teleport commands you may have.

You just need to setup this teleport in the teleport destinations area.
1204

You can also add a cost to teleports by adding ||HASFUNDS:{player_steamid},40 in the conditionals and .BANKMODIFY:{player_steamid},-40 in the script section.

If you are using the arrest and teleports remove commands from earlier, then you will also need ||ALEVEL:<900 in the conditionals section.

A complete command would look like this

Conditionals: STARTSWITH:/safehouse||ALEVEL:<900||HASFUNDS:{player_steamid},40

Script:
.BANKMODIFY:{player_steamid},-40
teleportplayer {player_steamid} {tele_safehouse}
sayplayer {player_steamid} "[AE00FF] Whoosh, your at the safehouse."
 
  • Like
Reactions: Trekkan
Name: Teleport to Friend

Usage: /visit {friends name} (has to be a 1 word name)

Type: Player Any Chat

Conditionals: STARTSWITH:/visit||ISFRIEND:{player_steamid},{2}

Script:
tele {player_id} {2}
sayplayer {player_steamid} "[AE00FF]Your being teleported to {2}."

Teleport cost and admin levels can be added to this command just like any other teleport command.
 
Last edited:
  • Like
Reactions: Trekkan
Name: Store

Usage: /store

Type: Player Any Chat

Conditionals: STARTSWITH:/store

Script:
sayplayer {player_steamid} "[00FF00]Departments are"
sayplayer {player_steamid} "[00FF00]/storeammo for ammo"
sayplayer {player_steamid} "[00FF00]/storeexp for explosives"
sayplayer {player_steamid} "[00FF00]/storefood for food"
sayplayer {player_steamid} "[00FF00]/storemedical for medical supplies"
sayplayer {player_steamid} "[00FF00]/storemats for materials"
sayplayer {player_steamid} "[00FF00]You can only use your Zombucks balance here"

Stay with me, this is another long one.

Name: Store Ammo

Usage: /storeammo

Type: Player Any Chat

Conditionals: EQUALS:/storeammo

Script:
sayplayer {player_steamid} "[00FF00]Use /buyammo{item number} (No spaces) to buy. All ammo is in 200 round increments."
sayplayer {player_steamid} "[00FF00]1 - 9mm Ball Ammo 1800 Zombucks"
sayplayer {player_steamid} "[00FF00]2 - 9mm AP Ammo 2800 Zombucks"
sayplayer {player_steamid} "[00FF00]3 - 9mm HP Ammo 2800 Zombucks"
sayplayer {player_steamid} "[00FF00]4 - 44 Mag Ball Ammo 2000 Zombucks"
sayplayer {player_steamid} "[00FF00]5 - 44 Mag AP Ammo 3000 Zombucks"
sayplayer {player_steamid} "[00FF00]6 - 44 Mag HP Ammo 3000 Zombucks"
sayplayer {player_steamid} "[00FF00]7 - 7.62mm Ball Ammo 2200 Zombucks"
sayplayer {player_steamid} "[00FF00]8 - 7.62mm AP Ammo 3200 Zombucks"
sayplayer {player_steamid} "[00FF00]9 - 7.62mm HP Ammo 3200 Zombucks"
sayplayer {player_steamid} "[00FF00]10 - Shotgun Shell Ammo 2200 Zombucks"
sayplayer {player_steamid} "[00FF00]11 - Shotgun Slug Ammo 4000 Zombucks"
sayplayer {player_steamid} "[00FF00]12 - Shotgun Breaching Slug Ammo 4000 Zombucks"

Just one more

Name: Store Ammo 01 9mm Ball

Usage: /buyammo1

Type: Player Any Chat

Conditionals: EQUALS:/buyammo1||HASFUNDS:{player_steamid},1800

Script:
.BANKMODIFY:{player_steamid},-1800
bc-give {player_steamid} ammo9mmBulletBall /c=200
sayplayer {player_steamid} "[00FF00] You purchased 200 rounds of 9mm Ball ammo, your new balance is {bank_balance}"

With this set of commands, you will need to make menu and purchase commands for every item in your store. I have a few...
1205

You can use as many or few as you like.

It is important to use the EQUALS condition as some of these commands start with the same words.
 
  • Like
Reactions: Trekkan
Name: Player Killed Zombie Add Zombucks

Usage: Automatic

Type: Player Killed Zombie

Script: .BANKMODIFY:{player_killer_steamid},20

This one is pretty vital to giving your players zombucks to spend in the store or on teleports.
 
Last edited:
  • Like
Reactions: Trekkan
Name: Time Check

Usage: /time

Type: Discord Public Chat

Conditionals: STARTSWITH:/time

Script:
.DEMBED:CHANNEL=ENTER YOUR DISCORD CHANNEL HERE|COLOR=GREEN|THUMBNAIL=ENTER A THUMBNAIL WEB ADDRESS HERE|DESC=Time Check|TITLE={servername}|FIELDS=Day,Time|VALUES={gametime_day},{gametime_hour}:{gametime_minute}

With RAT 2064, you get another great feature, Discord embeds. These can be completely customized and this is what I have come up with so far.

When using the {servername} variable, make sure it is set properly in RAT. Even if you are using just the remote tab, you need to set the server name in the server settings tab. This is where RAT pulls the name from.
1210

Be sure to add your discord channel, and you can add a thumbnail image or just remove that section.
Pro tip, use discord to host your image and just use the image link. A no background PNG image is the best.
1207
 
Last edited:
  • Like
Reactions: Trekkan
Name: Top Stats

Usage: /top

Type: Discord Public Chat

Conditionals: STARTSWITH:/top

Script:
.DEMBED:CHANNEL=ENTER YOUR DISCORD CHANNEL HERE|COLOR=GREEN|THUMBNAIL=ENTER A THUMBNAIL WEB ADDRESS HERE|DESC=Top Dog|TITLE={servername}|FIELDS=Most Kills,Highest Level,Most Deaths,Highest Score|VALUES={top_kills_name} {top_kills_count},{top_level_name} {top_level_count},{top_deaths_name} {top_deaths_count},{top_score_name} {top_score_count}

This gives you another discord embed for the players that have the top stats. A great way to engage the community.

Just like above, add your discord channel name and thumbnail image to make it look great.
1206
 
Last edited:
  • Like
Reactions: Trekkan
Name: Server Is Restarting

Usage: Automatic

Type: Server Ready

Script:
.DEMBED:CHANNEL=ENTER YOUR DISCORD CHANNEL HERE|COLOR=DARKORANGE|THUMBNAIL=ENTER A THUMBNAIL WEB ADDRESS HERE|DESC=Server is restarting|TITLE={servername}|FIELDS=Message|VALUES=Will be coming up shortly

Here is another embed I use for when the server is restarting.

Same rules apply as above.
1208
 
  • Like
Reactions: Trekkan
Name: Server Online

Usage: Automatic

Type: Server Ready

Script:
.DEMBED:CHANNEL=ENTER YOUR DISCORD CHANNEL HERE|COLOR=GREEN|THUMBNAIL=ENTER A THUMBNAIL WEB ADDRESS HERE|DESC=Server is restarting|TITLE={servername}|FIELDS=Message|VALUES=Cmon back all you cool cats and zombies

Here is another embed I use for when the server is online.

Same rules apply as above.
1209
 
  • Like
Reactions: Trekkan
Name: Discord Bot Status Change

Usage: /watching {witty phrase here}

Type: Server Ready

Conditionals: STARTSWITH:/watching

Script: .DSETSTATUS:{0}:WATCHING

Another great feature added to RAT is the ability to change the status of the discord bot.

The status message has to start with either: watching, playing, listening or streaming

You can make separate commands for the other status prefixes too.

And you can also add these to other events you have already setup.
Add it to the bottom of the Server Ready event .DSETSTATUS:7 Days to Die:PLAYING
Add it to the bottom of the Server Restart event .DSETSTATUS:the hampsters being changed out:WATCHING

The sky is the limit here. And remember that this status only stays up for about 2 hours.
 
Last edited:
Name: Bank Player to Player Zombucks

Usage: /pay {players name} {amount}

Type: Discord Public Chat

Conditionals: STARTSWITH:/pay||HASFUNDS:{player_steamid},{3}

Script:
.BANKMODIFY:{player_steamid},-{3}
.BANKBALANCE:{player_steamid}
sayplayer {player_steamid} "[00FF00]You have given {3} zombucks to {2}, your new balance is {bank_balance}."
.BANKMODIFY:{2},{3}
.BANKBALANCE:{2}
sayplayer {2} "[00FF00]You have been given {3} zombucks, your new balance is {bank_balance}."

This is a command that my players were asking for. It allows one player that has zombucks to send zombucks to another player.

Pretty simple but helps a bit.
 
  • Like
Reactions: Trekkan