User:Alejandro: Difference between revisions

From LiberationMUSH Wiki
(Created page with "Tally counter for a spendable that isn't covered by the +burn and +gain system This is unofficial code and is used for personal record keeping only. You can only have one at a...")
 
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
Tally counter for a spendable that isn't covered by the +burn and +gain system
==Tally Counter==
 
Tally counter for a spendable that isn't covered by the +burn and +gain system<br/>
This is unofficial code and is used for personal record keeping only. You can only have one at a time at present, because I haven't the mental capacity to improve it at at the moment.
This is unofficial code and is used for personal record keeping only. You can only have one at a time at present, because I haven't the mental capacity to improve it at at the moment.
'''+item/spend [amount]''' will spend 1 [or amount] of the item's pool<br/>
'''+item/charge [amount]''' will regain 1 [or amount] of the item's pool<br/>
'''+item/pool''' will report the amount remaining in the item's pool 
If you're not using a treasure, change the value of &var.item.type<br/>
If the item's pool is something other than glamour, change the value of &var.pool.name
<pre>
@create item=10
&VAR.CAP item=10
&VAR.CURRENT item=10
&VAR.POOL.NAME item=Glamour
&VAR.ITEM.type item=Treasure
&CMD.SPEND item=$^\+item/spend( \\d*)?$:@assert [gte(setr(remaining,u(var.current)),setr(arg,ifelse(%1, trim(%1),1)))]=@pemit %#=You cannot spend [r(arg)][u(var.pool.name)], you only have [r(remaining)] left in your [u(var.item.type)]'s pool.;&var.current me=setr(newRemaning,sub(r(remaining), r(arg)));@pemit %#=You have spent [r(arg)] [u(var.pool.name)] of your [u(var.item.type)]'s [u(var.pool.name)], you have [r(newRemaining)] left.
@set item/CMD.SPEND = regexp
&CMD.POOL item=$+item/pool:@pemit %#=Your [u(var.item.type)] has [u(var.current)] [u(var.pool.name)] left.
&CMD.CHARGE item=$^\+item/charge( \\d+)?$:@pemit %#=Topped up your [u(var.item.type)]'s [u(var.pool.name)] by [setr(amount,ifelse(gt(add(%1,u(var.current)),u(var.cap)),  [sub(u(var.cap),u(var.current))], [trim(%1)]))];&var.current me=[add(u(var.current), r(amount))]
@set item/CMD.CHARGE = regexp
@set item=!no_command
@desc item=Al's ticker counter.
</pre>
== Tremere Grimoire ==
*'''+grimoire/list''' shows all spells available to you to learn
*'''+grimoire/list <level>''' shows all spells available to you to learn of a given level
*'''+grimoire/explain <partial spell name>''' shows you the rules for all spells that match the partial spell name.
*'''+grimoire/learn <name of spell>''' copies the spell into your grimoire.


<pre>
<pre>
@create treasure=10
@create Grimoire
&VAR.CAP treasure=10
@parent Grimoire=#4706
&VAR.CURRENT treasure=10
@set Grimoire=!no_command
&VAR.POOL.NAME treasure=Glamour
&VAR.ITEM.type treasure=Treasure
&CMD.SPEND treasure=$^\+item/spend( \\d*)?$:@assert [gte(setr(remaining,u(var.current)),setr(arg,ifelse(%1, trim(%1),1)))]=@pemit %#=You cannot spend [r(arg)][u(var.pool.name)], you only have [r(remaining)] left in your [u(var.item.type)]'s pool.;&var.current me=setr(newRemaning,sub(r(remaining), r(arg)));@pemit %#=You have spent [r(arg)] [u(var.pool.name)] of your [u(var.item.type)]'s [u(var.pool.name)], you have [r(newRemaining)] left.
@set treasure/CMD.SPEND = regexp
&CMD.POOL treasure=$+item/pool:@pemit %#=Your [u(var.item.type)] has [u(var.current)] [u(var.pool.name)] left.
&CMD.CHARGE treasure=$^\+item/charge( \\d+)?$:@pemit %#=Topped up your [u(var.item.type)]'s [u(var.pool.name)] by [setr(amount,ifelse(gt(add(%1,u(var.current)),u(var.cap)),  [sub(u(var.cap),u(var.current))], [trim(%1)]))];&var.current me=[add(u(var.current), r(amount))]
@set treasure/CMD.CHARGE = regexp
@set treasure=!no_command
</pre>
</pre>

Latest revision as of 17:31, 22 January 2022

Tally Counter

Tally counter for a spendable that isn't covered by the +burn and +gain system
This is unofficial code and is used for personal record keeping only. You can only have one at a time at present, because I haven't the mental capacity to improve it at at the moment.

+item/spend [amount] will spend 1 [or amount] of the item's pool
+item/charge [amount] will regain 1 [or amount] of the item's pool
+item/pool will report the amount remaining in the item's pool

If you're not using a treasure, change the value of &var.item.type
If the item's pool is something other than glamour, change the value of &var.pool.name

@create item=10
&VAR.CAP item=10
&VAR.CURRENT item=10
&VAR.POOL.NAME item=Glamour
&VAR.ITEM.type item=Treasure
&CMD.SPEND item=$^\+item/spend( \\d*)?$:@assert [gte(setr(remaining,u(var.current)),setr(arg,ifelse(%1, trim(%1),1)))]=@pemit %#=You cannot spend [r(arg)][u(var.pool.name)], you only have [r(remaining)] left in your [u(var.item.type)]'s pool.;&var.current me=setr(newRemaning,sub(r(remaining), r(arg)));@pemit %#=You have spent [r(arg)] [u(var.pool.name)] of your [u(var.item.type)]'s [u(var.pool.name)], you have [r(newRemaining)] left.
@set item/CMD.SPEND = regexp
&CMD.POOL item=$+item/pool:@pemit %#=Your [u(var.item.type)] has [u(var.current)] [u(var.pool.name)] left.
&CMD.CHARGE item=$^\+item/charge( \\d+)?$:@pemit %#=Topped up your [u(var.item.type)]'s [u(var.pool.name)] by [setr(amount,ifelse(gt(add(%1,u(var.current)),u(var.cap)),  [sub(u(var.cap),u(var.current))], [trim(%1)]))];&var.current me=[add(u(var.current), r(amount))]
@set item/CMD.CHARGE = regexp
@set item=!no_command
@desc item=Al's ticker counter.

Tremere Grimoire

  • +grimoire/list shows all spells available to you to learn
  • +grimoire/list <level> shows all spells available to you to learn of a given level
  • +grimoire/explain <partial spell name> shows you the rules for all spells that match the partial spell name.
  • +grimoire/learn <name of spell> copies the spell into your grimoire.
@create Grimoire
@parent Grimoire=#4706
@set Grimoire=!no_command