Help creating a currency variable, and events.

Yazuken

New member
Jul 21, 2017
5
0
0
35
Hello again! I noticed how there is different variables that contain different values in the event editor! which I think is very awesome because it adds for a lot of possibilities and flexibility. I am a little confused how to use them though...

I would like to create a currency called "Zombie Ears" (Yes, it may be strange sounding I know. But I'll explain)... This would be a currency that goes up by a certain amount, individually for each player whenever they succesfully kill a zombie. I would then have a menu that can be listed with a simple public player chat command, that shows different items that can be purchased with enough "Zombie Ears". The player can purchase one of the listed items if they have the amount of zombie ears listed. For example... a First-aid bandage costing 25 Zombie Ears....

So.. I would need one event that adds to the "Zombie Ear" variable each time a zombie is killed. and events for individual chat commands for buying items... eg "!Buyfirstaidb"...if the variable "zombie ears" matched 25 in this case... that player would have a first aid bandage spawn in front of them, in exchange for subtracting 25 Zombie ears from the player. So... I'm just wondering.. what is an ideal way about making this? Is it possible with 7dtdRAT?


Backstory of zombie ears (This next part of the post is optional to read... lol)

So basically, there are merchants that give items to civilians in exchange for ridding the land of zombies.. the evidence that they've killed a zombie is by bring its ear (or ear's) to the merchant, and showing it to them. This is accepted as sufficient evidence that they killed a zombie.. if they have killed enough zombies, they are rewarded with items to help them continue the job and to survive.
 
Hey there. =)

What you are asking for is generically called a "bank". Where you can store your currency, etc. Right now, this isn't an option in RAT, it is something that has been on the list since forever. One of the issues is that there hasn't been a reliable way to tell what a player killed a zombie, so you have to code in logic to make a "best guess" as to when that happens, etc.

The other thing you would need is persistent storage of this information. This is why I would have to custom create this in RAT, because you'd have no way to do this through the script. I want to add this and will when I can (and there are events for when a zombie is killed).

I know someone was working on this, but I don't know if he finished it. I'll have to check with him. either way, I'll have to code it all in and then expose the information you need. That'll be some time. So... I want to do this, but I can't currently reliably do it.