I hate scribing, so I wrote this.

Scripts and support for your favorite MUD client.
Shaiith
Sojourner
Posts: 33
Joined: Tue Feb 15, 2005 2:07 pm

I hate scribing, so I wrote this.

Postby Shaiith » Tue Feb 15, 2005 2:21 pm

I died and had no backup spellbooks, so I wrote this trigger set to scribe some. Modify it as you see fit [you likely will have to]. This works for me in a custom tintin++ codebase [1.83 (Beta) base].

Code Comment: Tintin++ requires that the first element in a list not have {} around it or the code below breaks. Interject actions likely won't work in vanilla tintin either.

I'd be interested in seeing the line by line code [no classes etc, just #trig blah; ... ... ] that it requires in zmud or other clients so that I can work on a client abstraction layer in my triggers.

Obligatory note: Do not use these triggers while AFK. It's botting, and I will not be responsible for any reprehensible things that may result from the use of these triggers. You have been warned.

Code: Select all

#nop meta stuff that I usually have in other files
#ali incr {#math {%%1} {${%%%1} + 1}}

#var {do_interject}   {0}
#var {interject_action} {}

#nop interject <something to do>
#nop sets up a way to interject actions in the middle of my scripts.

#ali interject {#var {do_interject} {1}; #var {interject_action} %0}

#nop turn off global channels, make this a bit smarter or it'll fire false positives
#act {petition} {bot_break_notify} 1

#ali bot_break_notify {#tickon;#ticksize 3; #ali tickUpdate #bell}

#act {^#TICK!!!} {tickUpdate}
#ali {tickUpdate} {#nop}


#nop code to single scribe, no looping
#var scribe_current_index 0
#var scribe_list_len 0
#var scribe_current_spell 0
#var scribe_list nop

#act {^You finish scribing spell ${scribe_current_spell} to} {incr scribe_current_index; scribe_next}

#nop #ali do_scribe <list_name>
#nop it will scribe all the spells in list_name to the current book, you have to get properly setup
#ali do_scribe {#var scribe_list {%%0}; #getlistlen scribe_list_len ${%%0}; #var scribe_current_index 1; scribe_next}

#ali scribe_next {#if {${scribe_current_index} <= ${scribe_list_len}} {#getitemnr scribe_current_spell ${scribe_current_index} {$$${${scribe_list}}};do_scribe_really} {#showme DONE SCRIBING MASTER}}

#ali {do_scribe_really} {#if ${do_interject} {${interject_action};#var {do_interject} {0}}; scribe ${scribe_current_spell}}

#hi white DONE SCRIBING MASTER


#nop code to loop scribe, calls the single scribe code

#var scribe_spellbook_src sack
#var scribe_spellbook_dest holding
#var scribe_spellbook_count 1
#var scribe_spellbook_current_idx 1
#var scribe_list_base


#nop do_scribe_multi <list_base> <number_lists> <src_container> <dest_container>
#nop gets books out of src container and scribes <list_base>_i
#nop and puts it in i.dest_container for later sorting
#nop where i varies over 1 to <number_lists>

#ali do_scribe_multi {#var scribe_spellbook_current_idx 1; #var scribe_list_base {%%1}; #var scribe_spellbook_count {%%2}; #var scribe_spellbook_dest {%%4}; #var scribe_spellbook_src {%%3}; #var scribe_do_many 1; scribe_prep; do_scribe %1_1}

#var scribe_do_many 0

#act {DONE SCRIBING MASTER} {#if {$${scribe_do_many}} {scribe_done; #if {$$${scribe_spellbook_current_idx}=$$${scribe_spellbook_count}} {#var scribe_spellbook_current_idx 1} {incr {scribe_spellbook_current_idx}}; scribe_prep; scribe_multi_do_next} {#nop}} {1}

#ali scribe_multi_do_next {do_scribe ${scribe_list_base}_${scribe_spellbook_current_idx}}

#ali scribe_prep {get spellbook ${scribe_spellbook_src};hold spellbook;sit;rest}
#ali scribe_done {rem spellbook; stand; stretch; put spellbook ${scribe_spellbook_current_idx}.${scribe_spellbook_dest}}


Example

do_scribe_multi scribe_enc_spells_80 3 sack bag

with the following variables defined, a sack full of spellbooks, holding a quill and one empty hand, with 3 bags in my inventory, will scribe my spellbooks

Code: Select all

#var scribe_enc_spells_80_1 {breach {globe of invulnerability} reduce enlarge {power word blind} fly blur {stone skin} {dispel magic} levitate sleep blink {faerie fire} {energy shield} invisibility {mage flame} {detect magic} {detect invisibility}}

#nop Essential Enchanter [80]
#nop 1 detect invisibility,
#nop 1 detect magic,
#nop 1 mage flame
#nop 2 invisibility,
#nop 2 energy shield
#nop 2 faerie fire,
#nop 3 blink,
#nop 4 sleep,
#nop 4 levitate,
#nop 4 dispel magic,
#nop 5 stone skin,
#nop 6 blur,
#nop 7 fly,
#nop 7 power word blind,
#nop 7 enlarge,
#nop 7 reduce,
#nop 8 globe of invulnerability,
#nop 9 breach

#var scribe_enc_spells_80_2 {constriction {blacklight burst} identify {needle swarm} feeblemind clairvoyance {dimension door} teleport {mass invisibility} haste farsee strength {ray of enfeeblement} {locate object} {dispel invisible} dexterity {minor creation} {magic missile}}

#nop Important Enchanter [80]
#nop 1 magic missile,
#nop 2 minor creation,
#nop 3 dexterity
#nop 3 dispel invisible,
#nop 3 locate object,
#nop 3 ray of enfeeblement
#nop 3 strength
#nop 4 farsee,
#nop 4 haste
#nop 4 mass invisibility,
#nop 4 teleport,
#nop 5 dimension door,
#nop 6 clairvoyance,
#nop 6 feeblemind,
#nop 6 needle swarm
#nop 6 identify
#nop 8 blacklight burst
#nop 9 constriction,

#var scribe_enc_spells_80_3 {repulsion {airy water} {major paralysis} {prismatic spray} {enchant weapon} enervate infravision stumble slowness {charm person} fumble {wizard eye} {missile shield} {chromatic orb}}

#nop Auxilliary Enchanter [76]
#nop 3 chromatic orb
#nop 3 missile shield,
#nop 4 wizard eye
#nop 4 fumble
#nop 5 charm person
#nop 5 slowness
#nop 5 stumble
#nop 5 infravision
#nop 6 enervate
#nop 6 enchant weapon
#nop 7 prismatic spray
#nop 7 repulsion
#nop 8 major paralysis
#nop 8 airy water,
Harlindral group-says 'but, im very powerful'

Return to “MUD Client Help”

Who is online

Users browsing this forum: No registered users and 18 guests