Media
Description πŸ‡¬πŸ‡§ Description πŸ‡«πŸ‡·

Gmod NPC Reward Manager - Script

Demonstration Youtube video of Gmod NPC Reward Manager

No need to modify the Lua files of the Npcs you just installed on your server. No need to pay devs for a rewarding modification job every time you install new Npcs. Buy the script once and do the modifications in real time whenever you want and without any programming skills in Glua or Lua. This Npcs reward management addon is made for this kind of need.

NPC Reward Manager allows to create and apply variables linked to the metatable player with values defined by NPC class, to the player who eliminated him. It is possible to provide a minimum and maximum value to create a random number generation.
For example if you add the variable addMoney, with a minimum value of 5 and a maximum value of 10, when the npc is killed by the player, the player wins between 5 and 10 $. This will work with all variables.

inteface add-npcs-in-panel click-to-show add-variable-addmoney new-variable-added set-the-values variable-use-when-npc-die set-min-max-value get-the-reward-without-spawn-entitie

Maximum image size
Description

Description of Gmod NPC Reward Manager

Contents :
  1. πŸ“˜ Short presentation of Gmod NPC Reward Manager
  2. ❓ What kind of need can Gmod NPC Reward Manager meet
  3. πŸ”Ž Description
  4. πŸ“¦ Contenues
  5. πŸ“ Customization options
  6. πŸ•ΉοΈ Console commands
  7. πŸ’Ύ Backup and persistence
  8. βœ”οΈ Compatibility
  9. βž• The original functions that can be useful to you on Gmod associated with the Class player for applications:


πŸ“˜ Small presentation of Gmod NPC Reward Manager

Looking for a Gmod addon so that when a user eliminates an NPC earns a reward through the functions related to your gamemode and addons? Such as XP, or $ for DarkRP money? Or something else? [Gmod NPC REWARD Manager[/b] does this job, add NPC classes, insert variables/functions to apply such as AddMoney (for player:AddMoney() ) or AddXP (for player:AddXP() if you have a levelup system installed) and when they are eliminated your users will earn this value, or a random number between the minimum and maximum value that you set up yourself, without coding a single line.



❓ What kind of need can Gmod NPC Reward Manager answer?

If you have any questions, Gmod NPC Reward Manager could be useful for you:
1. I want my players to earn money or experience points when they kill a type of NPC
2. I would like to customize the amount of exp or money a npc gives to the player
3. I would like the currency and xp to be shared between all attackers of a npc
4. I would like to add rewards manually via meta variables linked to other addons e.g. add Mana with player:SetMana(50) when the player kills a specific type of npc.
5. I would like to generate the reward gain per npc type from a list and interface.



πŸ”Ž Description

Gmod NPC REWARD Manager is a Variable insertion system linked to the Player class, table provided by the meta table FindMetaTable('player' ) or debug. getregistry()['"player"], the advantage is that you can install Npcs from the gmod workshop and directly apply the functions to launch when they are eliminated, without reboot, without fiddling with the different addons, and when you have many NPC save time in the configuration, the menu allows to gather everything in a list so you don't disperse in the different Npcs addons.

Two variables (addMoney and addXP) are inserted by default when you add an npc in the list, they will serve as a basic example but are already working, estimating that they will be the most used variables.



πŸ“¦ Contents

1. A Class Management System of Npcs
2. A System of insertion of class of npc
3. A System of addition of variable
4. A minimum and maximum value addition system
5. Delete in real time a variable or a class of npc from the list.
6. Everything is applied in real time.



πŸ“ Customization options

Customize the interface color if you want to change it



πŸ•ΉοΈ The console commands

The command to open the management menu: npc_reward_manager



πŸ’Ύ Backup and persistence

There's nothing to do, install and reboot, backups are made with every change



βœ”οΈ Compatibility

Compatible with every Gamemode imaginable, DarkRP, StarwarsRP, HogwartsRP, Clockwork, Sandbox...
Compatible with my addons made to work with Vrondakis Level system for what concerns the function player:AddXP() add the variable AddXP and there you go.
Compatible with the functions provided by darkrpgmaster (DarkRPG).
Compatible with Nextbot and VJ Base since version 1.2



βž• The original functions that can be useful on Gmod associated with the Class player for applications:

We are only interested in the Glua functions on the server side:
player:addXP( xp ) //Adds XP to the player who kills the npc (You must have a leveling system)
player:addLevels( lvl ) //Adds a level to the player who kills the npc
player:addMoney( lvl ) //Adds money to the player who kills the npc (You must have a money system OR DarkRP)
player:AddFrags( number ) //Adds frags to the player who kills the npc
player:SetArmor( number ) //Adds armor to the player who kills the npc
player:SetJumpPower( number ) //To add jumping power ect.

The command: npc_var_player_metatable allows to display in the server console all possible variables

πŸ”Ή WIKI & F.A.Q πŸ‡¬πŸ‡§
Wiki πŸ‡¬πŸ‡§ Wiki πŸ‡«πŸ‡·

Wiki of Gmod NPC Reward Manager

Gmod NPC Reward Manager


☰ 1. Installation of Gmod NPC Reward Manager
Installation: Download and Unzip the folder nordahl_npc_reward_manager.zip Install the addon in the addons file of your Gmod server,
Path: garrysmod/addons/nordahl_npc_reward_manager
☰ 2. Where can I find resources and materials? What is the Gmod NPC Reward Manager Workshop id?
Vous trouverez les ressources dans le workshop de Garry's Mod sur Steam. - Gmod Workshop ID of Gmod NPC Reward Manager: 2690171927
- The AddWorkshop function is automatically added to the script server file and can be deactivated from the configuration file. : resource.AddWorkshop( 2690171927 )
- To add gmod workshop resources to your collection : Gmod NPC Reward Manager [Content Only] | Gmod Workshop
☰ 3. How to open the Gmod NPC Reward Manager menu?
From the Gmod console use the command: npc_reward_manager
From the chat : !npc_reward
☰ 4. How do I add classes to customize the rewards?
From the interface click on the detection button while being near the class of Npcs to add.
It will then display a list of npcs near you, select the one you want, and it will appear in the list.

add-npc-class
☰ 5. How to make NPCs give XP on GMod when they die?
Select the Npcs you want to customize the reward.

If you have a leveling system installed, the variable to add is: addXP

This means that when the player kills an NPC then the following function will be used: player:addXP( *number )
*number is the number you chose for the class. A minimum value and a maximum value will give a random number between these two values.

Be careful the command is case sensitive.
☰ 6. How to make NPCs give money on Gmod when they die?
Select the Npcs you want to customize the reward.

If you have a currency system installed or DarkRP that includes this by default the variable to insert is: addMoney

This means that when the player kills an NPC then the following function will be used: player:addXP( *number )
*number is the number you chose for the class. A minimum value and a maximum value will give a random number between these two values.

Be careful the command is case sensitive.
☰ 7. How to apply a random value between two numbers on a variable?
When you have added a variable you can edit its minimum and maximum value. If Maximal is zero then the random formula will be disabled. And the minimum value will become a fixed number.
random value on gmod
☰ 8. How to get a fixed number? (Disable the random value)
The minimum number becomes a fixed number if the maximum value is 0.
Disable random value on GMod
☰ 9. How to delete a variable?
Click on the variable you want to remove. The delete button will appear, click on it.
Add variable gmod player
☰ 10. How to remove a class from the list?
A white cross appears in the corner of each image representing the class. Click on it to delete it.
Supprimer un NPC
☰ 11. How to save?
There is nothing to do, it is automatic with each change.
☰ 12. Where can I find more variables about the Player class?
On the site or the description of the gamemode you have installed. In your addons (if the creators have the courage to write a complete description.)

By typing the command : print_player_metatable this command has been created for Gmod NPC VAR Manager
☰ 13. How to add a new variable?
From the interface choose: + NEW VAR and insert the name of a variable, for example addXP to get XP, addMoney for money.

add-new-var
☰ 14. How to share the experience points earned on Gmod between several users according to the number of damage inflicted to NPCs or bosses?
In the configuration file find the variable cfg.NPC_SHARE_REWARD = 0

0 = The last one to make the decisive move to kill the NPC wins the payoff. (Default)
1 = The winnings are shared when the NPC dies between the different users who contributed to it according to the damage they inflicted.
☰ 15. Help! I earn 10$ when I kill a NPC on DarkRP when I set up 1000$.
There is no problem, you will see that you still earn the 1000$. The 10$ comes from the configuration of your DarkRP.
Tips

Tip to avoid the leak of Gmod NPC Reward Manager installed on your Garry's Mod server: How avoid the Leak of your Gmod scripts
How Install an addon on Gmod? : How install an addon on Gmod
How Publish an addon on the Gmod workshop? : Documentation how create a content pack to publish on the workshop?

Gmod Addon


πŸ“₯ Download 1.4


🎫 Ouvrir Ticket


avatar-76561198033784269

Creator: Norda Scripts

Sales42
Published2 years
Last update
Versionversion 1.4
DRMYes
CategoriesGmod addons
RequierementsGarry's Mod Server
LanguagesπŸ‡¬πŸ‡§ πŸ‡«πŸ‡· πŸ‡©πŸ‡ͺ πŸ‡ͺπŸ‡Έ
Admin DarkRP Entities Gameplay Management Allgamemode