PDA

View Full Version : script help



Rinualdo
11-09-2007, 10:58 AM
Anyone able to give me a lil MA script help?

Basicially I want a script that is constantly running and would like it to work like this:

Char A says 701
it checks mana and then incants 701
repeat for other spells

Char A says kill
then stances off, kill, stance def after roundtime

Char A says mstrike
Stances off, mstrikes, then stances def

Any help would be appreciated.

GuildRat
11-09-2007, 11:02 AM
HUH? You're looking for a bloodburst scipt...that tells MA #2 to attack with mstrike?........the repeat for other spells is killing me...wtf are ya trying to do exactly?

Rinualdo
11-09-2007, 11:13 AM
I intend to modify the basics to the spells I intend to use. I intend to have it cast more then one spell, so I would want it to respond to a whisper of xxx to cast xxx spell.

Bob whispers to you "701"
You incant Bloodburst

Bob whispers to you "410"
You incant elemental wave

Bob whispers to you "kill"
You are now in an offensive stance
You attack
Roundtime over
You are now in a defensive stance

Bob whispers to you "mstrike"
Stance off
Mstrike
Roundtime
Stance def

Etc.

Izzy
11-09-2007, 11:13 AM
Anyone able to give me a lil MA script help?

Basicially I want a script that is constantly running and would like it to work like this:

Char A says 701
it checks mana and then incants 701
repeat for other spells

Char A says kill
then stances off, kill, stance def after roundtime

Char A says mstrike
Stances off, mstrikes, then stances def

Any help would be appreciated.

You probably don't want to use 'say' as the activator, unless you really want everyone to know you're running an MA bot script. Use whisper instead.

As far as the matches, it would be something like: (This isn't the exact wording, obviously, but if you can't figure it out you shouldn't be asking how to script, you should be learning).
--------------------
Start:
match 701 CharacterA whispers "701"
match 702 CharacterA whispers "702"
match kill CharacterA whispers "kill"
--------------------

then you'd have individual sections for each.
-----------------
701:
put target random
put incant 701
goto start

kill:
put stance o
put kill
waitfor roundtime
put stance d
goto start
-------------------
and so on. Granted, I would pick the spells that are most beneficial to MA hunting, not all of them.

Rinualdo
11-09-2007, 11:19 AM
Sorry, yes, it would be a whisper and I only intend to put in specific spells.

How would I make it check that there's enough mana to cast the spell?

Oh, this is for SF.

Donquix
11-09-2007, 12:06 PM
My character has 3 mana...
>send 3 fakename
I could not find what you were referring to.
>send 4 fakename
You don't have that many points to transfer!

Notice the difference in messaging. So, you can do this...


start:
match 701mana CharacterA whispers, "701"
matchwait

701mana:
match 701cast I could not find what you were referring to.
match nomana You don't have that many points to transfer!
put send 1 fakename
matchwait
701cast:
put incant 701
goto start

nomana:
put whisper yourmaincharactersname I do not have enough mana to cast that spell.
goto start

Rinualdo
11-09-2007, 12:23 PM
Is there a way to have it report mana via whisper after each cast?
Without having to make 100 matches for each mana verb output?

Donquix
11-09-2007, 12:43 PM
not with the default SF/Wizard scripting engines.

Celephais
11-09-2007, 12:49 PM
Is there a way to have it report mana via whisper after each cast?
Without having to make 100 matches for each mana verb output?
Position the two FE windows ontop of each other so the mana bar for the slave is at position that's not covered by the top window (don't maximize it). This way you can also see mana pulses and always track it... couple other windows would be a good idea too (CT/RT... health.. stunned)

Rinualdo
11-09-2007, 06:15 PM
I tried the above method, but the script hangs after putting in send. Any thoughts?

Start:
match 903mana whispers, "903."
match 906mana whispers, "906."
match 910mana whispers, "910."
match Hastemana whispers. "haste"
matchwait

903mana:
put send 1 thjhatgjgejgtj
match 903 I could not find waht you were referring to.
match nomana You don't have that many points to transfer!
matchwait

906mana:
match 906 I could not find waht you were referring to.
match nomana You don't have that many points to transfer!
put send 1 thjhatgjgejgtj
matchwait

910mana:
match 910 I could not find waht you were referring to.
match nomana You don't have that many points to transfer!
put send 1 thjha
matchwait

hastemana:
match haste I could not find what you were referring to.
match nomana You don't have that many points to transfer!
put send 1 thjhatgjgejgtj
matchwait

nomana:
put whiser xxx not enough mana!
goto start

903:
put target random
put incant 903
goto Start

906:
put target random
put incant 906
goto Start

910:
put target random
put incant 910
goto Start

Haste:
put prep 506
put cast xxx
goto Start

Celephais
11-09-2007, 06:36 PM
what... not waht...

Rinualdo
11-09-2007, 06:39 PM
Wow, I'm an idiot. Thanks...

shaluke
11-21-2007, 08:02 AM
I use the psinet alias feature to do all of this.

An alias can carry up to three commands by using as little as one character.

ex. By typing 'fire' I get this

stance offensive
incant 906
stance guarded

I am not a guru scripter so I cannot offer any help with scripting but this is at least an option to do what you want to do.

Celephais
11-21-2007, 09:46 AM
I use the psinet alias feature to do all of this.

An alias can carry up to three commands by using as little as one character.

ex. By typing 'fire' I get this

stance offensive
incant 906
stance guarded

I am not a guru scripter so I cannot offer any help with scripting but this is at least an option to do what you want to do.
While helpful, he wasn't looking for aliases, he wants a command entered in one character to cause the other character to "fire". He is also looking for mana checks and for the slave to "report" to the master.

Akaylas
11-26-2007, 02:50 AM
You can do a mana report thing in a similar manner to how you check to make sure there's enough mana. Though it wont be accurate. Something like...

checkmana200:
put send 200 fakename
match checkmana150 <insufficient mana messaging>
match printmana200 <nonexistent target>
matchwait
...
...
...
printmana200:
put whisper characterName "I have at least 200 mana remaining".
...
...
...

And do that for as many cases / increments as you want. Problem is, each check requires an additional inputted command, so doing anything beyond large increments could take a long time to compute. Also, obviously, it wont be extremely accurate.

Akaylas,
Scripting Novice

P.S. - Can anyone verify that WFE/SFE use a Turing model of computation for scripts? I'm beginning to believe this more and more as I get deeper in the language, as there's no arithmetic or logical operations, no iterative or recursive operations, etc, etc, etc...