Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $nomention
- $textSplit[$customID; ]
- $var[cmd;$splitText[2]]
- $onlyIf[$checkContains[$customID;fight hunt;fight boss;fight continue]==true;]
- $onlyIf[$checkContains[$customID;$authorID]==true;]
- $var[user;$authorID]
- $var[ability;$getVar[data.ability]]
- $jsonParse[
- {
- "element":$getVar[element;$var[user]],
- "profile":$getVar[profile;$var[user]],
- "fight":$getVar[fight;$authorID],
- "hp":$getVar[hp;$authorID],
- "ability":$var[ability],
- "game":$getVar[profile],
- "floor":$getVar[floor;$authorID],
- "stats":$getVar[stats;$authorID],
- "floordata":$getVar[data.floor],
- "inv":$getVar[inventory;$authorID]
- }
- ]
- $textSplit[$customID; ]
- $if[$json[fight;story]==true]
- $onlyIf[$splitText[>]==$json[fight;id];]
- $endif
- $if[$json[profile;version]==$json[game;version]]
- $if[$sum[$splitText[4];15]>=$getTimestamp]
- $try
- $if[$json[profile;element;name]!=none]
- $if[$json[ability;$json[profile;element;name]]!=]
- $var[element;$json[profile;element;name]]
- $else
- $var[element;none]
- $endif
- $if[$var[cmd]!=continue]
- $if[$checkContains[$customID;boss]==true]
- $jsonSet[fight;boss;cd;30]
- $else
- $jsonSet[fight;cd;10]
- $endif
- $endif
- $var[floor;$json[floordata;$sub[$json[floor;current];1]]]
- $setVar[fight;$json[fight];$authorID]
- $replyIn[1]
- $jsonParse[
- {
- "element":$getVar[element;$var[user]],
- "profile":$getVar[profile;$var[user]],
- "fight":$getVar[fight;$authorID],
- "hp":$getVar[hp;$authorID],
- "skill1":$json[ability;$var[element];1],
- "skill2":$json[ability;$var[element];2],
- "skill3":$json[ability;$var[element];3],
- "devskill1":$json[ability;dev;1],
- "link":$getVar[data.mobs],
- "floor":$var[floor],
- "level":$getVar[level;$authorID],
- "stats":$getVar[stats;$authorID],
- "ability":$json[ability],
- "assets":$getVar[assets],
- "mp":$getVar[mp;$authorID],
- "equipment":$getVar[equipment;$authorID],
- "inv":$getVar[inventory;$authorID]
- }
- ]
- $if[$var[cmd]==continue]
- $removeComponent[fight $authorID]
- $endif
- $removeButtons
- $enableDecimals[yes]
- $var[chance;$round[$random[0;1];3]]
- $enableDecimals[no]
- $if[$var[cmd]!=continue]
- $jsonSetString[fight;last;$getTimestamp]
- $endif
- $if[$var[chance]<-100]
- $var[enemy;$json[floor;mobs;$random[0;$jsonArrayCount[floor;mobs]]]]
- $else
- $var[enemy;$json[profile;fight;name]]
- $var[avatar;$json[link;stats;$var[enemy];avatar]]
- $endif
- $if[$json[link;stats;$var[enemy]]!=]
- $var[hp;$json[link;stats;$var[enemy];hp]]
- $var[def;$json[link;stats;$var[enemy];def]]
- $var[eva;$json[link;stats;$var[enemy];eva]]
- $else
- $var[hp;$json[link;stats;other;hp]]
- $var[def;$json[link;stats;other;def]]
- $var[eva;$json[link;stats;other;eva]]
- $endif
- $if[$var[avatar]==]
- $var[avatar;https://cdn.discordapp.com/attachments/1101860440465752065/1122147783001002134/A3818875-1BEA-4510-9FAF-B449B9DD6485.png]
- $endif
- $if[$var[enemy]==]
- $var[enemy;error]
- $endif
- $if[$checkContains[$customID;boss]==true]
- $var[lv;$multi[$json[floor;lv;max];2]]
- $else
- $if[$json[link;stats;$var[enemy];lv]!=]
- $var[lv;$json[link;stats;$var[enemy];lv]]
- $else
- $var[lv;$json[fight;lv]]
- $endif
- $endif
- $if[$var[cmd]!=continue]
- $jsonSet[stats;fight;eva;$json[stats;eva]]
- $jsonSet[stats;fight;crit;$json[stats;crit]]
- $jsonSet[stats;fight;spd;$json[stats;spd]]
- $jsonSet[stats;fight;acc;$json[stats;acc]]
- $if[$json[equipment;armor;def]!=]
- $jsonSet[stats;fight;def;$sum[$json[hp;def];$json[equipment;armor;def]]]
- $else
- $jsonSet[stats;fight;def;$json[hp;def]]
- $endif
- $jsonSet[fight;lv;$var[lv]]
- $jsonSet[fight;def;$var[def]]
- $jsonSet[fight;eva;$var[eva]]
- $jsonSetString[fight;hp;$multi[$var[hp];$var[lv]]]
- $jsonSetString[fight;maxHP;$multi[$var[hp];$var[lv]]]
- $jsonSet[fight;name;$var[enemy]]
- $setVar[fightAvatar;$var[avatar];$authorID]
- $jsonSet[fight;gold;$multi[$json[floor;gold];2]]
- $jsonSet[fight;xp;$multi[$json[floor;xp];2]]
- $jsonSet[fight;stats;spd;100]
- $jsonSet[fight;stats;acc;100]
- $jsonSetString[fight;stats;-dmg;1.000]
- $jsonSetString[fight;stats;-def;1.000]
- $endif
- $if[$json[link;dialogue;$json[fight;name];box]==]
- $var[dialogue;…]
- $else
- $var[dialogue;$json[link;dialogue;$json[fight;name];box;$optOff[$random[0;$jsonArrayCount[link;dialogue;$json[fight;name];box]]]]]
- $endif
- $var[hpBarE;$replaceText[$repeatMessage[6;<:barempty:1227182702927810560>];<:barempty:1227182702927810560>;<:barfull:1227194621319184405>;$divide[$divide[$multi[$json[fight;hp];12];$json[fight;maxHP]];2]]]
- $var[hpBar;$replaceText[$repeatMessage[6;<:barempty:1227182702927810560>];<:barempty:1227182702927810560>;<:barfull:1227194621319184405>;$divide[$divide[$multi[$json[hp;min];12];$json[hp;max]];2]]]
- $enableDecimals[true]
- $var[hp%;$multi[$divide[$json[hp;min];$json[hp;max]];100]]
- $var[ehp%;$multi[$divide[$json[fight;hp];$json[fight;maxHP]];100]]
- $enableDecimals[false]
- $if[$json[skill1;lv]<=$json[element;level]]
- $if[$var[hp%]<=0]
- $var[color;#c20202]
- $elseif[$var[hp%]<=25]
- $var[color;#c20202]
- $elseif[$var[hp%]<=50]
- $var[color;#c28502]
- $elseif[$var[hp%]<=75]
- $var[color;#b2c202]
- $elseif[$var[hp%]<=100]
- $var[color;#AAFF00]
- $endif
- $if[$var[ehp%]<=0]
- $var[ecolor;#c20202]
- $elseif[$var[ehp%]<=25]
- $var[ecolor;#c20202]
- $elseif[$var[ehp%]<=50]
- $var[ecolor;#c28502]
- $elseif[$var[ehp%]<=75]
- $var[ecolor;#b2c202]
- $elseif[$var[ehp%]<=100]
- $var[ecolor;#AAFF00]
- $endif
- $textSplit[$json[fight;name]; ]
- $textSplit[$splitText[1];:]
- $if[$splitText[1]==id]
- $textSplit[$json[fight;name]; ]
- $removeSplitTextElement[1]
- $var[mob.name;$joinSplitText[ ]]
- $endif
- $var[msg;$messageID]
- $description[### $toTitleCase[$var[mob.name]] LV$json[fight;lv]
- $json[assets;heart] $var[hpBarE] `$json[fight;hp]/$json[fight;hp]`
- $json[assets;shield1] $json[fight;def]
- $if[$json[link;dialogue;$json[fight;name]]!=]```$var[dialogue]```$endif]$footer[…]
- $color[$var[ecolor]]
- $thumbnail[$getVar[fightAvatar;$authorID]]
- $description[### $username LV$json[level;lv]
- $json[assets;heart] $var[hpBar] `$json[hp;min]/$json[hp;max]`
- $json[assets;shield1] $json[stats;fight;def];2]
- $color[$var[color];2]
- $footer[Choose a skill from the menu;2]
- $thumbnail[$authorAvatar;2]
- $jsonSetString[fight;id;$var[msg]]
- $jsonSetString[fight;chnl;$channelID]
- $jsonSetString[fight;srvr;$guildID]
- $newSelectMenu[fight $authorID;1;1;SKILLS | MP: $json[mp;min]/$json[mp;max];]
- $addSelectMenuOption[fight $authorID;$toTitleCase[$json[skill1;name]];{"skill.type":"skill","skill.id":1};$json[skill1;-mp]MP;;$c[emoji];]
- $if[$json[skill2;lv]<=$json[element;level]]
- $addSelectMenuOption[fight $authorID;$toTitleCase[$json[skill2;name]];{"skill.type":"skill","skill.id":2};$json[skill2;-mp]MP;;$c[emoji];]
- $endif
- $if[$json[skill3;lv]<=$json[element;level]]
- $addSelectMenuOption[fight $authorID;$toTitleCase[$json[skill3;name]];{"skill.type":"skill","skill.id":3};$json[skill3;-mp]MP;;$c[emoji];]
- $endif
- $if[$checkContains[$getVar[devs];$authorID]==true]
- $addSelectMenuOption[fight $authorID;DEV: $toTitleCase[$json[ability;dev;1;name]];{"skill.type":"dev","skill.id":1};$json[ability;dev;1;-mp]MP;;$c[emoji];]
- $endif
- $if[$checkContains[$getVar[devs];$authorID]==true]
- $addSelectMenuOption[fight $authorID;DEV: $toTitleCase[$json[ability;dev;2;name]];{"skill.type":"dev","skill.id":2};$json[ability;dev;2;-mp]MP;;$c[emoji];]
- $endif
- $if[$json[equipment;melee;name]!=]
- $addButton[no;fight melee $authorID;Attack;primary]
- $else
- $addButton[no;interface no.melee $authorID;Attack;primary]
- $endif
- $addButton[no;fight brace $authorID;Brace;secondary;;$json[assets;shield1];]
- $addButton[no;interface fight.end $authorID;Run;danger;;$json[assets;flee];$var[a]]
- $if[$json[inv;potions]!=]
- $addButton[yes;fight items $authorID;Items;secondary;no]
- $else
- $addButton[yes;fight items $authorID;Items;secondary;yes]
- $endif
- $if[$json[fight;name]==dummy]
- $addButton[no;dummy-exit $authorID;Exit;danger;;;]
- $endif
- $setVar[stats;$json[stats];$authorID]
- $setVar[fight;$json[fight];$authorID]
- $else
- $description[You don’t have any skills yet, how can you fight?]
- $endif
- $else
- $ephemeral
- $removeButtons
- $description[You haven't rolled yet.]
- $footer[tip: vroll to roll an element]
- $endif
- $catch
- $eval[$getVar[errorMsg]]
- $endtry
- $else
- $ephemeral
- $removeButtons
- The enemy had already left <t:$sum[$splitText[4];15]:R> because of boredom.
- $endif
- $else
- $ephemeral
- Your data is outdated. Please use the </update:$slashID[update]> command to update.
- $endif
Advertisement
Add Comment
Please, Sign In to add comment