Cmud caravan exp management (script)

From Elanthipedia
Jump to navigation Jump to search
Cmud caravan exp management (script)
Category utility,Trader
Front-end cmud
Author Tirsten


General Information

Management Script to determine which skill to train while inside a caravan

Front end: Cmud

Usage:  change exp list to suit your needs


The Main Management Script

<trigger priority="25720" id="2572">
  <pattern>^checkskillsforcaravantrain$</pattern>
  <value>#gag
#var whichskillifound none
#var whichskillifoundexp 0
skill alchemy</value>
  <trigger>
    <pattern>^%sAlchemy~:%s%d %d~.%d~% *~((%d)~/34~)</pattern>
    <value>#gag
#if (@whichskillifound == "none") {#if (@workorder_alc_finished == 0 && %1 < 15) {
    #var whichskillifound alchemy
    #var whichskillifoundexp %1
    }}
skill outfit</value>
  </trigger>
  <trigger>
    <pattern>^%sOutfitting~:%s%d %d~.%d~% *~((%d)~/34~)</pattern>
    <value>#gag
#if (@whichskillifound == "none") {#if (@workorder_out_finished == 0 && %1 < 15) {
    #var whichskillifound outfit
    #var whichskillifoundexp %1
    }}
skill eng</value>
  </trigger>
  <trigger>
    <pattern>^%sEngineering~:%s%d %d~.%d~% *~((%d)~/34~)</pattern>
    <value>#gag
#if (@whichskillifound == "none") {#if (@workorder_carve_finished == 0 && %1 < 15) {
    #var whichskillifound carving
    #var whichskillifoundexp %1
    }}
skill fa</value>
  </trigger>
  <trigger>
    <pattern>^%sFirst Aid~:%s%d %d~.%d~% *~((%d)~/34~)</pattern>
    <value>#gag
#if (@whichskillifound == "none") {#if (%1 < 20 && @firstaidbreaktime != 1) {
    #var whichskillifound firstaid
    #var whichskillifoundexp %1
    }}
echo endskillcheckfortrain</value>
  </trigger>
  <trigger>
    <pattern>^endskillcheckfortrain$</pattern>
    <value>#gag
#if (@amireadytoendtrainingletmeknow == 0) {
  #switch (@whichskillifound == "none") { #var didtrainingincaravanendearly 1 }
    (@whichskillifound == "alchemy") { echo remedywrapperforcaravan }
    (@whichskillifound == "outfit") { echo outfitwrapperforcaravan }
    (@whichskillifound == "carving") { echo carvingwrapperforcaravan }
    (@whichskillifound == "firstaid") { echo firstaidwrapperforcaravan }
  } {
  echo trainingisdoneexitandmoveon
  }
</value>
  </trigger>
</trigger>


Startup alias to to begin exp portion of caravan training

<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <alias name="starttradingfortheday" copy="yes">
    <value>#var canistealcrossing 1
#var canistealleth 1
#var canistealshard 1
#var canistealriverhaven 1
#var canistealarthedale 1
#var doineedtocleantools 1
#var firstaidcanireadcodex 1
#var firstaidbreaktime 0
#var workorder_alc_finished 1
#var workorder_carve_finished 1
#var workorder_out_finished 1
#var doineedtocheckrossmansfiance 1
#var doineedtocheckshardfiance 1</value>
  </alias>
</cmud>

Setup variables

<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <var name="whichskillifoundexp" copy="yes">0</var>
  <var name="whichskillifound" copy="yes">none</var>
  <var name="trainskill" copy="yes">carving</var>
  <var name="didtrainingincaravanendearly" copy="yes">0</var>
</cmud>


The Carving Wrapper Script

<trigger priority="25440" id="3021">
  <pattern>^carvingwrapperforcaravan$</pattern>
  <value>#gag
#var trainskill carving
echo startcarvingwork</value>
  <trigger>
    <pattern>^endcarvingworkearlyforcaravantrain$</pattern>
    <value>#gag
echo checkskillsforcaravantrain</value>
  </trigger>
</trigger>

The Clean Tools Wrapper Script

<trigger priority="25440" id="2544">
  <pattern>^cleantoolswrapperforcaravan$</pattern>
  <value>#gag
#var trainskill cleantools
echo startcleantools</value>
  <trigger>
    <pattern>^donecleaningtools$</pattern>
    <value>#gag
#var trainskill trading
#var doineedtocleantools 0
#alarm +14400 {#var doineedtocleantools 1}
echo checkskillsforcaravantrain
</value>
  </trigger>
</trigger>

The First Aid Wrapper Script

<trigger priority="25440" id="2576">
  <pattern>^firstaidwrapperforcaravan$</pattern>
  <value>#gag
#var trainskill firstaid
echo startfirstaidtrain</value>
  <trigger>
    <pattern>^donewithskilltrainingfirstaidincaravan$</pattern>
    <value>#gag
#var trainskill trading
echo checkskillsforcaravantrain
</value>
  </trigger>
</trigger>

The Outfitting Wrapper Script

<trigger priority="25440" id="2778">
  <pattern>^outfitwrapperforcaravan$</pattern>
  <value>#gag
#var trainskill outfit
echo startoutfittingwork</value>
  <trigger>
    <pattern>^endoutfitworkearlyforcaravantrain$</pattern>
    <value>#gag
#var trainskill trading
echo checkskillsforcaravantrain
</value>
  </trigger>
</trigger>

The Remedy Wrapper Script

<trigger priority="25440" id="2570">
  <pattern>^remedywrapperforcaravan$</pattern>
  <value>#gag
#var trainskill remedy
echo startalchemywork</value>
  <trigger>
    <pattern>^endalcworkearlyforcaravantrain$</pattern>
    <value>#gag
#var trainskill trading
echo checkskillsforcaravantrain
</value>
  </trigger>
</trigger>