|
galamor Newbie
Joined: 18 Feb 2004 Posts: 6 Location: Israel
|
Posted: Wed Mar 31, 2004 2:17 am
Affects |
Hi I'm a computer user not a programer so please bear with me:(
I play on mud witch allows two chars at same time (Dragon Swords), I'm having trouble keeping track of my spell/skill affects. What I would like to know is... is there some way of automating spellups?
My windows are Graad and Gallamor. Before combat i would like to type spellup and allow graad to cast his spells on both chars and allow galamor to cast his spells on both chars.
1. Some spells may only be caste on caster
2. When spells are active I dont want to cast them
3. my affect list looks like this
You are affected by:
1) Spell: inertial barrier modifies none by 0 for 24 hours.
2) Spell: sanctuary modifies none by 0 for 2 hours.
3) Spell: swiftness modifies hitroll by 10 for 30 hours.
4. When spellup is complete I would like to recheck that the skills/spells are all working as some times the spell fizzles.
5.There are many more spells/skills but if you could help me with this short list i should be able to add more skills/spells on my own,
also as I advance in level I will need to add more any way.
I'm sure this is not so easy but as I said I'm a user not a programmer and this is tottaly beyond me even though I've tried the help files.. please help THANKS.
P.S. if You need more info please ask I'll tell as much as I can:) |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Apr 06, 2004 6:40 pm |
I'm sorry you haven't gotten a reply before. This is a difficult task and you haven't actually provided enough information to do it. I'll try to list all my guesswork at the bottom of the post.
Start by breaking this down into simpler tasks. The first task is to determine what spells are needed. This can be done by maintaining one record-variable for the spells you can cast on yourself and another record-variable for the spells your alt will cast on you. Start by supplying the names of those spells as the record keys, with 0 as the values. This should be done by an alias, so that the values can all be reset to 0 before each 'affects' command. Use a trigger to change the value when a spell shows up on your Affects list.
#AL aff {
#ADDK SelfSpells {inertial barrier|sanctuary} 0
#ADDK AltSpells {swiftness} 0
affects
}
#TR {%d~) Spell:%s(*) modifies} {
#IF %iskey( @SelfSpells, %1) {
#ADDK SelfSpells {%1} 1
} {
#IF %iskey( @AltSpells, %1) {#ADDK AltSpells {%1} 1}
}}
Next, you'll need a trigger to determine when you've reached the end of the affects list. You didn't provide any information on what will be seen after the list, so I've had to create a negative trigger (one which checks for the absence of a pattern).
At this point, you'll decide what spells are needed and start casting them or telling your alt to cast them. You also have the problem of deciding when to check affects again. You won't want to do that until both you and your alt have finished casting on you, which makes it rather complicated. I've done my best by having you check it when you finish casting your own spells if you didn't ask your alt to cast anything, and having you check it when your alt tells you to if you did tell your alt to cast.
#TR {You are affected by:}
#COND {(%x)} {#IF !%ends( "%1", ")") {spellup}
#AL spellup {
#VAR altcast 0
#VAR selfcast 0
#LOOPDB @AltSpells {
#IF (%val = 0) {
tell gallamor spellup %key
#VAR altcast 1
}}
#IF @altcast {tell gallamor end spellup}
#LOOPDB @SelfSpells {
#IF (@val = 0) {
cast '%key'
#VAR selfcast 1
}}
#IF ((@altcast = 0) AND (@selfcast = 1)) {aff}
}
#TR {Gallamor tells you, ~"spellup (*)~"} {cast '%1' gallamor}
#TR {Gallamor tells you, ~"end spellup~"} {tell gallamor affects}
#TR {Gallamor tells you, ~"affects~"} {aff}
NOTES:
1. This script was written for Graad. You'll need a similar script for Gallamor, except that you'll need to send the tells to change all the names from 'gallamor' to 'graad' and you'll need to change which spells are in which variables.
2. Use 'aff' to start the script.
GUESSWORK:
1. I assumed that Graad knows sanctuary and inertial barrier, and can cast them on himself.
2. I assumed that Gallamor knows swiftness and can cast it on others.
3. I assumed that the affects list won't be interrupted by anything.
4. I assumed that you can spam in commands and the MUD will simply perform each command after the previous one is finished.
5. I assumed that there will be enough delay for you to finish spamming your own spells before Gallamor can finish casting even one spell and tell you "affects".
6. I assumed that your tells will follow the pattern:
Character tells you, "message".
7. I assumed that the cast command will follow the pattern:
cast 'spell name' target
8. I assumed that the target can be omitted when casting spells on yourself.
9. I assumed that 'affects' is the full name of the command to display your affects.
10. I assumed that the tell command will follow the pattern:
tell character message |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|