View Single Post
Plugin Info:     Modification:          Category:          Approver:   Hawk552 (427)
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-08-2009 , 15:13   RPG mod by Sylwester
Reply With Quote #1

RPG mod v1.0b41
(Last updated: 1 February 2010)
  • Description
This plugin is based on RPG mod for CS:S by SeLfkiLL.
It allows players to gain xp when they kill or damage opponents. After reaching certain amount of xp, player gains level and receives credits.
Players can spend their credits to buy upgrades providing different benefits.

You can also:
- allow only one of the teams to use upgrades
- set default upgrades for all players or bots
- give some upgrades only to selected users
- block players from changing anything in their data (so they can use only default upgrades or upgrades given by command)

  • Upgrades:
Code:
1: Regeneration: regenerates 1-10 hp every second
2: Health+: increases your maximum health by 25-250
3: Resupply: regenerates 1-10 bp ammo every 3 seconds
4: Vampire: gives you 7.5%-112.5% of damage dealt back as health (if not full)
5: Stealth: makes you transparent (16%-78%)
6: LongJump: increases your jump speed (20%-100%)
7: IceStab: your knife stabs seriously slow down your opponents
8: FrostPistol: your pistol hits slow down your opponents
9: Denial: you get your weapons back if you died
10: Impulse: temporarily increases your speed after being hit
11: Medic: heals your nearby teammates (1-15 hp (armor) every second)
12: AutoBHop: lvl1 - autojumping, lvl2 - no slowdown after landing
  • Required Modules
fakemeta
hamsandwich
fun
cstrike
nvault
sqlx

  • Commands
Chat commands:
rpg or menu - opens main menu
help - opens help menu
/deletexp - deletes your data from current database

Console commands:
rpgmenu - opens main menu

amx_rpglogin <username> <password> - used to register or login
I've never seen it in any xp mod (I wonder why). It allows you to link your player data (xp, credits, upgrades) with desired username and password.
To register and save your data, use this command with username that does not exist in database.
To login and retrieve your data, use this command with username and password you used to register.
Both username and password must be 3-10 characters containing only letters, numbers, - and _
Using this command you can always get back your data even if you have mutliple steamids/dynamic ip/different names or server cvar rpgm_saveby has changed.
If you use this command your current data will be always deleted from current database (set by rpgm_saveby cvar), and moved to/loaded from database for registered users.

Admin console commands:
amx_rpg_lvl <@all|@t|@ct|#userid|name> <+|=|-> <amount> - changes target(s) level
amx_rpg_drop_upgs <@all|@t|@ct|#userid|name> - forces target(s) to sell all upgrades
amx_rpg_set_upgs <@all|@t|@ct|#userid|name> <upgrades_string> - set target(s) upgrades
example: amx_rpg_set_upgs @t 5a0e00000001
(give all terro lvl5 regeneration, lvl10 health, lvl14 vampire and lvl1 bhop)

Server commands:
amx_rpg_global_reset <RENAME|DELETE> - rename or delete all current database files/tables
In other words: xp reset for all players

  • Cvars
Code:
cvar default_value   //description

rpgm_savedata 1   //save data? 1 - yes, 0 - no (including bots)
rpgm_bot_savedata 0   //save bots data ? 1 - yes, 0 - no   
//bots are always saved by name in separate file (nvault) or table (mysql)

rpgm_saveby 1   //save player data by 1 - steamid, 2 - ip, 3 - name
//data saved by steamids, ips, names is kept in separate files/tables

rpgm_savedb 1   //Database: 1 - nvault, 2 - MySql
rpgm_sql_host ""   //sql server ip
rpgm_sql_user ""   //sql username
rpgm_sql_pass ""   //sql password
rpgm_sql_db ""   //sql database name

rpgm_user_control 1   //block say commands, menus and info under chat? 0 - yes, 1 - no

rpgm_frequent_save 0   //1, 2 - frequent xp saving
//set to 1 or 2 if you are worried about players losing xp earned during map due to server crash
//0 - automatically save player data only on disconnect
//1 - save on disconnect + save all players data on new round
//2 - save on disconnect + every 10 secs save player with most xp gained
//2 is for servers with no round end (csdm etc.)

rpgm_xp_mult 1.0   //multiplier for xp gained

rpgm_in_team 0   //upgrades work only for: 0-both teams, 1-ts, 2-cts

rpgm_start_lvl 0   //default level for new players
rpgm_bot_start_lvl 0   //default level for new bots

rpgm_upgs 111111111111   //this is string, it determines which upgrades are enabled and disabled
//0 on position x means that upgrade number x is disabled while 1 means it's enabled
//example 1: 111111111110 - all upgrades enabled, except AutoBHop
//example 2: 010010000000 - only Health+ and Stealth are enabled
//If you disable some upgrade, then players get 100% of credits spent on this upgrade back

rpgm_def_upgrades 000000000000   //this is string - default upgrades for new players        
rpgm_bot_def_upgrades 00000000000   //this is string - default upgrades for new bots
//you can use numbers (0,...,9) and letters (a,...,z)
//a = 10, b = 11, c = 12, ...

rpgm_bot_buy_upgs 0   //bots automatically buy random upgrades on spawn? 1 - yes, 0 - no
//depends on amount of credits, bot buy random upgrade if his credits are >= 0
  • ChangeLog
Code:
1.0b41 (1 February 2010):
- bugfix (teleport to origin {0,0,0} when jumping)

1.0b3 (26 June 2009):
- added MySql support (using sqlx module)
- added bots support (start lvl, data saving, buying upgrades)
- added settings menu
- modified login info menu
- added cvars:
        rpgm_savedb
        rpgm_frequent_save
        rpgm_start_lvl
        rpgm_in_team
        rpgm_def_upgrades
        rpgm_bot_start_lvl
        rpgm_bot_savedata
        rpgm_bot_buy_upgs
        rpgm_bot_def_upgrades
        rpgm_sql_host
        rpgm_sql_user
        rpgm_sql_pass
        rpgm_sql_db
        rpgm_user_control
- added commands:
        amx_rpg_lvl
        amx_rpg_drop_upgs
        amx_rpg_set_upgs
        amx_rpg_global_reset
- removed cvar rpgm_start_cr

1.0b2 (21 June 2009):
- bugfix (xp reset when using say)

1.0b1 (9 June 2009):
- bugfix (index out of bounds in show_levels)

1.0b (8 June 2009):
- first release
  • Credits
SeLfkiLL - orginal idea

  • Info
This plugin has been requested here. There was an attempt to make this plugin by mateo10, but he never released fully working version and his plugin ended up unapproved here.
Attached Files
File Type: sma Get Plugin or Get Source (rpg_mod.sma - 3597 views - 80.8 KB)
__________________
Impossible is Nothing

Last edited by Sylwester; 09-19-2013 at 12:50. Reason: update
Sylwester is offline