The Offending Macro
Code: Select all
[h:fail=input("Category|Base Skills, Craft, Knowledge, Perform, Profession|What type of skill?|Radio")]
[h:swe=0]
[h:SK=0]
[h:CRA=0]
[h:TY=2]
[h:KNO=0]
[h:PER=0]
[h:PRO=0]
[h:roll=d20]
[g,r,switch(Category),code:
case "0":
{
[h:swe=1]
[h: fail=input(
"SK|Appraise,Autohypnosis,Balance,Bluff,Climb,Concentration,DecipherScript,Diplomacy,DisableDevice,Disguise,EscapeArtist,Forgery,GatherInformation,HandleAnimal,Heal,Hide,Intimidate,Jump,Listen,MoveSilently,OpenLock,Ride,Search,SenseMotive,SleightOfHand,Spellcraft,Spot,Survival,Swim,Tumble,UseMagicDevice,UseRope|Choose which skill to use.|list|value=string",
"Bonus|0|Enter any unaccounted for bonuses related to this skill"
)]
};
case "1":
{
[h:AMOD=IntMod]
[h: fail=input(
"CRA|Alchemy, Armorsmithing, BasketWeaving, Bookbinding, Bowmaking, Blacksmithing, Calligraphy, Carpentry, Cobbling, Gemcutting, Leatherworking, Locksmithing, Painting, Pottery, Sculpting, Shipmaking, Stonemasonry, Trapmaking, Weaponsmithing, Weaving|Choose Skill To Use|list|value=string",
"Bonus|0|Enter any unaccounted for bonuses related to this skill",
"Ty|Item, Gold|Are you making a specific item, or earning some gold?|Radio|orient=h",
"DC|1|What is the DC of this task? Don't alter if earning gold."
)]
[h:SkillValue=getStrProp(Craft,CRA)]
[h:PermBon=getStrProp(CraftPermBon,CRA)]
[h:TempBon=getStrProp(CraftTempBon,CRA)]
[g,r:"You make a(n) Craft("]
[g,r:CRA]
[g,r:") check. Your base roll is:"]
[g,r:roll]
[g,r:" for a total check of:"]
[h:cc=roll+SkillValue+PermBon+TempBon+Bonus+AMOD]<!---This is for use later in the macro, for craft progress--->
[g,t:roll+SkillValue+PermBon+TempBon+Bonus+AMOD]<!---Repeated instead of using variable so numbers could be viewed--->
};
case "2":
{
[h:AMOD=IntMod]
[h: fail=input(
"KNO|Arcana, ArchitectureAndEngineering, Dungeoneering, Geography, History, Local, Nature, NobilityAndRoyalty,Psionics, Religion, ThePlains|Choose which skill to use.|list|value=string",
"Bonus|0|Enter any unaccounted for bonuses related to this skill"
)]
[h:SkillValue=getStrProp(Knowledge,KNO)]
[h:PermBon=getStrProp(KnowledgePermBon,KNO)]
[h:TempBon=getStrProp(KnowledgeTempBon,KNO)]
[h:assert(SkillValue,"YOU MUST BE TRAINED TO USE THIS SKILL")]
[g,r:"You make a Knowledge("]
[g,r:KNO]
[g,r:") check. Your base roll is:"]
[g,r:roll]
[g,r:" for a total check of:"]
[g,t:roll+SkillValue+PermBon+TempBon+Bonus+AMOD]
};
case "3":
{
[h:AMOD=ChaMod]
[h: fail=input(
"PER|Art, Comedy, Dance, Keyboard, Oratory, Percussion, StringInstruments, WindInstruments, Sing|Choose which skill to use.|list|value=string",
"Bonus|0|Enter any unaccounted for bonuses related to this skill"
)]
[h:SkillValue=getStrProp(Perform,PER)]
[h:PermBon=getStrProp(PerformPermBon,PER)]
[h:TempBon=getStrProp(PerformTempBon,PER)]
[g,r:"You make a Perform("]
[g,r:PER]
[g,r:") check. Your base roll is:"]
[g,r:roll]
[g,r:" for a total check of:"]
[g,t:roll+SkillValue+PermBon+TempBon+Bonus+AMOD]
};
case "4":
{
[h:AMOD=WisMod]
[h: fail=input(
"PRO|Apothecary, Boater, Bookkeeper, Brewer, Cook, Driver, Farmer, Fisher, Guide, Herbalist, Herder, Hunter, Innkeeper, Lumberjack, Miller, Miner, Porter, Rancher, Sailor, Scribe, SiegeEngineer, Stablehand, Tanner, Teamster, Woodcutter|Choose which skill to use.|list|value=string",
"Bonus|0|Enter any Racial, Feat or Misc Bonuses related to this skill"
)]
[h:SkillValue=getStrProp(Profession,PRO)]
[h:PermBon=getStrProp(ProfessionPermBon,PRO)]
[h:TempBon=getStrProp(ProfessionTempBon,PRO)]
[h:assert(SkillValue,"YOU MUST BE TRAINED TO USE THIS SKILL")]
[g,r:"You make a Profession("]
[g,r:PRO]
[g,r:") check. Your base roll is:"]
[g,r:roll]
[g,r:" for a total check of:"]
[h:cc=roll+SkillValue+PermBon+TempBon+Bonus+AMOD]
[g,t:roll+SkillValue+PermBon+TempBon+Bonus+AMOD]
[g,r:"You make: "]
[g,r:cc/2]
[g,r:"GP this week."]
}
]
[h,switch(SK),code:
case "0":
{
[h:SK=0]
};
case "Appraise":
{
[h:AMOD=intmod]
};
case "Autohypnosis":
{
[h:swe=2]
[h:AMOD=intmod]
};
case "Balance":
{
[h:AMOD=dexmod]
};
case "Bluff":
{
[h:AMOD=chamod]
};
case "Climb":
{
[h:AMOD=strmod]
};
case "Concentration":
{
[h:AMOD=conmod]
};
case "DecipherScript":
{
[h:swe=2]
[h:AMOD=intmod]
};
case "Diplomacy":
{
[h:AMOD=chamod]
};
case "DisableDevice":
{
[h:swe=2]
[h:AMOD=intmod]
};
case "Disguise":
{
[h:AMOD=chamod]
};
case "EscapeArtist":
{
[h:AMOD=dexmod]
};
case "Forgery":
{
[h:AMOD=intmod]
};
case "GatherInformation":
{
[h:AMOD=chamod]
};
case "HandleAnimal":
{
[h:swe=2]
[h:AMOD=chamod]
};
case "Heal":
{
[h:AMOD=wismod]
};
case "Hide":
{
[h:AMOD=dexmod]
};
case "Intimidate":
{
[h:AMOD=chamod]
};
case "Jump":
{
[h:AMOD=strmod]
};
case "Listen":
{
[h:AMOD=wismod]
};
case "MoveSilently":
{
[h:AMOD=dexmod]
};
case "OpenLock":
{
[h:swe=2]
[h:AMOD=dexmod]
};
case "Ride":
{
[h:AMOD=dexmod]
};
case "Search":
{
[h:AMOD=intmod]
};
case "SenseMotive":
{
[h:AMOD=wismod]
};
case "SleightOfHand":
{
[h:swe=2]
[h:AMOD=dexmod]
};
case "Spellcraft":
{
[h:swe=2]
[h:AMOD=intmod]
};
case "Spot":
{
[h:AMOD=wismod]
};
case "Survival":
{
[h:AMOD=wismod]
};
case "Swim":
{
[h:AMOD=strmod]
};
case "Tumble":
{
[h:swe=2]
[h:AMOD=dexmod]
};
case "UseMagicDevice":
{
[h:swe=2]
[h:AMOD=chamod]
};
case "UseRope":
{
[h:AMOD=dexmod]
}
]
<!---The following is the code for the base skills, down here because it needs info from the first switch and the above as well--->
[g,r,switch(swe),code:
case "0":
{
[h:swe=0]
};
case "1":
{
[h:SkillValue=getStrProp(Skills,SK)]
[h:PermBon=getStrProp(SkillPermBon,SK)]
[h:TempBon=getStrProp(SkillTempBon,SK)]
[g,r:"You make a(n) "]
[g,r:SK]
[g,r:"check. Your base roll is:"]
[g,r:roll]
[g,r:" for a total check of:"]
[g,t:roll+SkillValue+PermBon+TempBon+Bonus+AMOD]
};
case "2":
{
[h:SkillValue=getStrProp(Skills,SK)]
[h:PermBon=getStrProp(SkillPermBon,SK)]
[h:TempBon=getStrProp(SkillTempBon,SK)]
[h:assert(SkillValue,"YOU MUST BE TRAINED TO USE THIS SKILL")]
[g,r:"You make a(n) "]
[g,r:SK]
[g,r:"check. Your base roll is:"]
[g,r:roll]
[g,r:" for a total check of:"]
[g,t:roll+SkillValue+PermBon+TempBon+Bonus+AMOD]
}]
[g,r, switch(Ty), code:
case "0":
{
[g,r, if(CC<DC):"You fail by ";"You make "]
[g,r, if(CC<DC): DC-CC; DC*CC]
[g,r, if(CC<DC): ".";"SP worth of progress this week"]
};
case "1":
{
[g,r: "You make "]
[g,r: CC/2]
[g,r: "GP this week"]
};
case "2":
{
[h:TY=2]
}
]