TinTin++ setup for Aardwolf MUD
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

170 lines
2.2 KiB

#class spellup kill;
#class spellup open;
#ALIAS {^spup{| spup}}
{
#send {spellup learned}
}
{5}
#ACTION {^%d,%2,%d,%d,%d,%6,%d$}
{
#if {%3 == 2 || %3 == 3}
{
#if {"%6" == "-1"}
{
#if {%7 == 1}
{
#if {$slisting}
{
#variable {spellup[learned][%1]} {1}
}
}
}
};
#line gag
}
{5}
#ACTION {^\{/noteedit\}$}
{
#if {$spellup[state][was_casting]}
{
#read $dir/setup.tin;
#variable {spellup[state][was_casting]} {0};
spellup resume
};
#else
{
#read $dir/setup.tin;
#variable {spellup[state][was_casting]} {0}
};
}
{5}
#ACTION {^\{/spellheaders}$}
{
#variable slisting 1;
#line gag
}
{5}
#ACTION {^\{affoff}%d$}
{
#if {$spellup[state][cast]}
{
#if {$spellup[learned][%1]}
{
#if {!$spellup[bad][%1]}
{
#if {"$position" == "Standing"}
{
#send {cast %1}
};
#else
{
#if {!$spellup[bad][%1]}
{
#variable {spellup[pending][%1]} {1}
}
}
}
}
};
#variable spellup[pending][%1][1];
#line gag
}
{5}
#ACTION {^\{affon\}%d,%d$}
{
#unvariable spellup[pending][%1];
#line gag
}
{5}
#ACTION {^\{noteedit\}$}
{
#if {$spellup[state][cast]}
{
#variable {spellup[state][was_casting]} {1};
spup pause
};
#else
{
#variable {spellup[state][was_casting]} {0}
};
write;
#killall tick
}
{5}
#ACTION {^\{sfail\}%d,%d,%d,%4$}
{
#if {$spellup[state][cast]}
{
#if {$spellup[learned][%1]}
{
#if {%2 == 0}
{
#if {%3 == 1}
{
#if {!$spellup[bad][%1]}
{
#if {"$position" == "Standing"}
{
#line gag
#send {cast %1}
}
}
};
#elseif {%3 == 4}
{
#line gag;
#show Not enough mana. Put spell in spellup[pending];
#variable spellup[pending][%1] 1
}
}
}
}
}
{5}
#ACTION {^\{spellheaders spellup learned\}$}
{
#variable slisting 1;
#variable {spellup[learned]} {};
#line gag
}
{5}
#ALIAS {^badspell %1}
{
#if {$spellup[bad][%1]}
{
#variable spellup[bad][%1] 0
};
#else
{
#variable spellup[bad][%1] 1
}
}
{5}
#ALIAS {^spup pause$}
{
#variable {spellup[state][cast]} {0}
}
{5}
#ALIAS {^spup resume$}
{
#variable {spellup[state][cast]} {1};
#foreach {$spellup[pending][]} {spell_pending}
{
#send {cast $spell_pending}
}
}
{5}
#class spellup close;