AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Grand Bank (https://forums.alliedmods.net/showthread.php?t=65042)

Vbios__ 12-30-2007 15:45

Grand Bank
 
1 Attachment(s)
plugin "Grand Bank"

VErsion 0.4.2

Description:
for admins and clients

Grand Bank
Server plugin ,based on sourcemod ,allows to make deposits ,take credits ,enter into agreement contracts ,etc.

Every User ,connected to server has credit account ,deposit account ,and contracts account.
All bank values are regulated by server cvars ,you can ask admins to change them ,all values here are by-default ,and may be not coincide with server ones.
If you will have no money ,but bank will must take money from you (according to rules) bank will take your health till to death if needed.

You can take credit with amount not more than 16000 (V_bank_credit_max) after that every 1 minute 8% (V_bank_percentperminute_tobank) will be taken from your money.
You can do deposit to the bank with amount not more than 36000 (V_bank_deposit_max) after that every 1 minute 6% (V_bank_percentperminute_toplayer) will be given to you.
You can do that operations any time even if you are dead ,only 1 condition: you must be connected to server {: .

Contracts.
There is contracts system in bank.

Every user can enter into agreement contracts ,break them ,change contract levels ,etc.
Every contract in game has 3 levels every next level is more expensive ,but more profitable to client.

Levels table:
Code:

    contract price multipler:            total price (multipler) to reach tihs level        total contract executing money multipler:
level 1:      1.00                                1.00                                1.00                    NOTE: no change is avaivable
level 2:      1.00 (V_bank_const_level_2_multipler)                  1+1=2.00                2.25 (V_bank_const_level_2_effect)
level 3:    1.25 (V_bank_const_level_3_multipler)                  1+1+1.25=3.25            4.00 (V_bank_const_level_3_effect)

Expample if you have entered into agreement the skill contract ,upgrated it to second level 5000*1.00 (V_bank_const_skill_price*V_bank_const_level_ 2_multipler) ,upgrated it to trirg level 5000*1.25 - totaly you payed 5000+5000*1.00*5000*1.25 (according to default cvars)
Then if you will hit someone with headshot you will have 80*4.00 (V_bank_const_skill_one_death_head_price_atta cker*V_bank_const_level_3_effect)

As you see ,what higher is level of contract - that will be better for you
price:earings from executing
1-st 1.00:1.00
2-nd 2.00:2.25
3-rd 3.25:4.00


Every contrat details:

Skill contract.
This contract based on your skill. As many you kill and hit ,so many you will have money ,if you are victim(killed ,or hit) - it is bad ,and bank withdrews some money
To enter into agreement you must have $5000 (V_bank_const_skill_price) ,to break this contract only 60% ("V_bank_const_skill_disable_moneypart*100 ) will be backed to you.
Levels contains with "Levels table" multiplers.
if contract is active for you ,money will be added to you or taken from you while such events:

1. if you killed someone without headshot you will have +$40 (V_bank_const_skill_one_death_price_attacker)
2. if you killed someone with headshot you will have +$80 (V_bank_const_skill_one_death_head_price_atta cker)
3. if you hit someone not into head you will have +$5 (V_bank_const_skill_one_hit_price_attacker)
4. if you hit someone into head you will have +$10 (V_bank_const_skill_one_hit_head_price_attack er)
5. if you was hit by someone you will have -$8 (V_bank_const_skill_one_hit_price_victim)
6. if you was hit by someone with headshot you will have -$10 (V_bank_const_skill_one_hit_head_price_victim )
7. if you was killed by someone you will have -$60 (V_bank_const_skill_one_death_price_victim)
8. if you was killed by someone with headshot you will have -$60 (V_bank_const_skill_one_death_head_price_vict im)

NOTE: skill contract is sensitive to friendlyfire and hostagfire,do not try to manipulate by this.

Scenario contract.
This contract is based on your scenario executing (rescuring hostages ,planting bombs ,defusing bombs , etc.)
To enter into agreement you must have $5000 (V_bank_const_scenario_price) ,to break this contract only 75% (V_bank_const_scenario_disable_moneypart*100) will be backed to you.
Levels contains with "Levels table" multiplers.
if contract is active for you ,money will be added to you or taken from you while such events:

1. if you started to plant the bomb you will have +$25 (V_bank_const_scenario_bp_begin)
2. if you finished planting ,but the bomb is still in your hand you will have -$50 (V_bank_const_scenario_bp_begin_fine)
3. if the bomb was planted by you and is beeping you will have +$200 (V_bank_const_scenario_bp_done)
4. if you defused the bomb you will have +$500 (V_bank_const_scenario_bd_done)
5. if you planted the bomb ,and it explodes you will have +$400 (V_bank_const_scenario_b_explode)
6. if you dropped the bomb you will have -$25 (V_bank_const_scenario_b_drop)
7. if you picked up the bomb you will have -$20 (V_bank_const_scenario_b_pick_up)
8. if you begin to defuse the bomb you will have +$50 (V_bank_const_scenario_bd_begin)
9. if you finished to defuse the bomb ,but the bomb is still ticking you will have -$75 (V_bank_const_scenario_bd_begin_fine)
10. if hostage begins to follow you ,you will have +$25 (V_bank_const_scenario_hs_folows)
11. if you hurt hostage you will have -$250 (V_bank_const_scenario_hs_hurt)
12. if you killed hostage you will have -$1000 (V_bank_const_scenario_hs_killed)
13. if you rescured hostage you will have +$500 (V_bank_const_scenario_hs_rescured)
14. if hostage ends follow you ,you will have -$30 (V_bank_const_scenario_hs_folows_fine)
15. if VIP was escaped ,and you are VIP you will have +$1500 (V_bank_const_scenario_vip_escaped)
16. if VIP was killed ,and you are attacker (no ff) you will have +$1500 (V_bank_const_scenario_vip_killed_toattacker)
17. if VIP was killed ,and you are VIP you will have -$100 (V_bank_const_scenario_vip_killed_tovip)

Anti friendly-fire contract.
This contract is based on that you will not hurt your friend ,and will have money from that
To enter into agreement you must have $3500 (V_bank_const_ff_price) ,to break this contract only 25% (V_bank_const_ff_disable_moneypart*100) will be backed to you.
Levels contains with "Levels table" multiplers.
if contract is active for you ,money will be added to you or taken from you while such events:

1. if you did not hurt your friend more than 2 minutes ago ,you will have +$200 (V_bank_const_ff_add) every minute.
2. if you hurt your friend you will have -$400 (V_bank_const_ff_fine)

NOTE: while ff is disabled on the server contract will not bring money.

TeamWin contract.
This contract is based on that your team will win ,in other event money will be withdrawn from you.
To enter into agreement you must have $2000 (V_bank_const_teamwin_price) ,to break this contract only 50% (V_bank_const_teamwin_disable_moneypart*100) will be backed to you.
Levels contains with "Levels table" multiplers.
if contract is active for you ,money will be added to you or taken from you while such events:

1. if your team will win you will have +$50 (V_bank_const_teamwin_win)
2. if your team will loose you will have -$75 (V_bank_const_teamwin_loose)


cHangelog:

Code:

*        0.1 :beta        Total requirements: 62.48 KB
*            -initial verion
*
*        0.2 :beta        Total requirements: 69.98 KB
*            - fixed statisctics system
*            - fixed help system
*            - friendly fire fixes
*
*        0.3 :beta        Total requirements: 74.28 KB
*            - global contract: NoFF
*            - optimised
*            - fixed bugs,when you can break non agreed contracts and argee 1 contract many times
*            - rerwitered menus,some fixes
*           
*        0.4 :beta      Total requirements: 92644 bytes + a_mysql
*            - life with 0 hp fixed           
*            - global contract levels 1,2,3       
*            - some bug fixes               
*            - global contract: TeamWins         
*            - admin commands           
*            - little bug :3 tag mismatches fix          + Thanks to nican
*            - config(database)                      + Thanks to nican
*          0.5:beta
*            - !bank is avaivable ,the same as !bank_menu            0.4.1
*            - enable/disable contracts with V_bank_allowcontracts        0.4.2
*

Requirements:

Nican`s plugin Database manager
http://forums.alliedmods.net/showthread.php?t=60036

Cvars:

General purpose Cvars:
V_bank_percentperminute_toplayer - deposit %
V_bank_percentperminute_tobank - credit %

V_bank_deposit_max - maximum deposit, which you can to put the bank
V_bank_credit_max - maximum credit, which you can to put the bank

V_bank_save_status - if nonzero clients`s status will be saved ,and recovered when client connects

Multiple level contracts vars:

V_bank_const_level_2_multipler - how much will cost the second level of contract ,multipling to original contract price
V_bank_const_level_3_multipler - how much will cost the third level of contract ,multipling to original contract price
V_bank_const_level_2_effect - multipler ,it has place when player gets money from executing contract with second level
V_bank_const_level_3_effect - multipler ,it has place when player gets money from executing contract with third level

Skill contract Cvars:

V_bank_const_skill_price - money,you need to pay for enter into agreement the skill contract
V_bank_const_skill_disable_moneypart - money:the part of money (multipler for V_bank_const_skill_price) given to you ,when you break entered into agreement earlier skill contract
V_bank_const_skill_one_hit_price_attacker - money:when skill contract is active payment to you ,when you hit somebody
V_bank_const_skill_one_hit_price_victim - money:when skill contract is active fine for you,when you was hit
V_bank_const_skill_one_hit_head_price_attacke r - money:when skill contract is active payment to you ,when you hit somebody into head
V_bank_const_skill_one_hit_head_price_victim - money:when skill contract is active fine for you,when you was hit into your head
V_bank_const_skill_one_death_price_attacker - money:when skill contract is active payment to you,when you killed someone
V_bank_const_skill_one_death_price_victim - money:when skill contract is active fine to you,when you was killed by someone
V_bank_const_skill_one_death_head_price_attac ker - money:when skill contract is active payment to you,when you killed someone with headshot
V_bank_const_skill_one_death_head_price_victi m - money:when skill contract is fine to you,when you was killed by someone with headshot

Scenario contract Cvars:

V_bank_const_scenario_price - money,you need to pay for enter into agreement the scenario contract
V_bank_const_scenario_disable_moneypart - the part of money (multipler for V_bank_const_scenario_price) given to you ,when you break entered into agreement earlier scenario contract

V_bank_const_scenario_bp_begin_fine - money: when scenario contract is active ,you plant the bomb, but suddenly you reconsidered, have the fine
V_bank_const_scenario_bp_begin - money: when scenario contract is active ,you have just began to plant the bomb,have the payment
V_bank_const_scenario_bp_done - money: when scenario contract is active ,the bomb has been planted by you,have the payment
V_bank_const_scenario_bd_done - money: when scenario contract is active ,the bomb is ticking, you have just defused it,have the payment
V_bank_const_scenario_b_explode - money: when scenario contract is active ,the bomb was exploding,and you was the planter,have the payment
V_bank_const_scenario_b_drop -money: when scenario contract is active ,you had the bomb ,but you dropped it ,have the fine
V_bank_const_scenario_b_pick_up - money: when scenario contract is active ,you did notebmb,you picked up it,have the payment
V_bank_const_scenario_bd_begin - money: when scenario contract is active ,when you begin to defuse the omb,have the payment
V_bank_const_scenario_bd_begin_fine - money: when scenario contract is active ,when you had began to defus the bomb,but you break this process,have the fine
V_bank_const_scenario_hs_folows - money: when scenario contract is acive ,when the hostage follows you,have the fine
V_bank_const_scenario_hs_hurt - money: when scenario contract is active ,you have justhurt a hostage,have the fine
V_bank_const_scenario_hs_killed - money: when scenario contract is active ,you have just killed a hostage,hav the fine
V_bank_const_scenario_hs_rescured - money: when scenario contract is active ,you rescured a hostage,have the paymnt
V_bank_const_scenario_hs_folows_fine - money: when scenario contract is active ,hostages cease to go for you
V_bank_const_scenario_vip_escaped - money: when scenario contract is active ,you are VIP ,you was escaped,have the payment
V_bank_const_scenario_vip_killed_toattacker - money: when scenario contract is active ,you killed VIP,have the money
V_bank_const_scenario_vip_killed_tovip - money: when scenario contract is active ,you are VIP ,you was killed,have the fine

Anti friendly fire contract Cvars:

V_bank_const_ff_price - money,you need to pay for enter into agreement the "AFF" contract
V_bank_const_ff_fine - money,when anti friendly fire contract is On ,you have just hurt friend, get your fine.
V_bank_const_ff_add - money,when anti friendly fire contract is On ,if you did not hurt your friends at least 2 minutes ago - get your money this minute
V_bank_const_ff_disable_moneypart - the part of money (multipler for V_bank_const_ff_price) given to you ,when you break entered into agreement earlier scenario contract

TeamWin contract Cvars:

V_bank_const_teamwin_price - money,you need to pay for enter into agreement the "TeamWin" contract
V_bank_const_teamwin_disable_moneypart - the part of money (multipler for V_bank_const_teamwin_price) given to you ,when you break entered into agreement earlier scenario contract
V_bank_const_teamwin_win - money ,given to you ,when team wins
V_bank_const_teamwin_loose - money ,taken from you ,when team looses

Con Commands:

bank_deposit <amount> make a deposit to bank
bank_withdraw <amount> return money ,that are on deposit now
bank_status <bank || user> (if user <usernumber> )
bank_contract_enable <contract> enter into agreement a contract allowed ones are: "skill","scenario"
bank_contract_discard <contract> break the contract allowed ones are: "skill","scenario"
bank_credit_take <amount> take a credit
bank_credit_return <amount> return some credit
bank_help <[no_arguments]> general bank help

NOTE:you can do not use this cmd`s using menus:

bank_menu <menu> ( if no arguments - will be appeared the main bank menu ) menu can be: deposit , withdraw , credit , retcredit , contracts <general>,

Admin Commands:
sm_grandbank_setuserdeposit <#userid> <amount> to set user`s deposit Example:sm_bank_setuserdeposit #13 600 ");
sm_grandbank_setusercredit <#userid> <amount> to set user`s credit Example:sm_bank_setuserdepsit #10 65535 ");
sm_grandbank_setusergcontsStatus <#userid> <skill level> <scenario level> <aff level> <teamwin level> use it to set user contracts status Example:sm_grandbank_setusergcontsStatus #2 3 3 3 3");

WARNING: admin actions does not touch bank and user statistics ,it only sets that is written is description!


:grrr:

Vbios__ 01-03-2008 09:10

upd
 
Updated to 0.3

tkaway69 01-06-2008 14:15

Re: Grand Bank
 
Some info on how this Differs from the Bank mod by "Nican" would be nice. We are thinking of switching, but are not sure of exactly how to use this. Maybe a server ip where we could see it in action.

Nican 01-06-2008 14:36

Re: Grand Bank
 
I must say, he worked on this plugin a lot more then I did on mine, but he does not have a database connection.

I would be more then glad to help "Vbios__" make a database connection.

Reset Fuss 01-06-2008 15:10

Re: Grand Bank
 
Hi, I put this plugin on our server,217.20.113.171:27000, after map change its all data lost, so we must start all over again every round, by the 20 min round time, players losing interests, and to go in bank menu we must type in game console bank_menu, it would be better to type !bank in chat, not every body have game console as a start option, that's why players losing interest about a Grand Bank.
I hope it can be approved, I like the idea very much from Grand Bank.:up:


SRY! For my bad English!!!

Reset Fuss 01-06-2008 18:25

Re: Grand Bank
 
Sry for desinformation, in game cmd !bank_menu it works fine!

tkaway69 01-07-2008 11:20

Re: Grand Bank
 
So, where is info stored now? Does this currently use local data folder?

Vbios__ 01-07-2008 11:49

Re: Grand Bank
 
I will create configfile(database) ,where will be keeped all information about users and bank status ,see it in next versions

I have a question: can I wrie a binary config ,remaking UTF-8 names(symbols) info binary data ?

Nican 01-07-2008 17:00

Re: Grand Bank
 
Quote:

Originally Posted by Vbios__ (Post 571417)
I will create configfile(database) ,where will be keeped all information about users and bank status ,see it in next versions

I have a question: can I wrie a binary config ,remaking UTF-8 names(symbols) info binary data ?

Well, technically, you can. But you do not need to go through all that work, SourceMod has a build in SqLite system.

Link for article:
http://wiki.alliedmods.net/SQL_%28So...d_Scripting%29

Vbios__ 01-08-2008 09:02

Re: Grand Bank
 
I can`t understand SQL ,i will just create config file


All times are GMT -4. The time now is 01:41.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.