MRPGNPC

MRPGNPC 1.1.0

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鈥檚 the command part.MRPGNPC(And then it's called MRN) 鈥榮 command until now have 2 type鈥擬ob 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鈥檚 mob config:

1606722437568.png


DisplayName: MobNPC鈥檚 name that display and can use these function:

- {MaxHealth} mob鈥檚 maxhealth

- {Health} mob鈥檚 current health

- {Damage} mob鈥檚 damage



Maxhealth: Integer type Mob鈥檚 maxhealth



Size: Double type Mob鈥檚 scale 1.0 is the normal size



MovementSpeed: Double type Mob鈥檚 speed



Damage: Double type Mob鈥檚 damage at once attack



Knockback: Double type Mob鈥檚 knockback performance at once attack



DefenseFormula: String type Mob鈥檚 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鈥檚 delay of once attack 20 is 1s (Minecraft 20tick = 1s).



DamageDelay: Int type Mob鈥檚 delay of once attack鈥檚 damage take effect 20 is 1s (Minecraft 20tick = 1s).Ex: IF your mob鈥檚 attackdelay is 20 then it will attack once every second.IF it鈥檚 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鈥檚 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鈥檚 range of one time attack . It鈥檚 the radius of a circle.



HateRange: Double type Mob鈥檚 range of hate . It鈥檚 the radius of a circle.



NoHatesHeal: String type When the mob鈥檚 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鈥檚 : 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 鈥榮 result must come from a player,that because that like the give command or kill command must use player鈥檚 name!If is normal entity not a player,the command wont be run.

Ex:

DeathCommand:

- 100: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).



- 50: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.



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



Skin: String type Can set the mob 鈥榮 skin.

Skins folder:


1606722463545.png


One skin one folder:

1606722469408.png


Skin folder has one skin image and one model file:

1606722477841.png



Item: String type Can set the mob鈥檚 item in hand Ex: 鈥267:0鈥 is and iron sword.



HitRange: Double type Can set mob鈥檚 hitrange.Hitrange is the npc鈥檚 damage effect area(a circle)鈥檚 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鈥檚 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鈥檚 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鈥檚 camp must be A and the Spawn Point must be A

- Mob Should be Mob

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


1606722509538.png



PointName: String type.Point name,can for mob鈥檚 target choose.



SpawnList: List<String> type.Set mob spawn

Mobfile鈥檚 name:Respawn Tick:Spawn amount at once:Max amount of this line鈥檚 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鈥檚 circle ,the centre of circle is spawnpoint.



Spawnlimit鈥檚 function:

- atDay

- atNight

- playersNearby~distance(Double Type)

- noOneNearby~distance(Double Type)



Here鈥檚 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锛歱rojectileID:startPosX:startPosY:startPosZ:motionX:motionY:motionZ锛歱rojectileDamage锛歱rojectileKnockBack锛歱rojectileSpeed:MaxDistance锛歱rojectileSize 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锛歺锛歽锛歾锛歽aw锛歱itch锛歭evelname To reset mob's spawn position
The skills are very pool,if you have an idea or the algorithm 锛寉ou can tell me 锛宭eave a message or join my discord.
Type-Figure-Distance-AmountLimit-List of valid entity types锛圕an'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锛欶ire锛
- 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)

My discord server!
https://discord.gg/pac9dRaS




The author:MuffinHead

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


Ask for more RPG plugin锛烰oin the discord and text to me!

Author
MuffinHead
Downloads
250
Views
1,250
First release
Last update
Rating
5.00 star(s) 3 ratings

Latest updates

  1. Fixed bugs

    Fixed bugs
  2. Update the Runcommand skill,config can set npc enable boundingbox

    In old npc config, you can write the BoundingBox: true/false by yourself...
  3. New skill! Better boundingbox

    Fix bounding will let npc teleport to some amazing places. New skill...

Latest reviews

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