Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /clonalmeja:
- trigger:
- set {_nick22} to player
- set {_duracion22} to 30
- set {_cantidad22} to 4
- set {_cantidad11} to 1
- loop {_cantidad22} times:
- clonalmeja({_nick22}, {_duracion22}, {_cantidad11})
- add 1 to {_cantidad11}
- if {_cantidad11} = 5:
- set {_cantidad11} to 1
- clear {locposs.%player%1}
- clear {locposs.%player%2}
- clear {locposs.%player%3}
- clear {locposs.%player%4}
- function clonalmeja(nombreclon: player, duracion: number, cantidad: number):
- set {_npcsombra} to a npc with name "%{_nombreclon}% " and entity type "PLAYER"
- if {_cantidad} = 1:
- if {locposs.%{_nombreclon}%1} is not set:
- set {locposs.%{_nombreclon}%1} to 1
- set {_loc} to the location 1 meter upwards and {locposs.%{_nombreclon}%1} meter forwards {_nombreclon}
- add 1 to {locposs.%{_nombreclon}%1}
- spawn npc {_npcsombra} at {_loc}
- if {_cantidad} = 2:
- if {locposs.%{_nombreclon}%2} is not set:
- set {locposs.%{_nombreclon}%2} to 1
- set {_loc} to the location 1 meter upwards and {locposs.%{_nombreclon}%2} meter behind {_nombreclon}
- add 1 to {locposs.%{_nombreclon}%2}
- spawn npc {_npcsombra} at {_loc}
- if {_cantidad} = 3:
- if {locposs.%{_nombreclon}%3} is not set:
- set {locposs.%{_nombreclon}%3} to 1
- set {_loc} to the location 1 meter upwards and {locposs.%{_nombreclon}%3} meter left {_nombreclon}
- add 1 to {locposs.%{_nombreclon}%3}
- spawn npc {_npcsombra} at {_loc}
- if {_cantidad} = 4:
- if {locposs.%{_nombreclon}%4} is not set:
- set {locposs.%{_nombreclon}%4} to 1
- set {_loc} to the location 1 meter upwards and {locposs.%{_nombreclon}%4} meter right {_nombreclon}
- add 1 to {locposs.%{_nombreclon}%4}
- spawn npc {_npcsombra} at {_loc}
- set {_npcid} to id of npc {_npcsombra}
- add {_npcid} to {clonalmeja.%{_nombreclon}%::*}
- add {_npcsombra} to {clonalmejaatk.%{_nombreclon}%::*}
- add {_npcid} to {clonknock::*}
- add {_npcsombra} to {clondmg::*}
- set {_nick} to "%{_nombreclon}%"
- set {_nick2} to lowercase({_nick})
- change citizen {_npcid} skin to "diamond4life"
- set the protected state of npc {_npcsombra} to true
- set {clonalmejaid.%{_npcid}%} to {_npcsombra}
- set {alive.%{_npcid}%} to true
- make console execute command "/npc sel %{_npcid}%"
- make console execute command "/npc speed 4"
- cercano2(citizen {_npcid}, 10, {_npcid}, {_nombreclon})
- wait 5 minutes
- make console execute command "/npc remove %{_npcid}%"
- remove {_npcid} from {clonalmeja.%{_nombreclon}%::*}
- clear {clonalmejaatk.%{_nombreclon}%::*}
- remove {_npcid} from {clonknock::*}
- set {alive.%{_npcid}%} to false
- clear {alive.%{_npcid}%}
- function cercano2(obj: object, rad: number, npcsid: object, nick: player):
- while {alive.%{_npcsid}%} is true:
- if {cmcla.%{_nick}%} = "seguir":
- make npc {clonalmejaid.%{_npcsid}%} to attack {_nick} with aggressive state false
- if {cmcla.%{_nick}%} = "atk":
- make npc {clonalmejaid.%{_npcsid}%} to attack {targetcla.%{_nick}%} with aggressive state true
- if {cmcla.%{_nick}%} = "quiet":
- make npc {clonalmejaid.%{_npcsid}%} to attack {_rad} with aggressive state true
- wait 10 ticks
- on death:
- if attacker is a citizen:
- set {_nickatk} to "%attacker%"
- set {_nickdmg} to nickfix({_nickatk})
- if {targetcla.%{_nickdmg}%} = victim:
- set {cmcla.%{_nickdmg}%} to "seguir"
- if victim is a citizen:
- set {_npcid} to citizen id of victim
- set {_nickk} to "%victim%"
- set {_nickk2} to "%attacker%"
- set {_nicktarget} to nickfix({_nickk})
- loop {clonalmeja.%{_nicktarget}%::*}:
- if loop-value is {_npcid}:
- if {_nicktarget} = {_nickk2}:
- cancel event
- else:
- make console execute command "/npc remove %{_npcid}%"
- remove {_npcid} from {clonalmeja.%victim%::*}
- remove {_npcid} from {clonknock::*}
- stop loop
- on left click:
- if name of player's tool is "&b&LClones Slime":
- if player is sneaking:
- set {cmcla.%player%} to "quiet"
- clear {targetcla.%player%}
- else:
- set {targetcla.%player%} to target entity of player
- set {cmcla.%player%} to "atk"
- on Right click:
- if name of player's tool is "&b&LClones Slime":
- set {cmcla.%player%} to "seguir"
- clear {targetcla.%player%}
- command /libroslime:
- trigger:
- give player an enchanted book with name "&b&LClones Slime"
- on damage:
- if attacker is a citizen:
- set {_npcid} to citizen id of attacker
- set {_nickatk} to "%attacker%"
- set {_nickdmg} to nickfix({_nickatk})
- loop {clonalmeja.%{_nickdmg}%::*}:
- if loop-value is {_npcid}:
- set damage to 4
Add Comment
Please, Sign In to add comment