Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- prefix : &a&lUCB &8| &7
- adminperm : rang.admin
- language : en # en (other languages only in premium version on skUnity)
- onlydisplayanswertoplayer : true
- version : 1.1.0
- on load:
- if {varpref} isn't set:
- set {varpref} to "%a random integer from 10000 to 99999%"
- set {ucb.%{varpref}%.removechat} to "false"
- set {ucb.%{varpref}%.onlytoplayer} to "{@onlydisplayanswertoplayer}"
- set {ucb.%{varpref}%.language} to "{@language}"
- {ucb.%{varpref}%.language} is "en":
- set {ucb.text1} to "The setup already has been completed. Confirm with /setup confirm"
- set {ucb.text2} to "What should the chatbot be called to react on? (Tim, Frank, Lisa, etc.)"
- set {ucb.text3} to "Which permission should a user need in order to use the bot? (none for none)"
- set {ucb.text4} to "The setup has been completed. Please wait until installation is done."
- set {ucb.text5} to "what"
- set {ucb.text6} to "where"
- set {ucb.text7} to "who"
- set {ucb.why} to "why"
- set {ucb.whose} to "whose"
- set {ucb.how} to "how"
- set {ucb.text8} to "The installation is complete."
- set {ucb.text8.5} to "Add questions with /addquest [<interrogative>] obj [<object>]."
- set {ucb.text9} to "Example: /addquest what bedwars"
- set {ucb.text10} to "You'll be asked to answer in chat."
- set {ucb.text11} to "Example: BedWars is a great game mode."
- set {ucb.text12} to "Question added. Answer in chat."
- set {ucb.text13} to "&8[----&bUltimateChatBot &7By HiverHD&8----]"
- set {ucb.text16} to "&8[----&bUltimateChatBot &7By HiverHD&8----]"
- set {noidea} to "&7No idea."
- command /ucb:
- aliases: /ultimatechatbot:ucb, /ultimatechatbot, /ucb:ucb, /chatbot, /ucb:chatbot
- trigger:
- player has permission "{@adminperm}":
- send "{@prefix} %{ucb.text13}%"
- send "{@prefix} /ucb"
- send "{@prefix} /reset"
- send "{@prefix} /import [<ID>]"
- send "{@prefix} /export"
- send "{@prefix} /listquest"
- send "{@prefix} /addquest [<INTERROGATIVE>] obj [<OBJECT>]"
- send "{@prefix} /setup"
- send "{@prefix} %{ucb.text16}%"
- on join:
- wait 60 ticks
- if player has permission "{@adminperm}":
- {ucb.%{varpref}%.ucb.setup} isn't set:
- execute player command "/setup"
- command /setup [<text>]:
- aliases: /ucb:setup
- trigger:
- player has permission "{@adminperm}":
- arg-1 isn't set:
- {ucb.%{varpref}%.ucb.setup} is "done":
- send "{@prefix} %{ucb.text1}%"
- else:
- execute player command "/setup confirm"
- arg-1 is "confirm":
- send "{@prefix} &41. &7%{ucb.text2}%"
- set {ucb.%{varpref}%.askforname} to true
- command /install:
- aliases: /ucb:install
- trigger:
- player has permission "{@adminperm}":
- wait 20 ticks
- set {ucb.%{varpref}%.question.what} to "%{ucb.text5}%"
- set {ucb.%{varpref}%.question.where} to "%{ucb.text6}%"
- set {ucb.%{varpref}%.question.who} to "%{ucb.text7}%"
- send "{@prefix} &43. &7%{ucb.text8}%"
- send "{@prefix} %{ucb.text8.5}%"
- wait 20 ticks
- send "{@prefix} %{ucb.text9}%"
- send "{@prefix} %{ucb.text10}%"
- send "{@prefix} %{ucb.text11}%"
- stop
- on chat:
- player has permission "{@adminperm}":
- {ucb.%{varpref}%.askforname} is true:
- cancel event
- wait 20 ticks
- set {ucb.%{varpref}%.askforname} to false
- set {ucb.%{varpref}%.ucb.chatbot.name} to "%message%"
- send "{@prefix} &42. &7%{ucb.text3}%"
- set {ucb.%{varpref}%.askforperm} to true
- stop
- {ucb.%{varpref}%.askforperm} is true:
- cancel event
- wait 20 ticks
- set {ucb.%{varpref}%.askforperm} to false
- if message is "none":
- set {ucb.%{varpref}%.ucb.chatbot.perm} to "none"
- else:
- set {ucb.%{varpref}%.ucb.chatbot.perm} to message
- set {ucb.%{varpref}%.ucb.setup} to "done"
- execute player command "/install"
- stop
- {ucb.%{varpref}%.askforans} is set:
- {ucb.%{varpref}%.frg.ans.%{ucb.%{varpref}%.askforans.quest}%.%{ucb.%{varpref}%.askforans}%} is true:
- cancel event
- wait 20 ticks
- set {ucb.%{varpref}%.ucb.%{ucb.%{varpref}%.askforans.quest}%.%{ucb.%{varpref}%.askforans}%.ans} to "%message%"
- delete {ucb.%{varpref}%.askforans}
- command /addquest [<text>] obj [<text>]:
- trigger:
- player has permission "{@adminperm}":
- arg-2 contains "%{ucb.%{varpref}%.ucb.chatbot.name}%":
- send "{@prefix} &4&m%{ucb.%{varpref}%.ucb.chatbot.name}%"
- send "{@prefix} &aYOU &7(en) &8/ &aDU &7(de)"
- stop
- loop {ucb.%{varpref}%.frg.%arg-1%::*}:
- {ucb.%{varpref}%.frg.ans.%arg-1%.%loop-value%} is true:
- remove arg-2 from {ucb.%{varpref}%.frg.%arg-1%::*}
- send "{@prefix} &4&m%arg-2%"
- stop
- add arg-2 to {ucb.%{varpref}%.frg.%arg-1%::*}
- set {ucb.%{varpref}%.frg.ans.%arg-1%.%arg-2%} to true
- add "%arg-1%.%arg-2%" to {ucb.%{varpref}%.questlist::*}
- send "{@prefix} %{ucb.text12}%"
- set {ucb.%{varpref}%.askforans} to "%arg-2%"
- set {ucb.%{varpref}%.askforans.quest} to "%arg-1%"
- command /reset [<text>]:
- trigger:
- player has permission "{@adminperm}":
- arg-1 isn't set:
- send "{@prefix} /reset confirm"
- send "{@prefix} Saved. %{varpref}%"
- arg-1 is "confirm":
- send "{@prefix} Exported: %{varpref}%. Use /varpref %{varpref}% to restore."
- set {varpref} to "%random integer from 10000 to 99999%"
- send "{@prefix} New: %{varpref}%."
- execute player command "/setup"
- command /export:
- trigger:
- player has permission "{@adminperm}":
- send "{@prefix} Exported: %{varpref}%. Use /import %{varpref}% to import."
- command /import [<int>]:
- trigger:
- player has permission "{@adminperm}":
- arg-1 is set:
- send "{@prefix} Exported: %{varpref}%. Use /import %{varpref}% to restore last export."
- set {varpref} to "%arg-1%"
- send "{@prefix} New: %{varpref}%."
- command /listquest:
- trigger:
- player has permission "{@adminperm}":
- send "{@prefix} List:"
- loop {ucb.%{varpref}%.questlist::*}:
- send "&e- %loop-value%:"
- send "&e-- %{ucb.%{varpref}%.ucb.%loop-value%.ans}%"
- on chat:
- {ucb.%{varpref}%.ucb.setup} isn't "done":
- stop
- set {ucb.%{varpref}%.message} to message
- set {ucb.%{varpref}%.chatbot.allowed.%player%} to false
- {ucb.%{varpref}%.ucb.chatbot.perm} isn't "none":
- player has permission "%{ucb.%{varpref}%.ucb.chatbot.perm}%":
- set {ucb.%{varpref}%.chatbot.allowed.%player%} to true
- {ucb.%{varpref}%.ucb.chatbot.perm} is "none":
- set {ucb.%{varpref}%.chatbot.allowed.%player%} to true
- {ucb.%{varpref}%.chatbot.allowed.%player%} is true:
- set {ucb.%{varpref}%.loop} to true
- {ucb.%{varpref}%.onlytoplayer} is "true":
- set {ucb.%{varpref}%.loop} to false
- set {ucb.%{varpref}%.good} to false
- {ucb.%{varpref}%.message} contains "%{ucb.%{varpref}%.ucb.chatbot.name}%":
- set {ucb.%{varpref}%.good} to true
- {ucb.%{varpref}%.good} is false:
- stop
- {ucb.%{varpref}%.removechat} is "true":
- cancel event
- wait 5 ticks
- {ucb.%{varpref}%.message} contains "%{ucb.whose}%":
- #how
- loop {ucb.%{varpref}%.frg.%{ucb.whose}%::*}:
- {ucb.%{varpref}%.frg.ans.%{ucb.whose}%.%loop-value%} is true:
- {ucb.%{varpref}%.message} contains "%loop-value%":
- {ucb.%{varpref}%.loop} is true:
- loop all players:
- send "&e%{ucb.%{varpref}%.ucb.chatbot.name}% &8| &7%{ucb.%{varpref}%.ucb.%{ucb.whose}%.%loop-value%.ans}%" to loop-player
- stop
- else:
- send "&e%{ucb.%{varpref}%.ucb.chatbot.name}% &8| &7%{ucb.%{varpref}%.ucb.%{ucb.whose}%.%loop-value%.ans}%"
- stop
- {ucb.%{varpref}%.message} contains "%{ucb.text5}%":
- #what
- loop {ucb.%{varpref}%.frg.%{ucb.text5}%::*}:
- {ucb.%{varpref}%.frg.ans.%{ucb.text5}%.%loop-value%} is true:
- {ucb.%{varpref}%.message} contains "%loop-value%":
- {ucb.%{varpref}%.loop} is true:
- loop all players:
- send "&e%{ucb.%{varpref}%.ucb.chatbot.name}% &8| &7%{ucb.%{varpref}%.ucb.%{ucb.text5}%.%loop-value%.ans}%" to loop-player
- stop
- else:
- send "&e%{ucb.%{varpref}%.ucb.chatbot.name}% &8| &7%{ucb.%{varpref}%.ucb.%{ucb.text5}%.%loop-value%.ans}%"
- stop
- {ucb.%{varpref}%.message} contains "%{ucb.text6}%":
- #where
- loop {ucb.%{varpref}%.frg.%{ucb.text6}%::*}:
- {ucb.%{varpref}%.frg.ans.%{ucb.text6}%.%loop-value%} is true:
- {ucb.%{varpref}%.message} contains "%loop-value%":
- {ucb.%{varpref}%.loop} is true:
- loop all players:
- send "&e%{ucb.%{varpref}%.ucb.chatbot.name}% &8| &7%{ucb.%{varpref}%.ucb.%{ucb.text6}%.%loop-value%.ans}%" to loop-player
- stop
- else:
- send "&e%{ucb.%{varpref}%.ucb.chatbot.name}% &8| &7%{ucb.%{varpref}%.ucb.%{ucb.text6}%.%loop-value%.ans}%"
- stop
- {ucb.%{varpref}%.message} contains "%{ucb.text7}%":
- #who
- loop {ucb.%{varpref}%.frg.%{ucb.text7}%::*}:
- {ucb.%{varpref}%.frg.ans.%{ucb.text7}%.%loop-value%} is true:
- {ucb.%{varpref}%.message} contains "%loop-value%":
- {ucb.%{varpref}%.loop} is true:
- loop all players:
- send "&e%{ucb.%{varpref}%.ucb.chatbot.name}% &8| &7%{ucb.%{varpref}%.ucb.%{ucb.text7}%.%loop-value%.ans}%" to loop-player
- stop
- else:
- send "&e%{ucb.%{varpref}%.ucb.chatbot.name}% &8| &7%{ucb.%{varpref}%.ucb.%{ucb.text7}%.%loop-value%.ans}%"
- stop
- {ucb.%{varpref}%.message} contains "%{ucb.how}%":
- #how
- loop {ucb.%{varpref}%.frg.%{ucb.how}%::*}:
- {ucb.%{varpref}%.frg.ans.%{ucb.how}%.%loop-value%} is true:
- {ucb.%{varpref}%.message} contains "%loop-value%":
- {ucb.%{varpref}%.loop} is true:
- loop all players:
- send "&e%{ucb.%{varpref}%.ucb.chatbot.name}% &8| &7%{ucb.%{varpref}%.ucb.%{ucb.how}%.%loop-value%.ans}%" to loop-player
- stop
- else:
- send "&e%{ucb.%{varpref}%.ucb.chatbot.name}% &8| &7%{ucb.%{varpref}%.ucb.%{ucb.how}%.%loop-value%.ans}%"
- stop
- {ucb.%{varpref}%.message} contains "%{ucb.why}%":
- #how
- loop {ucb.%{varpref}%.frg.%{ucb.why}%::*}:
- {ucb.%{varpref}%.frg.ans.%{ucb.why}%.%loop-value%} is true:
- {ucb.%{varpref}%.message} contains "%loop-value%":
- {ucb.%{varpref}%.loop} is true:
- loop all players:
- send "&e%{ucb.%{varpref}%.ucb.chatbot.name}% &8| &7%{ucb.%{varpref}%.ucb.%{ucb.why}%.%loop-value%.ans}%" to loop-player
- stop
- else:
- send "&e%{ucb.%{varpref}%.ucb.chatbot.name}% &8| &7%{ucb.%{varpref}%.ucb.%{ucb.why}%.%loop-value%.ans}%"
- stop
- send "{@prefix} &7%{noidea}%"
Add Comment
Please, Sign In to add comment