PDA

View Full Version : script assistance



bremerial
04-29-2012, 03:26 AM
I really dont script beyond incredibly basic stuff, but i am looking for a script that would allow me to select one of four weapons from a container whilst hunting.

I put together something that works but requires me to alternate between weapons to get the one I want. This is an example of the sort of thing i've been using. it works but of course to get to the bow, I have to take out and put away three other weapons. Functional but not pretty or efficient. Can anyone provide something a little more sophisitcated?



#weapon loading

MainLoop:

Match weapon1 You glance down at your empty hands
Match weapon2 You glance down to see a claidhmore in your right hand
Match weapon3 You glance down to see a flail in your right hand
match weapon4 You glance down to see a fist-scythe in your right hand
match weapon5 You glance down to see a bow in your right hand


Matchwait

weapon1:
put take my claid
Goto MainLoop

weapon2:
put stow right
put take my flail
Goto MainLoop


weapon3:
put stow right
put take my fist-scythe
Goto MainLoop


weapon4:
put stow right
put take my bow
Goto MainLoop


weapon5:
put stow right
put take my claid
Goto MainLoop

Gibreficul
05-07-2012, 07:49 PM
Do you use Lich? if you do, this can be done a LOT easier.

Jymamon
05-07-2012, 08:31 PM
...that would allow me to select one of four weapons from a container ...

Your script seems complicated for what I understand your request to be.
You just want something that will get a specific weapon (as opposed to the next in a list) from a container? I.e

.getweapon claidhmore

If I'm understanding that correctly...

Define a SF variable container that is set to what you want to use (or pass it as a parameter or hardcode it in the script, your choice)


put put right in my %container%
put put left in my %container% # bow (or shield, if you use one)
put get %1% from my %container%
# Add your matchwait here if you want to grab a shield when getting the fist-scythe out

You could make it a bit smarter and decide if you already have the weapon you're requesting out, but those 3 lines get you the basics of what you want.

If you mean the next in a list, I'm pretty sure you could knock it out in SF if you don't use lich, but Ruby is definitely better at list processing than SF is.

bremerial
07-04-2012, 03:17 PM
I don't use Lich, just SF.
Thanks for the advice - I didn't think anyone would respond so it was a pleasant surprise to find a response made.
Will let you know how I get on.

jpatter123
07-04-2012, 03:37 PM
you were actually close.. this makes it much easier all you have to do is type weapon1 enter and it will retrieve your claid and go back to the loop and wait. typing weapon4 would draw your bow etc.

#weapon loading

MainLoop:

Match weapon1 weapon1
Match weapon2 weapon2
Match weapon3 weapon3
match weapon4 weapon4


Matchwait

weapon1:
put take my claid
Goto MainLoop

weapon2:
put stow right
put take my flail
Goto MainLoop


weapon3:
put stow right
put take my fist-scythe
Goto MainLoop


weapon4:
put stow right
put take my bow
Goto MainLoop

jpatter123
07-04-2012, 03:42 PM
I would shorten those to weap1 or something similar, but you can't match a real word or even part of it like claid cause typing claid would activate it then drawing the claid would activate the loop again or any instance of that word or part there of that happens in game.

hmm I just realized one of those instances is a bow.. these easy way out is add put wear bow or put bow wherever in weapon1: -weapon:3 . It's a sloppy fix though.