MRPGNPC

MRPGNPC 1.2.5

Compatible API Versions
1.0.8
Sourcecode
https://github.com/MufHead/MRPGNPC
Contributors
MuffinHead
MRPGNPC
A mob plugin with many custom settings

👾For RPG Server👾


What can it do?
· Custom skin and model,can make different kind of mob
· Custom a lot of property
Ex:
- The guards that protect the town.
- Mob arena.
- PC RPG server all have Spawns system now you can have!

- Command NPC


Everytime after you change the config,you need /reload or /mrn reload

To reload the data in the cache.

First,it’s the command part.MRPGNPC(And then it's called MRN) ‘s command until now have 2 type—Mob and Point



/mrn mob create/delete MobName To create one kind of MobNPC.

/mrn point create/delete PointName To create one SpawnPoint of MobNPC.

/mrn skill create SkillName To create one Skill of MobNPC.



/mrn reload To reload the mob&point config that have just created.
Here’s mob config:

1606722437568.png


DisplayName: MobNPC’s name that display and can use these function:

- {MaxHealth} mob’s maxhealth

- {Health} mob’s current health

- {Damage} mob’s damage



Maxhealth: Integer type Mob’s maxhealth



Size: Double type Mob’s scale 1.0 is the normal size



MovementSpeed: Double type Mob’s speed



Damage: Double type Mob’s damage at once attack



Knockback: Double type Mob’s knockback performance at once attack



DefenseFormula: String type Mob’s defense formula.source.damage is the dmagae function from one attack.Ex:You want mob can defuse 30% damage one time DefenseFormula: source.damage*0.7



AttackDelay: Int type Mob’s delay of once attack 20 is 1s (Minecraft 20tick = 1s).



DamageDelay: Int type Mob’s delay of once attack’s damage take effect 20 is 1s (Minecraft 20tick = 1s).Ex: IF your mob’s attackdelay is 20 then it will attack once every second.IF it’s damagedelay is 20 ,then it will attack once every 1s but the damage effect after last second.(
Just like in an RPG game, if the player is out of hitrange(This will be mentioned later) during an damaedelay , the player is not harmed and other creatures within hitrange of that point are harmed).



BeDamagedDelay: Int type Mob’s delay of be damaged by same entity 20 is 1s (Minecraft 20tick = 1s). It can prevent connectors that attack toooooo fast.



AttackRange: Double type Mob’s range of one time attack . It’s the radius of a circle.



HateRange: Double type Mob’s range of hate . It’s the radius of a circle.



NoHatesHeal: String type When the mob’s hate value for a player is 0 or null,and it have no target,it will back to the spawnpoint.By the way,when the tick over,it will heal N health every tick.Ex: NoHateHeal: ‘200:1.0’ That mean’s : When the mob have no target at all,it will try to back to the spawnpoint and start count the 200 tick delay,when the delay over,it will heal it self 1.0 every tick!



CanBeKnockBack: Boolean type Can set the mob can be knockback or not.



DeathCommand: List<String> type Can set the command when the mob dead the console will run.



The functions of the deathcommand: The function ‘s result must come from a player,that because that like the give command or kill command must use player’s name!If is normal entity not a player,the command wont be run.

Ex:

DeathCommand:

- 100;console;give {killer.name} 264 1 100% give the killer player one diamond (Must have a killer,if is poison or magic way to die,the command wont run).And the sender type is 'console'.So this command will run by console



- 50; console;give {damager.name} 264 1||give (hater.name) 264 1&&give {killer.name} 264 1 50% give the most damage player one diamond or not only give the most hate player one diamond,but also give the killer one diamond.

- 50; player:kill 50% run this command by all players.And kill self.

&& can run serveral commands simultaneously.|| can let the plugin choose one of the command to run.



Skin: String type Can set the mob ‘s skin.

Skins folder:


1606722463545.png


One skin one folder:

1606722469408.png


Skin folder has one skin image and one model file:

1606722477841.png


And the model file's id must be geometry.mrpgnpc like this:
1623898018586.png


Item: String type Can set the mob’s item in hand Ex: ‘267:0’ is and iron sword.



HitRange: Double type Can set mob’s hitrange.Hitrange is the npc’s damage effect area(a circle)’s radius.



BeDamagedBlockParticle: String type Set the block particle when the mob has been damaged.Set block ID.Ex: ‘152:0’ is the RedStone Block ID.



Drops: List<String> type.Set npc’s drops.Ex:

Drops:

- 20:264-0-1||265-0-1&&263-0-1 20% drop a diamond or a coal and an iron.

Just like deathcommand



Camp: String type.A way to seperate the mobs that can classify them to choose in Target choose part.Input anything you like but not contains ‘:’



ActiveAttackCreature: List<String> type.Can set mob’s target that it will attack active.



Ex:

ActiveAttackCreature:

- Point:A That means the mob spawn from Point A will be target

- Player That means the players will be target

- Camp:A|Point:A That means the entity’s camp must be A and the Spawn Point must be A

- Mob Should be Mob

UnattractiveCreature: List<String> type.Can set mob’s target that it wont attack active.
Here’s point config:


1606722509538.png



PointName: String type.Point name,can for mob’s target choose.



SpawnList: List<String> type.Set mob spawn

Mobfile’s name:Respawn Tick:Spawn amount at once:Max amount of this line’s mob in this point:Spawn limit

Ex:

MobA:40:1:2:atDay-PlayersNearby~10 MobA will spawn at day and need one or more players nearby in radius 10’s circle ,the centre of circle is spawnpoint.



Spawnlimit’s function:

- atDay

- atNight

- playersNearby~distance(Double Type)

- noOneNearby~distance(Double Type)



Here’s skill config:
1606883830766.png


Most of skill can use javascript's ALG to calculate some data to use.
Like the dash skill in the img.Can dash for a distance according to the NPC's head yaw/pitch


Here's all the skill you can use until now:

Delay;Integer
To delay a while 20tick = 1second.

Damage;TargetsOptions;Damage(Double type) To damage an entity/entities

Blowup;TargetsOptions;Strength(Double type) To blowup an entity/entities,strength 1-3 is befitting.

Burn;TargetsOptions;Tick(Integer type) To burn an entity/entities for xx ticks.

Message;TargetsOptions;Message(String type) To send message to a player/players

HugeExplode;x(Double type);y(Double type):z(Double type) To spawn a huge explode particle.

Dash;motionX(Double type);motionY(Double type);motionZ(Double type) To dash for a distance.

Effect:TargetsOptions;EffectID:EffectAmplifier;EffectDuration
To effect an entity/entities for xx ticks.

ChangeItemInHand;Itemid;Itemdamage To change mob's item in hand

ChangeAttackRange;Double type

ChangeSkin;Skinname
To change skin for mob

ChangeDamage;Double type To change mob's damage

ChangeSize;Double type To change mob's size(scale)

ChangeKnockback;Double type To change mob's knockback

ChangeMovementSpeed;Double type To change mob's movementspeed

ChangeAttackDelay;Double type To change mob's attack delay

InsertSkill;Drobability(Int type 100 is 100%);TriggerMode;SkillName To insert a skill in mob's skilllist

RemoveSkill;Drobability(Int type 100 is 100%);TriggerMode;SkillName To remove a skill in mob's skilllist

RefreshAttackDelay To refresh mob's attack delay.Make mob can do attack quickly.

RunCommand;true/false;Command(String type) if is true the damager player will run this command,if is false,consolesender will run command command can use damager.name,but it will make this skill delay 1 tick(to get the damager


Lightning;TargetsOptions To spawn a lightning at entity'entities position NoDamage!!

Shooting;projectileID;startPosX;startPosY;startPosZ:motionX;motionY;motionZ;projectileDamage;projectileKnockBack;projectileSpeed;MaxDistance;projectileSize To shoot a projectile with custom id,custom startPosition and motion.projectile size,speed,damage,knockback.

If you just want your mob can shoot player,copy this!
Code:
 - Shoot;81;npc.x;npc.y+1.66;npc.z;-Math.sin(npc.yaw / 180.0 * 3.14) * Math.cos(npc.pitch / 180.0 * 3.14);-Math.sin(npc.pitch / 180.0 * 3.14);Math.cos(npc.yaw / 180.0 * 3.14) * Math.cos(npc.pitch / 180.0 * 3.14);3.0;0.0;0.5;15;1.0
SetSpawn;x;y;z;yaw;pitch;levelname To reset mob's spawn position

SectorAttack;TargetsOptions;degrees(half);radius;damage

- SectorAttack;distance-10-10/Mob;15;2;10

The mob faces the fan-shaped area with the midpoint line.
This part means: SectorAttack;the entites within 10 meters of the mob ,limit amount 10,and the only type affected is ’Mob‘ ;The Angle of the left and right sides of the sector is 15,radius is 2, damage is 10
The skills are very pool,if you have an idea or the algorithm ,you can tell me ,leave a message or join my discord.
Type-Figure-Distance-AmountLimit-List of valid entity types(Can't use now.The default is the list of active attack types for the entity)

Figure is for (hate) (damage),if you use damage/hate,the figure is to define is that player can be choose.
Like
Burn:damage-10-10-10:60 Choose the player that damaged mob more than 10, distance <=10 and the amount limit is 10(if more than 10 player,it will just choose 10 player with random)

Types:
- mostdamage
- mosthate
- nearest
- farest
- lastDamager Use this function will make the skill delay 1 tick
- distance Players that distance mob less than xx
- damage Players that damaged mob more than xx point
- hate Players that in mob's hatepool more than xx point

target.name If mob has a target,this will become target's name.

target.health

target.x
If mob has a target,this will become target's positionX,if not,this will become mob's positionX.

target.y

target.z

damager.name
if mob's last damage cause is entity attack and it is player,this will become last damager's name.Use this function will make the skill delay 1 tick!

npc.yaw

npc.pitch

npc.x

npc.y

npc.z

npc.health

npc.damage

TriggerMode types:
- onTick~tick Mob will run the skill every xx tick
- onHealth~</<=/>/>=health Mob will run the skill when it's health is </<=/>/>= xx health
- onAttack Mob will run the skill when it is in attacking status(Doesn't need damage anyone)
- onDamage Mob will run the skill when it has damaged anyone
- onBeDamaged Mob will run the skill when it has been damaged


Let's make some skills:

/mrn skill create skillname To make a skill config.


If i want to let mob use 'test' skill when it's health is less than 10.1,and the probability is 100%
1606885615652.png


probability:triggermode~condition(if the triggermode need):skillname

Then,open the skill----test config in the Skill folder.

Code:
Skills:
- Dash;Math.cos(((npc.yaw + 90.0) * 3.14) / 180.0)*4;0.2;Math.sin(((npc.yaw + 90.0) * 3.14) / 180.0)*4
- Message;mosthate-0-5-1;Mob:Fire!
- Burn;hate-10-5-1;60


Here's a skill list

Step 1:The mob will dash to the target.
Step 2:Server will send message to the most hate target and the amount limit is 1 ,so there ll just have 1 player to send.
Step 3:The mob will burn the entities around(But the amount limit is 1,so there will just have 1 player),for 3 second(60 tick = 3 second)

Code:
Skills:
- Effect;distance-0-1-10/Player;2;100;2
- Effect;distance-0-1-10/Camp:Kingdom;1;100;5
Use / To split target simplifier and creature type simplifier.
If you want this skill(Like effect,burn,damage) will just use on Player,You can add /Player after the target simplifier,Like line 1.
If you want use on Camp:Kingdom and SpawnPoint is Kingdom,add /Camp:Kingdom, Point:Kingdom

There's a new file in plugin folder named 'worldRandomSpawn.yml'

If you want to spawn mob randomly in a world,use this.

Ex:
YAML:
The format is:

LevelName:
- MobName:MaxAmount(EveryPlayer's nearby):MaxAmountDetectDistance:SpawnDistance:MobDisappearDistance:SpawnCooldown:Probability(10000 is 100.00%   5000 is 50.00%)


world:
- HumanSlayer:10:50:50:60:2:10000
It means the level named world.Will spawn humanslayer mob.Every player's nearby will spawn.The max amount for every player's nearby is 10.The detect amount distance is 50(player is the centre).The spawn distance is 50(the number bigger,the distance of mob spawn may the far).If the mob of randomSpawn's nearby has no player(Distance is 60),it will kill it self and despawn.The spawn cooldown is 2s.The probability of this mob is 100.00(Here is 10000 = 100.00%,50.00% is 5000)



The author:MuffinHead

1606659733320.png
Screenshot_2020-11-30-13-58-23-005_com.mojang.min.jpg


Ask for more RPG plugin?Join the discord and text to me!

Tencent QQ Group:826809170

Normal 1.12.0v geometry
JSON:
{
    "minecraft:geometry": [
        {
            "description": {
                "identifier": "geometry.mrpgnpc",
                "texture_width": 64,
                "texture_height": 64,
                "visible_bounds_width": 2,
                "visible_bounds_height": 3,
                "visible_bounds_offset": [0, 1.5, 0]
            },
            "bones": [
                {
                    "name": "root",
                    "pivot": [0, 0, 0]
                },
                {
                    "name": "rightLeg",
                    "parent": "root",
                    "pivot": [-1.9, 12, 0],
                    "cubes": [
                        {"origin": [-3.9, 0, -2], "size": [4, 12, 4], "uv": [0, 16]}
                    ]
                },
                {
                    "name": "rightBoot",
                    "parent": "rightLeg",
                    "pivot": [-1.9, 12, 0]
                },
                {
                    "name": "rightTrouser",
                    "parent": "rightLeg",
                    "pivot": [-1.9, 12, 0],
                    "cubes": [
                        {"origin": [-3.9, -0.1, -2.1], "size": [4, 12.2, 4.2], "uv": [0, 32]}
                    ]
                },
                {
                    "name": "leftLeg",
                    "parent": "root",
                    "pivot": [1.9, 12, 0],
                    "cubes": [
                        {"origin": [-0.1, 0, -2], "size": [4, 12, 4], "uv": [16, 48]}
                    ]
                },
                {
                    "name": "leftBoot",
                    "parent": "leftLeg",
                    "pivot": [1.9, 12, 0]
                },
                {
                    "name": "leftTrouser",
                    "parent": "leftLeg",
                    "pivot": [1.9, 12, 0],
                    "cubes": [
                        {"origin": [-0.1, -0.1, -2.1], "size": [4.1, 12.2, 4.2], "uv": [0, 48]}
                    ]
                },
                {
                    "name": "waist",
                    "parent": "root",
                    "pivot": [0, 12, 0]
                },
                {
                    "name": "body",
                    "parent": "waist",
                    "pivot": [0, 24, 0],
                    "cubes": [
                        {"origin": [-4, 12, -2], "size": [8, 12, 4], "uv": [16, 16]}
                    ]
                },
                {
                    "name": "head",
                    "parent": "body",
                    "pivot": [0, 24, 0],
                    "cubes": [
                        {"origin": [-4, 24, -4], "size": [8, 8, 8], "uv": [0, 0]}
                    ]
                },
                {
                    "name": "helmet",
                    "parent": "head",
                    "pivot": [0, 24, 0],
                    "cubes": [
                        {"origin": [-4.1, 23.9, -4.1], "size": [8.2, 8.2, 8.2], "uv": [32, 0]}
                    ]
                },
                {
                    "name": "rightArm",
                    "parent": "body",
                    "pivot": [-5, 22, 0],
                    "cubes": [
                        {"origin": [-8, 12, -2], "size": [4, 12, 4], "uv": [16, 48]}
                    ]
                },
                {
                    "name": "rightItem",
                    "parent": "rightArm",
                    "pivot": [-6, 15, 1]
                },
                {
                    "name": "rightSleeve",
                    "parent": "rightArm",
                    "pivot": [-5, 22, 0],
                    "cubes": [
                        {"origin": [-8.1, 11.9, -2.1], "size": [4.2, 12.2, 4.2], "uv": [0, 32]}
                    ]
                },
                {
                    "name": "leftArm",
                    "parent": "body",
                    "pivot": [5, 22, 0],
                    "cubes": [
                        {"origin": [4, 12, -2], "size": [4, 12, 4], "uv": [0, 16]}
                    ]
                },
                {
                    "name": "leftItem",
                    "parent": "leftArm",
                    "pivot": [6, 15, 1]
                },
                {
                    "name": "leftSleeve",
                    "parent": "leftArm",
                    "pivot": [7, 22, 0],
                    "cubes": [
                        {"origin": [3.9, 11.9, -2.1], "size": [4.2, 12.2, 4.2], "uv": [48, 48]}
                    ]
                },
                {
                    "name": "coat",
                    "parent": "body",
                    "pivot": [0, 24, 0],
                    "cubes": [
                        {"origin": [-4.1, 11.9, -2.1], "size": [8.2, 12.2, 4.2], "uv": [16, 32]}
                    ]
                }
            ]
        }
    ],
    "format_version": "1.12.0"
}
Author
MuffinHead
Downloads
15,157
Views
15,157
First release
Last update
Rating
5.00 star(s) 7 ratings

More resources from MuffinHead

  • MDungeon
    MDungeon
    Best dungeon room plugin (for MRPGNPC

Latest updates

  1. Add new skill;Fix target chooser

    new skill SectorAttack - SectorAttack;distance-10-10/Mob;15;2;10 The mob faces the...
  2. Fix bugs

    if you want to use different version skin, the geometry id should be geometry.mrpgnpc like this:
  3. support 1.10&1.12 version skin/geometry

    support 1.10&1.12 version skin/geometry

Latest reviews

Awesome Plugin! I really like it for its creativity and practicality!
This is best mob plugin for my RPG server idea! Is custom geometry really works? i tried spawn EntityHuman with skin but it not works for me
MuffinHead
MuffinHead
you can join the discrod group, i will send file in the group.https://discord.gg/sMdCSKkh
This is a great plugin. Can you add custom spawners that support this plugin
MuffinHead
MuffinHead
What's the custom spawner?Do you mean the cage of monster?
Can You PELASE upload SAMPLE skin.png and geometry.json that works? i can't get it to work, my summoned mosnter is staying invisible:(
MuffinHead
MuffinHead
Do you mean 1.10 version geometry? It can't work now..If you need i can try to add
One of the best plugins with VERY active development. Its so fun just so mess around with all the commands and stuff.
MuffinHead
MuffinHead
ummm i dont understand,is my commands part so chaos that you can't use it?If you have any advices you can tell me
Awesome!!!! Love this plugin and also the author for sharing this very good plugin.
It's an awesome plugin and it's my favorite plugin.
Top