Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $nomention
- $onlyIf[$and[$checkContains[$customID;$authorID]==true;$checkContains[$customID;fight;dummy-exit]==true]==true;]
- $var[user;$authorID]
- $var[shop;$getVar[data.shop]]
- $var[ability;$getVar[data.ability]]
- $jsonParse[
- {
- "level":$getVar[level;$authorID],
- "element":$getVar[element;$var[user]],
- "profile":$getVar[profile;$var[user]],
- "fight":$getVar[fight;$authorID],
- "hp":$getVar[hp;$authorID],
- "ability":$var[ability],
- "floor":$getVar[floor;$authorID],
- "stats":$getVar[stats;$authorID],
- "guide":$getVar[guide;$authorID],
- "floordata":$getVar[data.floor],
- "mp":$getVar[mp;$authorID],
- "story":$getVar[story;$authorID],
- "inv":$getVar[inventory;$authorID],
- "shop":$var[shop],
- "game":$getVar[profile;$botID]
- }
- ]
- $if[$json[profile;version]==$json[game;version]]
- $onlyIf[$json[fight;name]!=;]
- $try
- $if[$json[ability;$json[profile;element;name]]!=]
- $var[element;$json[profile;element;name]]
- $else
- $var[element;none]
- $endif
- $var[floor;$json[floordata;$sub[$json[floor;current];1]]]
- $if[$or[$customID==fight $authorID;$customID==fight brace $authorID;$customID==fight scene skip $authorID;$customID==fight melee $authorID;$customID==fight item-use $authorID]==true]
- $removeComponent[fight item-use $authorID]
- $textSplit[$customID; ]
- $var[cmd;$splitText[2]]
- $jsonParse[
- {
- "level":$getVar[level;$authorID],
- "element":$getVar[element;$var[user]],
- "profile":$getVar[profile;$var[user]],
- "fight":$getVar[fight;$authorID],
- "skill1":$json[ability;$var[element];1],
- "skill2":$json[ability;$var[element];2],
- "skill3":$json[ability;$var[element];3],
- "devskill1":$json[ability;dev;1],
- "hp":$getVar[hp;$authorID],
- "ability":$json[ability],
- $if[$message!=]"skill":$message,$elseif[$customID==fight melee $authorID]"skill":{"skill.type":"melee"},$endif
- "floor":$var[floor],
- "stats":$getVar[stats;$authorID],
- "guide":$json[guide],
- "story":$json[story],
- "equipment":$getVar[equipment;$authorID],
- "inv":$json[inv],
- "shop":$json[shop]
- }
- ]
- $jsonParse[
- {
- "level":$getVar[level;$authorID],
- "element":$getVar[element;$var[user]],
- "profile":$getVar[profile;$var[user]],
- "fight":$getVar[fight;$authorID],
- "skill1":$json[skill1],
- "skill2":$json[skill2],
- "skill3":$json[skill3],
- "devskill1":$json[devskill1],
- "hp":$getVar[hp;$authorID],
- "ability":$json[ability],
- $if[$json[skill;skill.type]==dev]"skill":$json[ability;dev;$json[skill;skill.id]],$elseif[$json[skill;skill.type]==melee]"skill":{"name":"$json[equipment;melee;name]","type":"dmg","dmg":$json[equipment;melee;dmg],"lv":0,"-mp":0,"acc":99999,"melee":true},$elseif[$json[skill;skill.type]!=]"skill":$json[ability;$var[element];$json[skill;skill.id]],$elseif[$customID==fight item-use $authorID]"skill":{"name":"$json[shop;$json[skill;item.type];$json[skill;item.id];name]","type":"$json[shop;$json[skill;item.type];$json[skill;item.id];type]","int":"$json[shop;$json[skill;item.type];$json[skill;item.id];int]","dmg":0,"lv":0,"-mp":0,"acc":999999},$elseif[$message!=]"skill":$json[skill],$else"skill":{"name":"nothing","type":"dmg","dmg":0,"lv":0,"-mp":0,"acc":100},$endif
- $if[$json[skill;skill.type]==dev]"skillName":"$json[ability;dev;$json[skill;skill.id];name]",$elseif[$json[skill;skill.id]!=]"skillName":"$json[ability;$var[element];$json[skill;skill.id];name]",$elseif[$json[skill;skill.type]==melee]"skillName":"$json[equipment;melee;name]",$elseif[$customID==fight item-use $authorID]"skillName":"$json[shop;$json[skill;item.type];$json[skill;item.id];name]",$elseif[$message!=]"skillName":"$json[skill;name]",$else"skillName":"none",$endif
- "link":$getVar[data.mobs],
- "floor":$var[floor],
- "stats":$getVar[stats;$authorID],
- "avatar":"$getVar[fightAvatar;$authorID]",
- "guide":$json[guide],
- "assets":$getVar[assets],
- "mp":$getVar[mp;$authorID],
- "story":$json[story],
- "equipment":$json[equipment],
- "inv":$json[inv]
- }
- ]
- $var[cd;$json[fight;cd]]
- $enableDecimals[yes]
- $var[hp;$json[hp;min]]
- $enableDecimals[no]
- $if[$json[skill;melee]!=true]
- $var[dmg;$min[$sub[$multi[$random[$divide[$multi[$json[skill;dmg];$json[element;level]];2];$sum[$multi[$json[skill;dmg];$json[element;level]];1]];$json[stats;-dmg]];$random[$divide[$json[fight;def];2];$json[fight;def]]];$json[fight;hp]]]
- $else
- $var[dmg;$min[$random[$divide[$json[skill;dmg];2];$sum[$json[skill;dmg];1]];$json[fight;hp]]]
- $endif
- $if[$var[dmg]<0]
- $var[dmg;0]
- $endif
- $var[chance;$random[0;101]]
- $enableDecimals[yes]
- $var[skillAcc;$round[$multi[$json[skill;acc];$divide[$json[stats;fight;acc];100]];0]]
- $enableDecimals[no]
- $var[acc;$optOff[$random[0;101]]]
- $if[$customID!=fight brace $authorID]
- $if[$json[skill;-mp]==]
- $jsonSet[skill;-mp;0]
- $endif
- $if[$json[mp;min]<$json[skill;-mp]]
- $enableDecimals[yes]
- $var[-hp;$round[$multi[$json[hp;min];$divide[$sub[$json[skill;-mp];$json[mp;min]];100]];0]]
- $enableDecimals[no]
- $var[desc.mp;$username suffered $var[-hp] damage due to lack of MP.]
- $jsonSetString[hp;min;$sub[$json[hp;min];$var[-hp]]]
- $endif
- $if[$var[acc]<=$var[skillAcc]]
- $if[$or[$json[fight;effect;tick]<=0;$json[fight;effect;type]!=stn]==true]
- $var[evaChance;$optOff[$random[1;101]]]
- $else
- $var[evaChance;999999]
- $endif
- $if[$or[$var[evaChance]>=$json[fight;eva];$json[skill;dmg]<=0]==true]
- $if[$and[$json[skill;tick]!=;$json[fight;effect;tick]<=0;$or[$json[profile;effect;type]!=stn;$json[profile;effect;tick]<=0]==true;$var[chance]<55]==true]
- $if[$json[skill;type]!=]
- $optOff[$var[effect;$random[$divide[$multi[$json[skill;dmg];$json[element;level]];2];$sum[$multi[$json[skill;dmg];$json[element;level]];1]]]
- ]
- $var[desc;$nickname used $toTitleCase[$json[skill;name]] and dealt $var[dmg] damage.]
- $if[$json[skill;type]==brn]
- $var[desc;$var[desc]
- $toTitleCase[$json[fight;name]] is burning.]
- $elseif[$json[skill;type]==stn]
- $var[desc;$var[desc]
- $toTitleCase[$json[fight;name]] is stunned.]
- $elseif[$json[skill;type]==frz]
- $var[desc;$var[desc]
- $toTitleCase[$json[fight;name]] is frozen.]
- $elseif[$json[skill;type]==bld]
- $var[desc;$var[desc]
- $toTitleCase[$json[fight;name]] is bleeding.]
- $elseif[$json[skill;type]==psn]
- $var[desc;$var[desc]
- $toTitleCase[$json[fight;name]] is poisoned.]
- $endif
- $endif
- $c[if[var[effect\]!=\]
- jsonSet[fight\;hp\;sub[json[fight\;hp\]\;var[effect\]\]\]
- endif]
- $jsonSet[fight;effect;type;$json[skill;type]]
- $jsonSet[fight;effect;tick;$json[skill;tick]]
- $jsonSet[fight;effect;dmg;$json[skill;dmg]]
- $elseif[$json[skill;type]==skls]
- $if[$json[link;skills;$json[fight;name]]!=]
- $var[skill;$json[link;skills;$json[fight;name]]]
- $else
- $var[skill;$json[link;skills;other]]
- $endif
- $jsonParse[{"skill":$var[skill],"cpy":$json[skill],"fight":$json[fight]}]
- $description[## CHOOSE AN ELEMENT]
- $removeButtons
- $removeComponent[fight $authorID]
- $newSelectMenu[fight $authorID;1;1;$toUppercase[$json[fight;name]]’S SKILLS];$var[a]]
- $addSelectMenuOption[fight $authorID;$toTitleCase[$json[skill;1;name]];$json[skill;1];$c[desc];;$c[emoji];$var[a]]
- $addSelectMenuOption[fight $authorID;$toTitleCase[$json[skill;2;name]];$json[skill;2];$c[desc];;$c[emoji];$var[a]]
- $addSelectMenuOption[fight $authorID;$toTitleCase[$json[skill;3;name]];$json[skill;3];$c[desc];;$c[emoji];$var[a]]
- $elseif[$json[skill;type]==cpy]
- $if[$json[link;skills;$json[fight;name]]!=]
- $var[skill;$json[link;skills;$json[fight;name]]]
- $else
- $var[skill;$json[link;skills;other]]
- $endif
- $jsonParse[{"skill":$var[skill],"cpy":$json[skill],"fight":$json[fight]}]
- $if[$json[cpy;double]==true]
- $jsonSet[skill;1;dmg;$multi[$json[skill;1;dmg];2]]
- $jsonSet[skill;2;dmg;$multi[$json[skill;2;dmg];2]]
- $jsonSet[skill;3;dmg;$multi[$json[skill;3;dmg];2]]
- $endif
- $jsonSet[skill;1;-mp;$json[cpy;-mp]]
- $jsonSet[skill;2;-mp;$json[cpy;-mp]]
- $jsonSet[skill;3;-mp;$json[cpy;-mp]]
- $if[$json[cpy;double]==true]
- $description[## CHOOSE A SKILL TO COPY
- ### DOUBLE DAMAGE]
- $else
- $description[## CHOOSE A SKILL TO COPY]
- $endif
- $removeButtons
- $removeComponent[fight $authorID]
- $newSelectMenu[fight $authorID;1;1;$toUppercase[$json[fight;name]]’S SKILLS];$var[a]]
- $addSelectMenuOption[fight $authorID;$toTitleCase[$json[skill;1;name]];$json[skill;1];$c[desc];;$c[emoji];$var[a]]
- $addSelectMenuOption[fight $authorID;$toTitleCase[$json[skill;2;name]];$json[skill;2];$c[desc];;$c[emoji];$var[a]]
- $addSelectMenuOption[fight $authorID;$toTitleCase[$json[skill;3;name]];$json[skill;3];$c[desc];;$c[emoji];$var[a]]
- $elseif[$json[skill;type]==+hp]
- $if[$customID!=fight item-use $authorID]
- $optOff[
- $var[+hp;$random[$divide[$multi[$json[skill;+hp];$json[element;level]];2];$sum[$multi[$json[skill;+hp];$json[element;level]];1]]]
- ]
- $else
- $optOff[
- $var[+hp;$json[skill;int]]
- ]
- $endif
- $var[desc;$username used $toTitleCase[$json[skill;name]] and restored $var[+hp] of their HP.]
- $elseif[$json[skill;type]==+mp]
- $if[$customID!=fight item-use $authorID]
- $optOff[
- $var[+mp;$random[$divide[$multi[$json[skill;+mp];$json[element;level]];2];$sum[$multi[$json[skill;+mp];$json[element;level]];1]]]
- ]
- $else
- $optOff[
- $var[+mp;$json[skill;int]]
- ]
- $endif
- $var[desc;$username used $toTitleCase[$json[skill;name]] and restored $var[+mp] of their MP.]
- $elseif[$json[skill;type]==buff]
- $if[$json[skill;+def]!=]
- $var[buffs;$var[buffs],defense]
- $jsonSet[stats;fight;def;$sum[$json[stats;fight;def];$json[skill;+def]]]
- $endif
- $if[$json[skill;+eva]!=]
- $var[buffs;$var[buffs],evasiveness]
- $jsonSet[stats;fight;eva;$sum[$json[stats;fight;eva];$json[skill;+eva]]]
- $endif
- $if[$json[skill;+spd]!=]
- $var[buffs;$var[buffs],speed]
- $jsonSet[stats;fight;spd;$sum[$json[stats;fight;spd];$json[skill;+spd]]]
- $endif
- $textSplit[$var[buffs];,]
- $if[$splitText[1]==]
- $removeSplitTextElement[1]
- $endif
- $var[buffs;$joinSplitText[, ]]
- $if[$getTextSplitLength>1]
- $var[buffs;$replaceText[$var[buffs];, $splitText[>]; and $splitText[>]]]
- $endif
- $var[desc;$username used $toTitleCase[$json[skill;name]]
- $username’s $var[buffs] rose.]
- $elseif[$json[skill;type]==drn]
- $optOff[
- $var[+hp;$var[dmg]]
- ]
- $var[desc;$username used $toTitleCase[$json[skill;name]] and drained $var[+hp] HP from $toTitleCase[$json[fight;name]].]
- $elseif[$json[skill;type]==-acc]
- $enableDecimals[true]
- $var[-acc;$multi[$json[fight;stats;acc];$json[skill;-acc]]]
- $enableDecimals[false]
- $var[desc;$username used $toTitleCase[$json[skill;name]]
- $toTitleCase[$json[fight;name]]’s accuracy fell.]
- $jsonSetString[fight;stats;acc;$sub[$json[fight;stats;acc];$var[-acc]]]
- $elseif[$json[skill;type]==-spd]
- $enableDecimals[true]
- $var[-spd;$multi[$json[fight;stats;spd];$json[skill;-spd]]]
- $enableDecimals[false]
- $var[desc;$username used $toTitleCase[$json[skill;name]]
- $toTitleCase[$json[fight;name]]’s speed fell.]
- $jsonSetString[fight;stats;spd;$sub[$json[fight;stats;spd];$var[-spd]]]
- $elseif[$json[skill;type]==-dmg]
- $enableDecimals[true]
- $var[-dmg;$multi[$json[fight;stats;-dmg];$json[skill;-dmg]]]
- $enableDecimals[false]
- $var[desc;$username used $toTitleCase[$json[skill;name]]
- $toTitleCase[$json[fight;name]]’s damage fell.]
- $enableDecimals[true]
- $jsonSetString[fight;stats;-dmg;$sub[$json[stats;-dmg];$var[-dmg]]]
- $enableDecimals[false]
- $elseif[$json[skill;type]==-def]
- $enableDecimals[true]
- $var[-def;$sub[$json[fight;stats;-def];$multi[$json[stats;-def];$json[skill;-def]]]]
- $enableDecimals[false]
- $var[desc;$username used $toTitleCase[$json[skill;name]]
- $toTitleCase[$json[fight;name]]’s defense fell.]
- $jsonSetString[fight;stats;-def;$sub[$json[fight;stats;-def];$var[-def]]]
- $else
- $var[desc;$username used $toTitleCase[$json[skill;name]] and dealt $var[dmg] damage.]
- $endif
- $else
- $var[miss;true]
- $var[dmg;0]
- $var[-hp;0]
- $var[heal;0]
- $var[desc;$username used $toTitleCase[$json[skill;name]] but $toTitleCase[$json[fight;name]] evaded the attack.]
- $endif
- $else
- $var[dmg;0]
- $var[-hp;0]
- $var[heal;0]
- $var[desc;$username used $toTitleCase[$json[skill;name]] but it failed.]
- $if[$json[guide;acc]!=true]
- $var[guide;true]
- $description[Yikes! You failed your attack! T^T
- Failing an attack can vary depending on your skill’s accuracy and your accuracy!
- If your opponent has the skill or spell to reduce your accuracy, it will be a very tough battle...
- What’s scarier than damage are debuffs... @-@
- Be careful!;2]
- $jsonSet[guide;acc;true]
- $endif
- $endif
- $else
- $var[dmg;0]
- $var[heal;0]
- $var[+def;5]
- $var[desc;$username braced themself.]
- $if[$json[guide;brace]!=true]
- $var[guide;true]
- $description[Ah, the classic "I-dunno-what-to-do" move. Brace increases your defense a little bit for a single turn, which is great when you get stunned.
- Brace can increase your MP by 25 when used. Doing something without enough MP can inflect self damage or even stun. @-@;2]
- $jsonSet[guide;brace;true]
- $endif
- $if[$json[mp;min]<=$json[mp;max]]
- $jsonSet[mp;min;$sum[$json[mp;min];25]]
- $if[$json[mp;min]>$json[mp;max]]
- $jsonSet[mp;min;$json[mp;max]]
- $endif
- $endif
- $endif
- $if[$json[profile;effect;tick]>0]
- $optOff[
- $var[-hp;$min[$random[$divide[$json[profile;effect;dmg];2];$sum[$json[profile;effect;dmg];1]];$json[hp;min]]]
- ]
- $if[$json[profile;effect;type]==stn]
- $var[immob;true]
- $var[dmg;0]
- $var[-hp;0]
- $var[+hp;0]
- $var[desc;$username is stunned.]
- $elseif[$json[profile;effect;type]==frz]
- $var[immob;true]
- $var[dmg;0]
- $var[-hp;0]
- $var[+hp;0]
- $var[desc;$username is frozen.]
- $else
- $var[desc;$var[desc]
- ($toUppercase[$json[profile;effect;type]] effect dealt $var[-hp] damage to $username)]
- $endif
- $jsonSetString[hp;min;$sub[$json[hp;min];$var[-hp]]]
- $jsonSet[profile;effect;tick;$sub[$json[profile;effect;tick];1]]
- $endif
- $if[$var[+hp]!=]
- $jsonSet[hp;min;$sum[$json[hp;min];$var[+hp]]]
- $if[$json[hp;min]>$json[hp;max]]
- $jsonSet[hp;min;$json[hp;max]]
- $endif
- $endif
- $if[$var[+mp]!=]
- $jsonSet[mp;min;$sum[$json[mp;min];$var[+mp]]]
- $if[$json[mp;min]>$json[mp;max]]
- $jsonSet[mp;min;$json[mp;max]]
- $endif
- $endif
- $jsonSet[mp;min;$sub[$json[mp;min];$json[skill;-mp]]]
- $if[$json[mp;min]<=0]
- $jsonSet[mp;min;0]
- $endif
- $jsonSet[fight;hp;$sub[$json[fight;hp];$var[dmg]]]
- $if[$var[desc.mp]!=]
- $var[desc;$var[desc]
- $var[desc.mp]]
- $endif
- $if[$json[fight;hp]>0]
- $if[$json[link;dialogue;$json[fight;name];hurt]==]
- $var[dialogue;...]
- $else
- $var[dialogue;$json[link;dialogue;$json[fight;name];hurt;$random[0;$jsonArrayCount[link;dialogue;$json[fight;name];hurt]]]]
- $endif
- $else
- $if[$$json[fight;name]==dummy]
- $removeComponent[$customID]
- $endif
- $if[$json[link;dialogue;$json[fight;name];death]==]
- $var[dialogue;$toTitleCase[$json[fight;name]]: ...]
- $else
- $var[dialogue;$toTitleCase[$json[fight;name]]: $json[link;dialogue;$json[fight;name];death;$random[0;$jsonArrayCount[link;dialogue;$json[fight;name];death]]]]
- $endif
- $endif
- $removeComponent[fight $authorID]
- $removeButtons
- $if[$json[fight;name]!=]
- $if[$and[1==1;true==true]==true]
- $if[$and[true==true;$toTitleCase[$json[fight;name]]!=]==true]
- $if[$json[link;skills;$json[fight;name];$random[1;4]]!=]
- $var[skill;$json[link;skills;$json[fight;name];$random[1;4]]]
- $else
- $var[skill;$json[link;skills;other;$random[1;4]]]
- $endif
- $jsonParse[
- {
- "level":$json[level],
- "element":$json[element],
- "profile":$json[profile],
- "fight":$json[fight],
- "ability":$json[ability],
- "skill1":$json[skill1],
- "skill2":$json[skill2],
- "skill3":$json[skill3],
- "devskill1":$json[devskill1],
- "hp":$json[hp],
- "mp":$json[mp],
- "skill":$var[skill],
- "skillName":"$json[skill;name]",
- "link":$json[link],
- "floor":$var[floor],
- "stats":$json[stats],
- "avatar":"$getVar[fightAvatar;$authorID]",
- "guide":$json[guide],
- "assets":$getVar[assets],
- "story":$json[story],
- "equipment":$json[equipment],
- "inv":$json[inv]
- }
- ]
- $if[$json[fight;hp]>0]
- $optOff[
- $var[edmg;$min[$sub[$multi[$random[$divide[$json[skill;dmg];2];$sum[$json[skill;dmg];1]];$json[fight;stats;-dmg]];$random[$divide[$json[stats;fight;def];2];$json[stats;fight;def]]];$json[hp;min]]]
- ]
- $if[$var[+def]!=]
- $var[edmg;$sub[$var[edmg];$var[+def]]]
- $endif
- $if[$var[edmg]<0]
- $var[edmg;0]
- $endif
- $optOff[$var[chance;$random[0;101]]]
- $enableDecimals[yes]
- $var[skillAcc;$round[$multi[$json[skill;acc];$divide[$json[fight;stats;acc];100]];0]]
- $enableDecimals[no]
- $var[acc;$optOff[$random[0;101]]]
- $if[$var[acc]<=$var[skillAcc]]
- $var[enemyEvaChance;$optOff[$random[1;101]]]
- $if[$or[$var[enemyEvaChance]>=$json[stats;fight;eva];$json[skill;dmg]<=0]==true]
- $if[$and[$json[skill;tick]!=;$json[profile;effect;tick]<=0; $or[$json[fight;effect;type]!=stn;$json[fight;effect;tick]<=0]==true;$var[chance]<50]==true]
- $if[$json[skill;type]!=]
- $optOff[$var[effect;$random[$divide[$json[skill;dmg];2];$sum[$json[skill;dmg];1]]]
- ]
- $var[edesc;$toTitleCase[$json[fight;name]] used $toTitleCase[$json[skill;name]] and dealt $var[edmg] damage.]
- $if[$json[skill;type]==brn]
- $var[edesc;$var[edesc]
- $username is burning.]
- $elseif[$json[skill;type]==stn]
- $var[edesc;$var[edesc]
- $username is stunned.]
- $elseif[$json[skill;type]==bld]
- $var[edesc;$var[edesc]
- $username is bleeding.]
- $elseif[$json[skill;type]==psn]
- $var[edesc;$var[edesc]
- $username is poisoned.]
- $endif
- $else
- $var[edesc;$toTitleCase[$json[fight;name]] used $toTitleCase[$json[skill;name]] and dealt $var[edmg] damage.]
- $endif
- $c[if[var[effect\]!=\]
- jsonSet[hp\;min\;sub[json[hp\;min\]\;var[effect\]\]\]
- endif]
- $jsonSet[profile;effect;type;$json[skill;type]]
- $jsonSet[profile;effect;tick;$json[skill;tick]]
- $jsonSet[profile;effect;dmg;$json[skill;dmg]]
- $elseif[$json[skill;type]==rndm]
- $if[$json[link;skills;$toTitleCase[$json[fight;name]];$random[1;4]]!=]
- $var[skill;$json[link;skills;$toTitleCase[$json[fight;name]];$random[1;4]]]
- $else
- $var[skill;$json[link;skills;other;$random[1;4]]]
- $endif
- $elseif[$json[skill;type]==heal]
- $optOff[
- $var[eheal;$random[$divide[$json[skill;+hp];2];$sum[$json[skill;+hp];1]]]
- ]
- $var[edesc;$toTitleCase[$json[fight;name]] used $toTitleCase[$json[skill;name]] and restored $var[eheal] of their HP.]
- $elseif[$json[skill;type]==-acc]
- $enableDecimals[true]
- $var[-acc;$multi[$json[stats;fight;acc];$json[skill;-acc]]]
- $enableDecimals[false]
- $var[edesc;$toTitleCase[$json[fight;name]] used $toTitleCase[$json[skill;name]]
- $username’s accuracy fell.]
- $enableDecimals[true]
- $jsonSetString[stats;fight;acc;$sub[$json[stats;fight;acc];$var[-acc]]]
- $enableDecimals[false]
- $elseif[$json[skill;type]==-spd]
- $enableDecimals[true]
- $var[-spd;$multi[$json[stats;spd];$json[skill;-spd]]]
- $enableDecimals[false]
- $var[edesc;$toTitleCase[$json[fight;name]] used $toTitleCase[$json[skill;name]]
- $username’s speed fell.]
- $jsonSetString[stats;spd;$sub[$json[stats;spd];$var[-spd]]]
- $elseif[$json[skill;type]==-dmg]
- $enableDecimals[true]
- $var[-dmg;$multi[$json[stats;-dmg];$json[skill;-dmg]]]
- $enableDecimals[false]
- $var[edesc;$toTitleCase[$json[fight;name]] used $toTitleCase[$json[skill;name]]
- $username’s damage fell.]
- $enableDecimals[true]
- $jsonSetString[stats;-dmg;$sub[$json[stats;-dmg];$var[-dmg]]]
- $enableDecimals[false]
- $elseif[$json[skill;type]==-def]
- $enableDecimals[true]
- $var[-def;$sub[$json[fight;stats;-def];$multi[$json[stats;-def];$json[skill;-def]]]]
- $enableDecimals[false]
- $var[edesc;$toTitleCase[$json[fight;name]] used $toTitleCase[$json[skill;name]]
- $username’s defense fell.]
- $jsonSetString[stats;-def;$sub[$json[stats;-def];$var[-def]]]
- $else
- $var[edesc;$toTitleCase[$json[fight;name]] used $toTitleCase[$json[skill;name]] and dealt $var[edmg] damage.]
- $endif
- $else
- $var[emiss;true]
- $var[edmg;0]
- $var[-ehp;0]
- $var[eheal;0]
- $var[edesc;$toTitleCase[$json[fight;name]] used $toTitleCase[$json[skill;name]] but $username evaded the attack.]
- $endif
- $else
- $var[edmg;0]
- $var[-ehp;0]
- $var[eheal;0]
- $var[edesc;$toTitleCase[$json[fight;name]] used $toTitleCase[$json[skill;name]] but it failed.]
- $endif
- $if[$json[fight;effect;tick]>0]
- $optOff[
- $var[-ehp;$min[$random[$divide[$multi[$json[fight;effect;dmg];$json[element;level]];2];$sum[$multi[$json[fight;effect;dmg];$json[element;level]];1]];$json[fight;hp]]]
- ]
- $if[$json[fight;effect;type]==stn]
- $var[enemy.immob;true]
- $var[edmg;0]
- $var[-ehp;0]
- $var[eheal;0]
- $var[edesc;$toTitleCase[$json[fight;name]] is stunned.]
- $elseif[$json[fight;effect;type]==frz]
- $var[enemy.immob;true]
- $var[edmg;0]
- $var[-ehp;0]
- $var[eheal;0]
- $var[edesc;$toTitleCase[$json[fight;name]] is frozen.]
- $else
- $var[edesc;$var[edesc]
- ($toUppercase[$json[fight;effect;type]] effect dealt $var[-ehp] damage to $toTitleCase[$json[fight;name]])]
- $endif
- $jsonSet[fight;hp;$sub[$json[fight;hp];$var[-ehp]]]
- $jsonSet[fight;effect;tick;$sub[$json[fight;effect;tick];1]]
- $endif
- $if[$var[eheal]!=]
- $jsonSet[fight;hp;$sum[$json[fight;hp];$var[eheal]]]
- $if[$json[fight;hp]>$json[fight;maxHP]]
- $jsonSet[fight;hp;$json[fight;maxHP]]
- $endif
- $endif
- $jsonSet[hp;min;$sub[$json[hp;min];$var[edmg]]]
- $if[$json[link;dialogue;$json[fight;name];idle]==]
- $var[dialogue;$toTitleCase[$json[fight;name]]: …]
- $else
- $var[dialogue;$toTitleCase[$json[fight;name]]: $json[link;dialogue;$json[fight;name];idle;$random[0;$jsonArrayCount[link;dialogue;$json[fight;name];idle]]]]
- $endif
- $enableDecimals[yes]
- $var[hp;$json[hp;min]]
- $enableDecimals[no]
- $elseif[$json[link;stats;$json[fight;name];phase 2]!=]
- $var[enemy;$json[link;stats;$json[fight;name];phase 2]]
- $var[edesc;...]
- $if[$json[link;stats;$var[enemy];cutscene]!=]
- $if[$json[fight;page]==]
- $jsonSet[fight;page;0]
- $elseif[$customID==fight scene skip $authorID]
- $jsonSet[fight;page;$sub[$jsonArrayCount[link;stats;$var[enemy];cutscene];1]]
- $endif
- $var[cutscene;true]
- $if[$json[fight;page]>=$sub[$jsonArrayCount[link;stats;$var[enemy];cutscene];1]]
- $var[enemy;$json[link;stats;$json[fight;name];phase 2]]
- $var[avatar;$json[link;stats;$var[enemy];avatar]]
- $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[$json[link;stats;$var[enemy];lv]==]
- $var[lv;$random[$json[floor;lv;min];$json[floor;lv;max]]]
- $else
- $var[lv;$json[link;stats;$var[enemy];lv]]
- $endif
- $jsonSet[fight;name;$var[enemy]]
- $if[$json[link;dialogue;$json[fight;name];box]==]
- $var[dialogue;…]
- $else
- $var[dialogue;$json[link;dialogue;$json[fight;name];box;$random[0;$jsonArrayCount[link;dialogue;$json[fight;name];box]]]]
- $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]]]
- $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
- $endif
- $elseif[$json[fight;story]==true]
- $var[story;true]
- $else
- $var[edesc;$toTitleCase[$json[fight;name]] isn't moving.]
- $endif
- $endif
- $var[hpBarE;$replaceText[$repeatMessage[6;<:barempty:1227182702927810560>];<:barempty:1227182702927810560>;<:barfull:1227194621319184405>;$round[$divide[$divide[$multi[$json[fight;hp];12];$json[fight;maxHP]];2];0]]]
- $var[hpBar;$replaceText[$repeatMessage[6;<:barempty:1227182702927810560>];<:barempty:1227182702927810560>;<:barfull:1227194621319184405>;$round[$divide[$divide[$multi[$json[hp;min];12];$json[hp;max]];2];0]]]
- $enableDecimals[true]
- $var[hp%;$multi[$divide[$json[hp;min];$json[hp;max]];100]]
- $enableDecimals[false]
- $if[$var[hp%]<=0]
- $var[color;#000001]
- $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[edmg]!=]
- $if[$var[-hp]!=]
- $if[$var[-hp]>0]
- $var[edmg;-$sum[$var[edmg];$var[-hp]]]
- $else
- $if[$var[edmg]>0]
- $var[edmg;-$var[edmg]]
- $else
- $var[edmg;]
- $endif
- $endif
- $else
- $if[$var[edmg]>0]
- $var[edmg;-$var[edmg]]
- $else
- $var[edmg;]
- $endif
- $endif
- $elseif[$var[-hp]!=]
- $if[$var[-hp]>0]
- $var[edmg;-$var[-hp]]
- $endif
- $endif
- $if[$var[enemy.immob]!=true]
- $if[$var[emiss]==true]
- $var[edmg;MISS]
- $if[$var[-hp]!=]
- $if[$var[-hp]>0]
- $var[dmg;$var[edmg] (-$var[-hp])]
- $endif
- $endif
- $endif
- $endif
- $if[yes==1]
- $if[$var[dmg]==0]
- $if[$var[dmg]<=0]
- $if[$var[miss]!=true]
- $var[dmg;]
- $else
- $var[dmg;MISS]
- $if[$json[link;stats;$json[fight;name];mod;miss]!=]
- $var[dmg;$toUppercase[$json[link;stats;$json[fight;name];mod;miss;new]]]
- $var[desc;$replaceText[$replaceText[$replaceText[$json[link;stats;$json[fight;name];mod;miss;desc];{fight.name};$toTitleCase[$json[fight;name]]];{skill.name};$toTitleCase[$json[skillName]]];{username};$username]]
- $endif
- $endif
- $else
- $if[$var[-ehp]!=]
- $var[dmg;-$sum[$var[dmg];$var[-ehp]]]
- $else
- $var[dmg;-$var[dmg]]
- $endif
- $endif
- $elseif[$var[-ehp]>0]
- $var[dmg;-$var[-ehp]]
- $else
- $var[dmg;]
- $endif
- $endif
- $if[$var[dmg]!=]
- $if[$var[-ehp]!=]
- $if[$var[-ehp]>0]
- $var[dmg;-$sum[$var[dmg];$var[-ehp]]]
- $else
- $if[$var[dmg]>0]
- $var[dmg;-$var[dmg]]
- $else
- $var[dmg;]
- $endif
- $endif
- $else
- $if[$var[dmg]>0]
- $var[dmg;-$var[dmg]]
- $else
- $var[dmg;]
- $endif
- $endif
- $elseif[$var[-ehp]!=]
- $if[$var[-ehp]>0]
- $var[dmg;-$var[-ehp]]
- $endif
- $endif
- $if[$var[immob]!=true]
- $if[$var[miss]==true]
- $var[dmg;MISS]
- $if[$json[link;stats;$json[fight;name];mod;miss]!=]
- $var[dmg;$toUppercase[$json[link;stats;$json[fight;name];mod;miss;new]]]
- $var[desc;$replaceText[$replaceText[$replaceText[$json[link;stats;$json[fight;name];mod;miss;desc];{fight.name};$toTitleCase[$json[fight;name]]];{skill.name};$toTitleCase[$json[skillName]]];{username};$username]]
- $if[$var[-ehp]!=]
- $if[$var[-ehp]>0]
- $var[dmg;$var[dmg] (-$var[-ehp])]
- $endif
- $endif
- $endif
- $endif
- $endif
- $if[$var[cutscene]==true]
- $jsonParse[
- {
- "level":$json[level],
- "element":$json[element],
- "profile":$json[profile],
- "fight":$json[fight],
- "ability":$json[ability],
- "skill1":$json[skill1],
- "skill2":$json[skill2],
- "skill3":$json[skill3],
- "devskill1":$json[devskill1],
- "hp":$json[hp],
- "mp":$json[mp],
- "skill":$var[skill],
- "skillName":"$json[skill;name]",
- "link":$json[link],
- "floor":$var[floor],
- "stats":$json[stats],
- "avatar":"$getVar[fightAvatar;$authorID]",
- "guide":$json[guide],
- "assets":$getVar[assets],
- "cutscene":$json[link;stats;$var[enemy];cutscene;$json[fight;page]],
- "story":$json[story],
- "inv":$json[inv]
- }
- ]
- $if[$json[cutscene;desc]!=]
- $description[```$json[cutscene;desc]```]
- $endif
- $if[$json[cutscene;img]!=]
- $image[$json[cutscene;img]]
- $endif
- $if[$json[fight;page]>=$sub[$jsonArrayCount[link;stats;$var[enemy];cutscene];1]]
- $if[$json[cutscene;desc]==]
- $var[cutscene.desc;...]
- $else
- $var[cutscene.desc;$json[cutscene;desc]]
- $endif
- $description[## $json[assets;skullred] $toTitleCase[$var[enemy]] $json[assets;skullred]
- ```$var[cutscene.desc]```]
- $jsonSetString[msg;id;$messageID]
- $addButton[no;fight hunt $authorID $sum[$getTimestamp;999999] $messageID;Continue Fight;secondary]
- $jsonSet[profile;fight;name;$var[enemy]]
- $if[$json[fight;name]!=]$jsonUnset[fight;name]$endif
- $jsonUnset[fight;page]
- $else
- $jsonSet[fight;page;$sum[$json[fight;page];1]]
- $addButton[no;fight $authorID;Proceed;secondary]
- $addButton[no;fight scene skip $authorID;SKIP;primary]
- $endif
- $elseif[$var[story]==true]
- $httpGet[https://snippet.host/kbmgce/raw]
- $jsonParse[
- {
- "level":$json[level],
- "element":$json[element],
- "profile":$json[profile],
- "fight":$json[fight],
- "ability":$json[ability],
- "skill1":$json[skill1],
- "skill2":$json[skill2],
- "skill3":$json[skill3],
- "devskill1":$json[devskill1],
- "hp":$json[hp],
- "mp":$json[mp],
- "skill":$var[skill],
- "skillName":"$json[skill;name]",
- "link":$json[link],
- "floor":$var[floor],
- "stats":$json[stats],
- "avatar":"$getVar[fightAvatar;$authorID]",
- "guide":$json[guide],
- "assets":$getVar[assets],
- "story":$json[story],
- "storyLink":$httpResult,
- "inv":$json[inv]
- }
- ]
- $textSplit[$json[story;$json[story;name]];-]
- $var[chap;$splitText[1]]
- $var[page;$splitText[2]]
- $author[$username | $toTitleCase[$json[story;name]]]
- $authorIcon[$authorAvatar]
- $description[## Chapter $sum[$var[chap];1] - $toTitleCase[$json[storyLink;$json[story;name];chapter;$var[chap];name]]
- You beat $toTitleCase[$json[fight;name]]!]
- $thumbnail[$getVar[fightAvatar;$authorID]]
- $jsonSetString[story;id;$messageID]
- $addButton[no;story next $authorID $messageID;Proceed;secondary]
- $if[$json[fight;story]!=]$jsonUnset[fight;story]$endif
- $if[$json[fight;name]!=]$jsonUnset[fight;name]$endif
- $else
- $if[$var[+def]!=]
- $if[$var[+def]>0]
- $var[+def;+$var[+def]]
- $else
- $var[+def;]
- $endif
- $endif
- $author[$username]
- $authorIcon[$authorAvatar]
- $description[### $toTitleCase[$json[fight;name]] LV$json[fight;lv]
- $json[assets;heart] $var[hpBarE] `$json[fight;hp]/$json[fight;maxHP]
- $var[dmg]`
- $json[assets;shield1] $json[fight;def]
- ### $username LV$json[level;lv]
- $json[assets;heart] $var[hpBar] `$json[hp;min]/$json[hp;max]
- $var[edmg]`
- $json[assets;shield1] $json[stats;fight;def] $var[+def]
- ```$var[dialogue]```]
- $footer[$var[desc]
- ---------
- $var[edesc]]
- $thumbnail[$getVar[fightAvatar;$authorID]]
- $color[$var[color]]
- $if[$and[$json[hp;min]>0;$json[fight;hp]>0]==true]
- $newSelectMenu[fight $authorID;1;1;SKILLS | MP: $json[mp;min]/$json[mp;max];$var[a]]
- $addSelectMenuOption[fight $authorID;$toTitleCase[$json[skill1;name]];{"skill.type":"skill","skill.id":1};$json[skill1;-mp]MP;;$c[emoji];$var[a]]
- $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];$var[a]]
- $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];$var[a]]
- $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];$var[a]]
- $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];$var[a]]
- $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];$var[a]]
- $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
- $endif
- $endif
- $endif
- $if[$and[$var[story]!=true;$var[cutscene]!=true]==true]
- $if[$json[fight;hp]<=0]
- $var[exp;$random[$divide[$json[fight;xp];2];$json[fight;xp]]]
- $var[gold;$random[$divide[$json[fight;gold];2];$json[fight;gold]]]
- $async[win]
- $replyIn[1s]
- $sendEmbedMessage[$channelID;$reply;;;You won!
- You earned $var[gold] gold.;$c[color];$username;$authorAvatar;$c[footer];$c[footerIcon];;$c[image];;no]
- $endasync
- $if[$json[fight;story]==true]
- $textSplit[$json[story;$json[story;name]];-]
- $jsonSet[story;$json[story;name];$splitText[1]-$sum[$splitText[2];1]]
- $async[story]
- $replyIn[7s]
- $var[msg;$sendMessage[<@$authorID>
- Story **$toTitleCase[$json[story;name]]** has been updated.;yes]]
- $async[story.button]
- $replyIn[1s]
- $addButton[no;story start $authorID "$json[story;name]";Continue Story;secondary;no;;$var[msg]]
- $endasync
- $setVar[story;$json[story];$authorID]
- $endasync
- $endif
- $if[$json[fight;story]!=]$jsonUnset[fight;story]$endif
- $if[$json[fight;name]!=]$jsonUnset[fight;name]$endif
- $if[$json[profile;kd;kills]==]
- $jsonSet[profile;kd;kills;1]
- $else
- $jsonSet[profile;kd;kills;$sum[$json[profile;kd;kills];1]]
- $endif
- $jsonSet[fight;effect;tick;0]
- $jsonSetString[stats;-def;1.000]
- $jsonSetString[stats;-dmg;1.000]
- $setVar[story;$json[story];$authorID]
- $setVar[fight;$json[fight];$authorID]
- $setVar[profile;$json[profile];$authorID]
- $setVar[stats;$json[stats];$authorID]
- $if[$and[$json[guide;kills]!=true;$json[profile;kd;kills]>=0]==true]
- $var[guide;true]
- $description[Hey! You got your first win! Woohoo! \:D
- It is worth celebrating! Your first win will always be your best win.
- Hey, if you feel confident enough, you can try fighting the floor boss! **vboss**
- You can check the floor information to gain insights about the rewards and possible encounters. **vfloor**
- Have fun! \:3;2]
- $jsonSet[guide;kills;true]
- $endif
- $elseif[$json[hp;min]<=0]
- $async[ded]
- $replyIn[2s]
- $sendEmbedMessage[$channelID;$reply;;;You died!
- You lost $random gold.;$c[color];$username;$authorAvatar;$c[footer];$c[footerIcon];;$c[image];;no]
- $endasync
- $if[$json[fight;story]!=]$jsonUnset[fight;story]$endif
- $if[$json[fight;name]!=]$jsonUnset[fight;name]$endif
- $if[$json[profile;kd;deaths]==]
- $jsonSet[profile;kd;deaths;1]
- $else
- $jsonSet[profile;kd;deaths;$sum[$json[profile;kd;deaths];1]]
- $endif
- $jsonSet[fight;effect;tick;0]
- $jsonSetString[stats;-def;1.000]
- $jsonSetString[stats;-dmg;1.000]
- $setVar[mp;$json[mp];$authorID]
- $setVar[hp;$json[hp];$authorID]
- $setVar[fight;$json[fight];$authorID]
- $setVar[profile;$json[profile];$authorID]
- $setVar[stats;$json[stats];$authorID]
- $if[$and[$json[guide;deaths]!=true;$json[profile;kd;deaths]>=0]==true]
- $var[guide;true]
- $description[Hey! You got your first death! Aw, man. You lost some gold from that!
- You should have a little peep in the shop, you need a revive potion to revive yourself.
- There’s also a bunch of useful things in the shop such as Healing Potions and Weapons. See what you like! </shop:$slashID[shop]>;2]
- $jsonSet[guide;deaths;true]
- $endif
- $endif
- $endif
- $endif
- $elseif[$customID==fight items $authorID]
- $if[$message!=]
- $var[type;$message]
- $description[## Select the item.]
- $removeButtons
- $removeComponent[fight items $authorID]
- $newSelectMenu[fight item-use $authorID;1;1;Item]
- $var[a;0]
- $var[n;1]
- $eval[$repeatMessage[2;$repeatMessage[10;
- %{DOL}%textSplit[%{DOL}%json[inv\;%{DOL}%toLowercase[%{DOL}%var[type\]\]\]\;,\]
- %{DOL}%try
- %{DOL}%if[%{DOL}%splitText[%{DOL}%var[n\]\]!=\]
- %{DOL}%var[item%{DOL}%var[n\]\;%{DOL}%replaceText[%{DOL}%replaceText[%{DOL}%splitText[%{DOL}%var[n\]\]\;[\;\]\;\\]\;\]\]
- %{DOL}%textSplit[%{DOL}%var[item%{DOL}%var[n\]\]\; \]
- %{DOL}%addSelectMenuOption[fight item-use %{DOL}%authorID\;%{DOL}%toTitleCase[%{DOL}%json[shop\;%{DOL}%var[type\]\;%{DOL}%splitText[1\]\;name\]\]\;{"item.type":"%{DOL}%var[type\]","item.id":%{DOL}%splitText[1\]}\;%{DOL}%json[shop\;%{DOL}%var[type\]\;%{DOL}%splitText[1\]\;desc\]\]
- %{DOL}%endif
- %{DOL}%endtry
- %{DOL}%var[a\;%{DOL}%sum[%{DOL}%var[a\]\;1\]\]
- %{DOL}%var[n\;%{DOL}%sum[%{DOL}%var[n\]\;1\]\]
- ]]
- ]
- $addButton[no;fight items $authorID;<<;secondary]
- $else
- $description[## What type of item?]
- $removeButtons
- $removeComponent[fight $authorID]
- $removeComponent[fight item-use $authorID]
- $newSelectMenu[fight items $authorID;1;1;Item Type]
- $addSelectMenuOption[fight items $authorID;Potions;potions;Restore some of user’s status.]
- $addButton[no;fight continue $authorID $sum[$getTimestamp;$getTimestamp];<<;secondary]
- $endif
- $elseif[$customID==dummy-exit $authorID]
- $try$deleteMessage[$channelID;$messageID]$endtry
- $if[$json[fight;name]!=]$jsonUnset[fight;name]$endif
- $if[$json[fight;story]!=]$jsonUnset[fight;story]$endif
- $elseif[$customID==fight end $authorID]
- $try$deleteMessage[$channelID;$messageID]$endtry
- $try$deleteMessage[$json[fight;chnl];$json[fight;id]]$endtry
- $if[$json[fight;name]!=]
- $sendEmbedMessage[$channelID;$reply;;;You lost your fight with $toTitleCase[$json[fight;name]] by forfeit. You took $multi[$optOff[$random];$json[fight;lv]] damage.;$c[color];$username;$authorAvatar;$c[footer];$c[footerIcon];;$c[image];;no]
- $jsonSetString[stats;-def;1.000]
- $jsonSetString[stats;-dmg;1.000]
- $jsonSet[profile;effect;tick;0]
- $if[$json[fight;name]!=]$jsonUnset[fight;name]$endif
- $if[$json[fight;story]!=]$jsonUnset[fight;story]$endif
- $else
- $ephemeral
- $removeButtons
- You’re not fighting anyone.
- $endif
- $endif
- $if[$var[exp]!=]
- $var[int;$var[exp]]
- $jsonSetString[level;exp;$sum[$json[level;exp];$var[int]]]
- $jsonSetString[element;exp;$sum[$json[element;exp];$random[$divide[$var[int];2];$var[int]]]]
- $setVar[gold;$sum[$getVar[gold;$authorID];$var[gold]];$authorID]
- $async[level]
- $replyIn[4s]
- $var[a;0]
- $var[n;1]
- $var[exp.type;level]
- $var[lv.txt;lv]
- $eval[$repeatMessage[5;$repeatMessage[10;
- %{DOL}%if[%{DOL}%json[%{DOL}%var[exp.type\]\;exp\]>=%{DOL}%json[%{DOL}%var[exp.type\]\;maxEXP\]\]
- %{DOL}%var[excess\;%{DOL}%sub[%{DOL}%json[%{DOL}%var[exp.type\]\;exp\]\;%{DOL}%json[%{DOL}%var[exp.type\]\;maxEXP\]\]\]
- %{DOL}%if[%{DOL}%var[excess\]<=0\]
- %{DOL}%var[excess\;0\]
- %{DOL}%endif
- %{DOL}%jsonSetString[%{DOL}%var[exp.type\]\;maxEXP\;%{DOL}%sum[%{DOL}%divide[%{DOL}%multi[55\;%{DOL}%json[%{DOL}%var[exp.type\]\;maxEXP\]\]\;100\]\;%{DOL}%json[%{DOL}%var[exp.type\]\;maxEXP\]\]\]
- %{DOL}%jsonSet[%{DOL}%var[exp.type\]\;%{DOL}%var[lv.txt\]\;%{DOL}%sum[%{DOL}%json[%{DOL}%var[exp.type\]\;%{DOL}%var[lv.txt\]\]\;1\]\]
- %{DOL}%jsonSet[%{DOL}%var[exp.type\]\;exp\;%{DOL}%var[excess\]\]
- %{DOL}%jsonSet[hp\;max\;%{DOL}%sum[100\;%{DOL}%multi[25\;%{DOL}%json[level\;lv\]\]\]\]
- %{DOL}%jsonSet[hp\;min\;%{DOL}%json[hp\;max\]\]
- %{DOL}%var[a\;%{DOL}%sum[%{DOL}%var[a\]\;1\]\]
- %{DOL}%endif
- %{DOL}%var[n\;%{DOL}%sum[%{DOL}%var[n\]\;1\]\]
- ]]
- ]
- $if[$var[a]>0]
- $sendMessage[
- **$username**
- You just leveled up! `$sub[$json[level;lv];$var[a]] > $json[level;lv]`
- + $multi[$var[a];2] Skill Points]
- $jsonSet[stats;sp;$multi[$var[a];2]]
- $jsonSet[hp;max;$sum[100;$multi[25;$json[level;lv]]]]
- $jsonSet[hp;min;$json[hp;max]]
- $endif
- $endif
- $async[element]
- $replyIn[1s]
- $var[a;0]
- $var[n;1]
- $var[exp.type;element]
- $var[lv.txt;level]
- $eval[$repeatMessage[5;$repeatMessage[10;
- %{DOL}%if[%{DOL}%json[%{DOL}%var[exp.type\]\;exp\]>=%{DOL}%json[%{DOL}%var[exp.type\]\;maxEXP\]\]
- %{DOL}%var[excess\;%{DOL}%sub[%{DOL}%json[%{DOL}%var[exp.type\]\;exp\]\;%{DOL}%json[%{DOL}%var[exp.type\]\;maxEXP\]\]\]
- %{DOL}%if[%{DOL}%var[excess\]<=0\]
- %{DOL}%var[excess\;0\]
- %{DOL}%endif
- %{DOL}%jsonSetString[%{DOL}%var[exp.type\]\;maxEXP\;%{DOL}%sum[%{DOL}%divide[%{DOL}%multi[55\;%{DOL}%json[%{DOL}%var[exp.type\]\;maxEXP\]\]\;100\]\;%{DOL}%json[%{DOL}%var[exp.type\]\;maxEXP\]\]\]
- %{DOL}%jsonSet[%{DOL}%var[exp.type\]\;%{DOL}%var[lv.txt\]\;%{DOL}%sum[%{DOL}%json[%{DOL}%var[exp.type\]\;%{DOL}%var[lv.txt\]\]\;1\]\]
- %{DOL}%jsonSet[%{DOL}%var[exp.type\]\;exp\;%{DOL}%var[excess\]\]
- %{DOL}%jsonSet[hp\;max\;%{DOL}%sum[100\;%{DOL}%multi[25\;%{DOL}%json[level\;lv\]\]\]\]
- %{DOL}%jsonSet[hp\;min\;%{DOL}%json[hp\;max\]\]
- %{DOL}%var[a\;%{DOL}%sum[%{DOL}%var[a\]\;1\]\]
- %{DOL}%endif
- %{DOL}%var[n\;%{DOL}%sum[%{DOL}%var[n\]\;1\]\]
- ]]
- ]
- $if[$var[a]>0]
- $sendMessage[
- **$username**
- Your element just leveled up! `$sub[$json[element;level];$var[a]] > $json[element;level]`]
- $endif
- $setVar[stats;$json[stats];$authorID]
- $setVar[level;$json[level];$authorID]
- $setVar[hp;$json[hp];$authorID]
- $setVar[element;$json[element];$authorID]
- $endif
- $endasync
- $endasync
- $if[$and[$json[profile;kd;kills]>=2;$json[guide;stats]!=true]==true]
- $var[guide;true]
- $description[Don’t forget to check your stats **vstats** once in a while! Gotta keep track of our progress, y’know?
- Use **vability** to check your element stats and **vskills** to check your skills.
- You can also use **vskills** to check a specific element’s skills.
- > example: vskill fire
- Goodluck!;2]
- $jsonSet[guide;stats;true]
- $endif
- $endif
- $setVar[story;$json[story];$authorID]
- $setVar[stats;$json[stats];$authorID]
- $setVar[fight;$json[fight];$authorID]
- $setVar[profile;$json[profile];$authorID]
- $setVar[guide;$json[guide];$authorID]
- $setVar[mp;$json[mp];$authorID]
- $setVar[hp;$json[hp];$authorID]
- $setVar[inventory;$json[inv];$authorID]
- $catch
- $eval[$getVar[errorMsg]]
- $endtry
- $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
Advertisement