Jump to content

[Request] Upgrade Bank capacity Trader


Recommended Posts

Hi all. Just had a great idea for a trader with the new single currency banking system. Would anyone be able to give me a hand in trying to make a script so that you can trade coins to upgrade your bank capacity.

For example, all players start with 500k limit - then pays the bank trader say 200k or whatever and it upgrades it to 1million limit and so on?

 

Regards

Max

Link to comment
Share on other sites

The closest i have got to this so far on my servers is just defining custom tiers and manually putting ID's in.

 

Its not something i have done so far but i would rather like to see how you could manipulate the hive calls.

My best thought would be to add a colum to the player data assigning a number to a table. The same as how multiple characters work.

This is new stuff to me but i would would like to see what can be done :)

Link to comment
Share on other sites

You don't *need* to change the db structure necessarily. You could just manipulate with the fields you're given. Kind of like Plot 4 Life uses the worldspace column to store info about plot pole ownership. All you really need is to hide a single digit somewhere in the database that refers to your current state of "bank balance upgrades".

 

For example, you add a single digit in front of the bank money balance that refers to the upgrade. So if in database you see you have 34500 coins in your bank account. This would mean you actually have 4500 coins and the number 3 only refers to the upgrade you currently have. Note that this was just an example on the top of my head. This probably isn't the best way of handling this but it should give you the idea. Not to mention you would also have to change the way bankMoney is handled in character_sync etc.

Link to comment
Share on other sites

Ooh thanks for the awesome replies.

I'm not sure how hive calls work but the way I had the script in my head was to add scroll menu to item/npc that says upgrade bank and this initiates a script that would say something like if money given then MaxBankMoney = 1000000  and so on or something?

Link to comment
Share on other sites

Ooh thanks for the awesome replies.

I'm not sure how hive calls work but the way I had the script in my head was to add scroll menu to item/npc that says upgrade bank and this initiates a script that would say something like if money given then MaxBankMoney = 1000000  and so on or something?

 

Yes you could do that, but that would only work as long as the player is online/alive. As soon as you reconnect you would be back at square one again. That's where the hive comes in. If you want this feature to be persistent you need to store the information somewhere.

Link to comment
Share on other sites

Ahh thanks for the explanation Rocu. Could that be why some scripts have the problem of not saving and resetting at restart/respawn? Hmm much to learn.

 

No problem and yeah. This is usually most noticeable in 'tag friend' scripts where if you tag someone you see them on your GPS, you see some indication above their head etc but it only lasts as long as they live. It'd need a whole new db table to indicate who's friends with who.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...