command /automsg [] []: trigger: player has permission "automsg.cmd": arg 1 is not set: send "&7[&eAuto Message&7] &c /automsg newmsg - To add new one" send "&7[&eAuto Message&7] &c /automsg delmsg - Delete a message" send "&7[&eAuto Message&7] &c /automsg listmsg - List all messages" send "&7[&eAuto Message&7] &c /automsg setdelay - Set delay" arg 1 is "newmsg": arg 2 is set: send "&7[&eAuto Message&7] &cMessage (%arg 2%) Added to list successfuly!" loop {automsg.messages::*}: add 1 to {_numexist} add 1 to {_numexist} set {automsg.messages::%{_numexist}%} to "%arg 2%" else: send "&7[&eAuto Message&7] &cEnter the message!" arg 1 is "listmsg": send "&7All Messages:" loop {automsg.messages::*}: send "&e> &7[&c%loop-index%&7]&r %colored loop-value%" arg 1 is "delmsg": arg 2 is set: send "&7[&eAuto Message&7] &cMessage %arg 2% deleted!" delete {automsg.messages::%arg 2%} loop {automsg.messages::*}: add 1 to {_num} if {automsg.messages::%{_num}%} is set: set {_numm} to {_num} + 1 if {automsg.messages::%{_numm}%} is not set: set {_nummm} to {_numm} + 1 if {automsg.messages::%{_nummm}%} is set: set {automsg.messages::%{_numm}%} to {automsg.messages::%{_nummm}%} delete {automsg.messages::%{_nummm}%} else: set {_numm} to {_num} + 1 if {automsg.messages::%{_numm}%} is set: set {automsg.messages::%{_num}%} to {automsg.messages::%{_numm}%} delete {automsg.messages::%{_numm}%} else: send "&7[&eAuto Message&7] &cSpecify message number!" arg 1 is "setdelay": arg 2 is set: send "&7[&eAuto Message&7] &cDelay set to &7%arg 2% &cminutes!" set {automsg.delay} to arg 2 else: send "&7[&eAuto Message&7] &cEnter delay! (number)" every 60 seconds: add 1 to {automsg.time} {automsg.time} is bigger than or equal to {automsg.delay} parsed as number: if {automsg.messages::1} is set: loop {automsg.messages::*}: add 1 to {_numr} set {automsg.max} to {_numr} add 1 to {automsg.curr} if {automsg.curr} is bigger than {automsg.max}: set {automsg.curr} to 1 set {_final} to colored "%{automsg.messages::%{automsg.curr}%}%" broadcast {_final} set {automsg.time} to 0