al client scripts

For technical issues & scripting. Dump it all here!
Post Reply
Evilina
Posts: 1437
Joined: Wed Jan 25, 2006 8:42 am
Contact:

al client scripts

Post by Evilina »

BMI calculator

#action {Your height is %1 feet, %2 inches, weight %3 pounds,}{#set feet %1;#set inches %2;#set weight %3;#set total_weight = weight * 703;#set total_inches = feet * 12 + inches;#set inches_2 = total_inches * total_inches;#set bmi = total_weight / inches_2}

I could of done this using a simpler math formula but I suck at math so had to break it down to something basic.

use #var bmi to see your current bmi

everytime you stat a non channeler character this will first create a file in c:\ called character_stats.txt and each addiional time you stat it will append (write to) the file with the new stats, bmi, and mvs.

stat data collector

Code: Select all

#action {You have %1(%2) hit and %3(%4) movement points.}{#set moves %4};
#action {Your abilities are: Str: %1, Int: %2, Wis: %3, Dex: %4, Con: %5}{#set str %1;#set int %2;#set wis %3;#set dex %4;#set con %5;#set stats %1 %2 %3 %4 %5;#append stats c:\character_stats.txt;#delay bmi 2 {#append bmi c:\character_stats.txt;#append moves c:\character_stats.txt}};
#action {Your height is %1 feet, %2 inches, weight %3 pounds,}{#set feet %1;#set inches %2;#set weight %3;#set total_weight = weight * 703;#set total_inches = feet * 12 + inches;#set inches_2 = total_inches * total_inches;#set bmi = total_weight / inches_2};
#action {Tip: Your skills have reset!}{stat};




For collecting stat data of a channeler use the following!


Code: Select all

#action {You have %1(%2) hit, %3(%4) mana, and %5(%6) movement points.}{#set moves %6};
#action {Your abilities are: Str: %1, Int: %2, Wis: %3, Dex: %4, Con: %5}{#set str %1;#set int %2;#set wis %3;#set dex %4;#set con %5;#set stats %1 %2 %3 %4 %5;#append stats c:\channeler_stats.txt;#delay bmi 2 {#append bmi c:\channeler_stats.txt;#append moves c:\channeler_stats.txt}};
#action {Your height is %1 feet, %2 inches, weight %3 pounds,}{#set feet %1;#set inches %2;#set weight %3;#set total_weight = weight * 703;#set total_inches = feet * 12 + inches;#set inches_2 = total_inches * total_inches;#set bmi = total_weight / inches_2};
#action {Tip: Your skills have reset!}{stat};



This will save a characters information in the text file using three lines per stat.
The first line is the stats, the second the bmi and the third the moves

--Example--

16 17 17 17 16
19
130

After reaching level 5 the script will automatically hit stat for you and append the text file, every time you check your stats after the intial statting the script will write the same stats to the file. So only check your stats once after statting or be prepared to delete multiple entries from the text file.
Evilina
Posts: 1437
Joined: Wed Jan 25, 2006 8:42 am
Contact:

Re: al client scripts

Post by Evilina »

targeting script

Code: Select all

#alias {t}{#set target %1;#echo %1 is now set as your target!};
#alias {2}{kill $target$};
#alias {3}{charge $target$};
#alias {b}{backstab $target$};
to change target simply type t xxx, xxx being the name of the new target.
Evilina
Posts: 1437
Joined: Wed Jan 25, 2006 8:42 am
Contact:

Re: al client scripts

Post by Evilina »

A simple tick timer that includes almost all sun rising and night beginning echos for all zones.

Code: Select all

#action {Shadows lengthen as the sun dips out of sight}{ResetTick};
#action {The land is illumined as the sun rises on the east horizon.}{ResetTick};
#action {The night has begun.}{ResetTick};
#action {The sun rises}{ResetTick};
#action {The sun slowly disappears}{ResetTick};
#alias {RegularTickAlias}{#echo TICK IN 5 SECONDS;#delay RegularTickTimer TickLength -1 #echo TICK IN 5 SECONDS (+/- drift)};
#alias {ResetTick}{#undelay RegularTickTimer; #undelay FirstTickTimer; #delay FirstTickTimer ShortTick RegularTickAlias};
#alias {Tick}{#set TickLength %1; #set ShortTick = TickLength - 5};
Evilina
Posts: 1437
Joined: Wed Jan 25, 2006 8:42 am
Contact:

Re: al client scripts

Post by Evilina »

If you die or lose eq as often as I do you might get tired of changing your examine bag alias to examine pack so I created this.

Code: Select all

#alias {cont}{#set container %1; #echo Container set to %1};
#alias {li}{examine $container$};
#alias {gap}{get all $container$};
#alias {pap}{put all $container$};
Example

HP:Healthy SP:Full MV:Fresh >
cont pack
Container set to pack

li
This backpack is moderately large, yet not large enough to be considered a good
traveler's backpack. It has two thin black straps on the back like cords to go
over the wearer's shoulders.

When you look inside, you see:
container (used):
Nothing.
Evilina
Posts: 1437
Joined: Wed Jan 25, 2006 8:42 am
Contact:

Re: al client scripts

Post by Evilina »

A simple door script

Code: Select all

#action {The %1 is closed.}{#set door %1};
#action {The %1 is open.}{#set door %1};
#action {The %1 seems to be closed.}{#set door %1};
#alias {o}{open $door$};
#alias {c}{close $door$};
example

HP:Scratched SP:Full MV:Excellent >
s
A Crumbling Gatekeep
[ Exits: n e s w ]
A huge trolloc is here, looking for something to smash.
A huge trolloc is here, looking for something to smash.
A huge trolloc is here, looking for something to smash.
A huge trolloc is here, looking for something to smash.
A trolloc gatekeeper is standing here.

s
HP:Scratched SP:Full MV:Excellent >

Variable 'door' is set to: gate
The gate seems to be closed.

HP:Scratched SP:Full MV:Excellent >
l s
Variable 'door' is set to: gate
The gate is closed.
Otar
Posts: 309
Joined: Wed Sep 02, 2009 12:11 pm

Re: al client scripts

Post by Otar »

This will automate statting, minus moving around. Except for humans, they've also got to carry a bunch or light sources in their inv.

Simply dial in the min stats and bmi you want in the {XXX < XX}

When it doesn't restat on it's own, that means you got the stats you wanted!

Code: Select all

#action {Your abilities are: Str: %1, Int: %2, Wis: %3, Dex: %4, Con: %5}{#set str %1;#set int %2;#set wis %3;#set dex %4;#set con %5;#set stats %1 %2 %3 %4 %5}
#trigger {Your mood is currently}#if (str < 19){restat}; #if (int < 17){restat}; #if (Wis < 10){restat}; #if (dex <20){restat}; #if (con < 16){restat} #if (bmi < 1){restat}
#trigger {Tip: Your skills have reset!}{stat}
#trigger {A small deer is dead!}{k deer}
#trigger {A small deer is here watching over herself.}{k deer}
#trigger {They don't seem to be here.}{#delay deer 15 -1 k deer}
#trigger {You do the best you can!}{#delay can 15 1 k deer}
#alias {Light}{rem light; drop light; hold light}
#trigger {Your light sputters out and dies.}{Light}
#trigger {You rise a level!}{stat}
Last edited by Otar on Mon Feb 07, 2011 4:18 pm, edited 1 time in total.
Otar
Posts: 309
Joined: Wed Sep 02, 2009 12:11 pm

Re: al client scripts

Post by Otar »

Here's a mining bot for all of you who are cool enough for Al Client. Yeah, I know I could make it much much smaller if I spent a bit of time to put some of the repetitive stuff into a simple alias, but this works, and I'm don't want to bother.

If you don't use a club, simply go through and replace "club" with whatever it is you use. If you don't bash, don't bother taking it out, unless you have bash pracced and aren't using a bashing wep.

Everyone needs meat and a flask in their inv. If you have a skin replace "flask" with "skin". Pukes will have to keep lights in their inv and can grab the section dealing with lights from my stating script. With very low minnig and lvl 8 survival the cart will fill up very close to the time your flask/skin runs out.

Code: Select all

#trigger {They already seem stunned!}{bash}
#trigger {Your bash}{bash}
#trigger {As %111 avoids your bash}{bash}
#action {*%1* sends you sprawling with a powerful bash!}{bash}

#action {You try to hit a baby scorpion's}{rem pick;wield club}
#action {You barely tickle a baby scorpion's}{rem pick;wield club}
#action {A baby scorpion is dead! R.I.P.}{rem club;#delay minemine 1 1 wield pick;#delay minemine2 2 1 mine;get all corpse;put all.ore cart; put all.stone cart;put idol cart;put artifact cart;put all.chunk cart}
#action {A massive black beetle is dead! R.I.P.}{rem club;#delay minemine 1 1 wield pick;#delay minemine2 2 1 mine;get all corpse;put all.ore cart; put all.stone cart;put idol cart;put artifact cart;put all.chunk cart}
#action {A crazed miner is dead! R.I.P.}{rem club;#delay minemine 1 1 wield pick;#delay minemine2 2 1 mine;get all corpse;put all.ore cart; put all.stone cart;put idol cart;put artifact cart;put all.chunk cart}
#action {You try to keep swinging your pick, but are too exhausted!}{sleep;#delay sleepmine 225 1 wake;#delay sleepmine2 226 1 stand;#delay sleepmine3 227 1 mine}
#action {You found}{get all; put all.ore cart; put all.stone cart;put idol cart;put artifact cart;put all.chunk cart;mine}
#action {You are hungry.}{eat meat}
#action {You are thirsty.}{drink flask}
#action {You stop mining and back away when you see the wall in front of you is moving!}{#delay minekill 5 1 rem pick;#delay minekill1 6 1 wield club;#delay minebash 9 1 bash}
#action {A %135 is dead!}{rem club;#delay minemine 1 1 wield pick;#delay minemine2 2 1 mine;get all corpse;put all.ore cart; put all.stone cart;put idol cart;put artifact cart;put all.chunk cart}
Evilina
Posts: 1437
Joined: Wed Jan 25, 2006 8:42 am
Contact:

Re: al client scripts

Post by Evilina »

Here's an automated stat script, this is the old base I started with in 05, I have a very nice updated one but I am not gonna share it. :)

Code: Select all

create a variable with the path you wish to walk, such as

#set partial_path n,n,n,n,n,w,w,n,n,n,w,w,n,n,e,e,,n,n,w,s,s,s,s,s,s,

I'll leave it up to you to create the trigger that will toggle the actiongroup on and off for the script to start and stop.

#action {You receive some experience points.}{k deer};
#action {They don't seem to be here.}{#strocpy(partial_path,partial_path,1);
#strncpy(next_room,partial_path,1);#set length = strlen(partial_path)}
#if (length > 1 {$next_room$;k deer}};
#comment TRIGGERS
#action {A small deer is here watching over herself.}{#if (HP:%1 MV:%2 - %3: %4> == 0){k deer};
#action {A small brown deer stands here, searching for food.}{#if (HP:%1 MV:%2 - %3: %4> == 0){k deer};
#action {A scrawny sickly-looking deer limps here.}{#if (HP:%1 MV:%2 - %3: %4> == 0){k deer};
#action {A small deer panics, and attempts to flee!}{#pause 2;#if (HP:%1 MV:%2 - %3: %4> == 0){k deer};
#comment CHASE PART OF THE SCRIPT
#action {A small deer leaves %2.}{#set direction_left %2;
#if (HP:%1 MV:%2 - %3: %4> == 0);
{
#if (direction_left == n){#set temp_rooms s;strcat(temp_rooms,partial_path);
strcpy(partial_path,temp_rooms);#strncpy(next_room,partial_path,1);$next_room$;
#strocpy(partial_path,partial_path,1)};
#if (direction_left == s){#set temp_rooms n;strcat(temp_rooms,partial_path);
strcpy(partial_path,temp_rooms);#strncpy(next_room,partial_path,1);$next_room$;
#strocpy(partial_path,partial_path,1)};
#if (direction_left == w){#set temp_rooms e;strcat(temp_rooms,partial_path);
strcpy(partial_path,temp_rooms);#strncpy(next_room,partial_path,1);$next_room$;
#strocpy(partial_path,partial_path,1)};
#if (direction_left == e){#set temp_rooms w;strcat(temp_rooms,partial_path);
strcpy(partial_path,temp_rooms);#strncpy(next_room,partial_path,1);$next_room$;
#strocpy(partial_path,partial_path,1)}};
Primal
Posts: 183
Joined: Sun Jan 16, 2005 6:20 am

Re: al client scripts

Post by Primal »

Can you use classes in al client?
Evilina
Posts: 1437
Joined: Wed Jan 25, 2006 8:42 am
Contact:

Re: al client scripts

Post by Evilina »

Let's make the new kick not even worth practicing for bashers and channies!

for bashers

Code: Select all

#action {You're hit in solar plexus, wow, this is breathtaking!!}{bash}
this restarts your bash immediately.

for channies

Code: Select all

#action {You're hit in solar plexus, wow, this is breathtaking!!}{$LastCommand$}
this restarts your last command immediately and more than likely it was a weave.

Make sure you check the box [ ] Start of line

You don't want people saying You're hit in solar plexus etc in combat to force you into restarting a command. ;)

"you're hit in solar plexus is such broken English it reminds me of "All your bases are belong to us"
Nyoga
Posts: 633
Joined: Sun Oct 31, 2004 1:23 am

Re: al client scripts

Post by Nyoga »

All your base are belong to me.
Obould
Posts: 353
Joined: Tue Mar 15, 2005 4:33 pm

Re: al client scripts

Post by Obould »

Deleted a dg sticky post since it was a script thread, here it is

For now I am just going to hit upon the subject of aliases and the large amount of them most channies have just for their weaves. I won't bother speaking about the basics such as targetting scripts but I can if anyone needs an explanation.

As most of you know the best usage of status weaves are using them as combo such as slow and poison, weaken and chill etc etc. Now I just named 4 weaves which would be 4 aliases for most players but not for me. I will show you how to make a toggle switch to use one aliases for multiple weaves using alclient, they can very easily be converted to zmud.

Code: Select all

#set weavered 1;
#alias {7}{#if (weavered = 1) {channel 'weaken' $target$;#set weavered = weavered + 1};#elseif (weavered = 2) {channel 'cripple' $target$;#set weavered 1}}
The above weaves weaken and cripple used in the script can easily be altered to what ever you choose.

The script creates a variable called weavered and gives it a value of 1, once you use weakened the script changes the variables value from 1 to 2, once you use cripple it will change the value back to 1 which starts the script all over again from the beginning thus creating a toggle switch that allows you to use 2 weaves with one button.

Code: Select all

#set weaved 1;
#alias {6}{#if (weaved = 1) {channel 'slow' $target$;#set weaved = weaved + 1};#elseif (weaved = 2) {channel 'poison' $target$;#set weaved 1}}
This scripts will scroll through the weaves you set for them, very easily you could have one alias that would scroll through every status weave you have.

This is pretty advanced stuff for your average player so if you don't get it dont worry about it.
Post Reply