PDA

View Full Version : Caster Script request..really need this!



Elanthil01
03-07-2008, 02:25 AM
Im terrible at advanced scripting, so I'm begging someone to make a script here for me.

Heres the deal:

I do NOT want a 'hunting' script..I do not intend to AFK.

I want a script that activates on pushing a hotkey and runs through until the monster in question is dead, then skins it, using a skinning knife, then searches it, then picks up...anything valuable...it drops...even multiple items..and put them in the correct container.

I am using STORMFRONT, and I will be setting up VARIABLES in the VARIABLES MENU to use with scripts. I will list the ones I think I need at the bottom of the post.

I apologize in advance for how complicated this script request is, but I figure IF it CAN BE DONE, it will be useful for ALL casters, and the person who creates it will gain a lot of exposure as the creater of an end all, be all single critter kill script. Furthermore, when my website goes up, I'll post the script and give the creator the credit.

HERE is how I envision using it:

MACROS:
F1: .cast %critter1%\r

I walk into a room outside of Ta'Vaalor and see a fanged goblin.

I whack the F1 key, which is tagged to use this script with the variable 'critter1', on the macro line, which is set to a value of goblin.

The script begins casting the spell designated by the variable 'spell', which is specified in the macro as 702.

RECOGNIZING the spell from the variable listed on the F1 macro as spell1 (in this case, 702), the script holds onto the spell name for later crosschecking of mana, etc, and begins casting it on the creature, in the case of a spell that can be CHANNELED (example: mana disrupt or just 'disrupt' or 'md' as the variable contents for 'spell1'), the spell will dance to offensive stance, cast, dance to guarded.

If the creature resists, or survives, the script repeats until the critter (in this case 'goblin') is dead, or I run too low on mana to cast the spell in question (based on the spell named in the variable spell1, the script compares current mana to cost of spell and if there is NOT enough mana to cast it, pauses until enough mana is available, then goes back to casting)and 'catches' any of the various messages possible for its death.

*IF* during this time another creature, or God forbid, another GOBLIN (in this case) enters the room, the script should (ideally) detect WHICH creature in the room is the current target and keep its casting restricted to THAT creature, instead of blindly casting on the first target in the room list (man I hate that).

*AFTER* the creature is dead, swap to a skinning knife, contained in a container named in the variable 'skinner', then sets stance and position (stand/kneel/whatever) accordingly and skins the creature, then QUICKLY stores the skin and returns to standing, in defensive, holding my weapon, which is contained in the variable RIGHTHAND.

At this point, the script searches the monster, registers anything it drops that has any value (since some monsters drop multiple items) and begins collecting it, storing it all in the right places.

Example: the goblin drops a heavy quarts orb, a clear zircon, and a dented iron chest. The script picks up the orb and puts it in 'gembox1' or 'gembox2' if gembox1 is full, the orb and puts it in 'magicbox1' or 'magicbox2', and puts the chest in 'chestbox1' or 'chestbox2'. If an item cannot be stored, period, due to lack of space, the script checks for a disk and puts the item there, or prints to the screen that there is no space for the item, and then drops it.


PROBABLE VARIABLES:

CRITTER1-CONTAINS NAME OF CREATURE TO HUNT..MAY BE MULTIPLE WORDS (such as fanged goblin, lesser ghoul, etc) OR SINGLE WORDS.

SKINNER-NAME OF SKINNING KNIFE

SKINSHEATH-WHERE THE SKINNING KNIFE IS STORED.

SPELL1-NAME OF THE SPELL (OR NUMBER)
SPELLMANA-MANA COST OF THE SPELL

RIGHTHAND-NAME OF ITEM TO HOLD IN RIGHT HAND (EX: RUNESTAFF)
LEFTHAND-NAME OF ITEM TO HOLD IN LEFT HAND (EX: WAND OR SHIELD)
RIGHTSHEATH-WHERE RIGHTHAND GOES WHEN NOT HELD
LEFTSHEATH-WHERE LEFTHAND GOES WHEN NOT HELD

GEMBOX1-GEMS GO HERE. IF FULL, USE GEMBOX 2
GEMBOX2-IF GEMBOX1 IS FULL, USE THIS, ELSE USE DISK.

MAGICBOX1-WANDS, ORBS, RODS, STAFFS, ETC.
MAGICBOX2

CHESTBOX1-BOXES GO HERE
CHESTBOX2

DISKNAME-CHARACTER NAME (I.E. ZARAMON)-ITEMS THAT WONT FIT ELSEWHERE GO HERE. IF THIS IS FULL, ITEM IS DROPPED AND MESSAGE IS SENT TO SCREEN ***INVENTORY FULL, ITEM DROPPED***


This should be doable using either straight stormfront scripting or a combo of the stormfront commands AND the few extra commands available to users of PSINET.


If this can't be done, I'd appreciate being told so :)
:club:

thefarmer
03-07-2008, 03:01 AM
I do NOT want a 'hunting' script..I do not intend to AFK.

That's a hunting script... Regardless of whether or not you go AFK, it's still one.

FinisWolf
03-07-2008, 03:23 AM
With all the thought you put into that post, it would have been easier to write the script.

Finis

AnticorRifling
03-07-2008, 08:49 AM
If I can find them I've got scripts that do that although they are for the WizardFE not SF.

Elanthil01
03-07-2008, 11:00 AM
That would be great.

And yes, I could write part of the script..its the skeleton structure for the sections that eludes me, and my lack of longterm memory of all the death and item messages.

On top of that I have NO idea how to 'pull' item lists from the LOOK description of the room and insert them into a list to be picked up

Elanthil01
03-08-2008, 12:02 PM
Well, since no one wants to jump on board and write the whole thing in the name of personal fame, can you guys recommend scripts already here for me to cut and paste from to build this?

I'll obviously do as much of the programming as I can myself, but some of it will just be beyond me if for no other reason than I don't know all the possible matches involved (stuff has changed too much over the last 5 to 7 years I've been out of game)

I'm not a shithead, so if I cut/paste, I'll try to comment each paste block to give credit to the script it came from.

Heres what Im thinking I'll need to cut from, just off the top of my head:

combat 'timing' subroutine to handle roundtimes without worrying about the dreaded 'wait x seconds' (this is actually my big one I need..I cant find suitable commands to work around this event in lag)

combat target locking subroutine to prevent losing focus to a newly entering similar creature

Item pickup subroutine with matches

with those three 'stubs' I should be able to fill in the rest quite easily and hell I'll learn something on the way :)

Elanthil01
03-08-2008, 02:16 PM
Not that most of you really care :medieval:

but I'm making progress...good progress..on my own.

I have a complete basic script that will activate from a macro.

Heres the breakdown:

You have all these function keys, so assign the same script to each function key up through the max number of critters you can keep straight in your head.

Under VARIABLES in your front end, make a 'critter#' variable for each critter and a 'skin#' variable for each critter or at least each skin type you may deal with, where # is equal to a number, i.e. critter1 (value goblin), skin1 (value scalp)

The MACRO key itself is set up as follows:

.MD %critter1% (or whatever number) %skin1% offens (or other desired casting stance)\r

when you hit the macro heres what happens.

1. Mana check. If no or low mana, script exits with echo *NOT ENOUGH MANA!*

2. If mana check is passed, script preps 702, drops you to the stance specified on the command line, casts at the creature, and returns to guarded as soon as the game will permit (3.3 seconds, average, so watch your ass).

3. If the creature runs or somehow vanishes or is poached, the script exits with ***TARGET NO LONGER AVAILABLE*** and releases your spell.

-------------------------------------------------------------------

:help: WHAT I NEED HELP ON :help:

I need a COMPREHENSIVE search routine that will search the monster and PICK UP MULTIPLE ITEMS, since monsters often drop MORE than one item.

I've looked at a couple of these type of scripts and they all seem to abort after picking up ONE object.
-----------------------------------------

COMPREHENSIVE SKINNING ROUTINE to account for %skin#%.

--------------------------
A 'trigger' for the skinning section, set through the %skin# variable, that, if found, will SKIP the skinning section, for monsters with no skin and/or characters with no skinning skill. the variable value would be %skin99% with a value of noskin

bennym
03-13-2008, 03:43 PM
I have been using this for hunting arch wights: this is set to F1 key: {=903 wight}

It calls the following script (call it whatever you want, I call mine 903).

put prep 903
put stance off
put cast %1
put stance def
put .loot

Here is the .loot script, credit to whoever put together the burrow orcs script, I ripped most of this from that one and built on it a little.

loot:
put loot
match stow99 wand on it
match stow1 diopside on it
match stow2 cordierite on it
match stow3 ring on it
match stow4 statue on it
match stow5 crystal on it
match stow6 quartz on it
match stow7 lapis on it
match stow8 amethyst on it
match stow9 sapphire on it
match stow0 gem on it
match stow11 coral on it
match stow22 stone on it
match stow33 jade on it
match stow44 ivory on it
match stow55 pearl on it
match stow66 ruby on it
match stow77 spinel on it
match stow88 opal on it
match stow00 nugget on it
match stow111 diamond on it
match stow222 jasper on it
match stow333 emerald on it
match stow444 topaz on it
match stow555 zircon on it
match stow666 garnet on it
match stow777 tourmaline on it
match stow888 amber on it
match stow999 scroll on it
match stow000 paper on it
match stow1111 papyrus on it
match stow2222 vellum on it
match stow2228 strongbox on it
match stow2224 box on it
match stow2226 chest on it
match stow2230 trunk on it
match stow2232 coffer on it
match stow2233 essence shard behind
match exit crumbles to dust
matchwait

stow1:
put get diopside
put stow diopside
goto loot

stow2:
put get cordierite
put stow cordierite
goto loot

stow3:
put get ring
put stow ring
goto loot

stow4:
put get statue
put stow statue
goto loot

stow5:
put get crystal
put stow crystal
goto loot

stow6:
put get quartz
put stow quartz
goto loot

stow7:
put get lapis
put stow lapis
goto loot

stow8:
put get amethyst
put stow amethyst
goto loot

stow9:
put get sapphire
put stow sapphire
goto loot

stow0:
put get gem
put stow gem
goto loot

stow11:
put get coral
put stow coral
goto loot

stow22:
put get stone
put stow stone
goto loot

stow33:
put get jade
put stow jade
goto loot

stow44:
put get ivory
put stow ivory
goto loot

stow55:
put get pearl
put stow pearl
goto loot

stow66:
put get ruby
put stow ruby
goto loot

stow77:
put get spinel
put stow spinel
goto loot

stow88:
put get opal
put stow opal
goto loot

stow99:
put get wand
put stow wand
goto loot

stow00:
put get nugget
put stow nugget
goto loot

stow111:
put get diamond
put stow diamond
goto loot

stow222:
put get jasper
put stow jasper
goto loot

stow333:
put get emerald
put stow emerald
goto loot

stow444:
put get topaz
put stow topaz
goto loot

stow555:
put get zircon
put stow zircon
goto loot

stow666:
put get garnet
put stow garnet
goto loot

stow777:
put get tourmaline
put stow tourmaline
goto loot

stow888:
put get amber
put stow amber
goto loot

stow999:
put get scroll
put stow scroll
goto loot

stow000:
put get paper
put stow paper
goto loot

stow1111:
put get papyrus
put stow papyrus
goto loot

stow2222:
put get vellum
put stow vellum
goto loot

stow2224:
put get box
put put my box in my cloak
goto loot

stow2226:
put get chest
put put my chest in my cloak
goto loot

stow2228:
put get strongbox
put put my strongbox in my cloak
goto loot

stow2230:
put get trunk
put put my trunk in my cloak
goto loot

stow2232:
put get coffer
put put my coffer in my cloak
goto loot

stow2233:
put get shard
put stow shard
goto loot

exit:
exit

bennym
03-13-2008, 03:55 PM
BTW I do see that it doesn't meet your criteria of picking up multiple items nor does the kill portion do the things you wanted, but figured at least the loot list might help you.

Elanthil01
03-14-2008, 07:02 AM
is there some way to match multiple items and pick them up without issuing multiple LOOK commands?

maybe something to do with SHIFT ?

You know, it really bugs me Im PAYING to play this and yet I cant even use decent programming language to build a script without having to essentially hack the game by installing 3rd party programs or using unsupported front ends.

99.999% of the people out there (including me) would not 'cheat' with scripts, we just want to simplify shit by automating it.

I'd be happy with a 'hard timer' built into the game, if it meant I could do a few things:

For/NEXT loops
IF/THEN/NOT/NOR/NAND statments (real ones)
On/GOTO
COUNT string (search for things like how many apostraphes issued after a LOOK command, as those are separators for items, generally)

simple operators like !=, -/+, <=>, <>, <, >, etc

anyone else have a command wishlist? :D

I've TRIED all the versions of LICH out there and the game wont connect with any of them *shrug* so I guess I'll just stop bitching and suck it up.

SpiffyJr
03-14-2008, 08:22 AM
99.999% of the people out there would 'cheat' with scripts, we just want to simplify the shit grinding by automating it.


Fixed!

Elanthil01
03-14-2008, 08:32 AM
rofl. good one

g++
03-14-2008, 08:35 AM
You could match what the items look like next to each match a rock crystal and.... of course that would be 2x squared match commands for every common treasure item so youd have about 20,000 matchs to write. As far as wishlist if youve got a for loop, if statement and variables what else do you need?

Elanthil01
03-14-2008, 09:39 AM
Nand and Nor, nuff said

Gibreficul
03-18-2008, 07:35 AM
You could match what the items look like next to each match a rock crystal and.... of course that would be 2x squared match commands for every common treasure item so youd have about 20,000 matchs to write. As far as wishlist if youve got a for loop, if statement and variables what else do you need?

That's why God created Regular expressions.



matchre getsphene / (yellow|green|brown|white) sphene/
matchre getblaze / (azure|crimson|golden|emerald) blazestar/
matchre getagate / (fire|chameleon) agate/
matchre getfeystone / (periwinkle|bright violet) feystone/
matchRE getame / (an|billiant wyrm's-tooth) amethyst/
matchRE getcoral / (polished red|polished pink|blue ridge|cat's-paw|flower|polished black| polished pink| polished red) coral/
matchRE getCrystal /(cinnabar|quartz|rock|shard of dragonmist|shard of tigerfang|black|blue|white) crystal/
matchRE getdiamond /(blue|dragon's-tear|dwarf-cut|faceted black|large yellow|uncut|uncut maernstrike|uncut star-of-Tamzyrr) diamond/
matchRE getdreamstone /(blue|black|green|pink|red|white|yellow) dreamstone/
matchre getdeme /(dragonfire|dragon's-tear|dwarf-cut) emerald/
matchRE getgarnet /(almandine|blood red|green|orange spessartine|sanguine wyrm's-eye) garnet/
matchRE getgem /(ametrine|aquamarine|firey red|bright chrysoberyl|golden beryl|clear blue|green chrysoprase) gem/
matchRE getglim /(brilliant lilac|cerulean|clear|golden|green|peach|smoky|ultr amarine) glimaerstone/
matchRE getjasper /(black|red|yellow) jasper/
matchRE getmoon /(blue|cats-eye|golden|grey|green|opaline|pale blue|pale green|silvery|black) moonstone/
matchRE getopal /(boulder|moonglae|aster|black|blue-white frost|dragonfire|fire|monglae|white) opal/
matchRE getpearl /(brilliant fire|black|grey|pink|white|iridescent) pearl/
matchRE getperidot /(blue|green|pink) peridot/
matchRE getquartz /(asterfire|cat's eye|carnelian|citrine|rose|leopard|astrfire|dragon fire|citrine|milky|smoky|oblivion|rainbow|dragon's-fang) quartz/
matchRE getruby /(uncut|dragon's-tear|dwarf-cut|a|sylvarraend|star) ruby/
matchRE getsap /(blue|shimmarglin|clear|mermaid's-tear|dragonsbreath|dragonseye|dwarf-cut|green|pale water|pink|star|violet|yellow) sapphire/
matchRE getspinel /(blue|pink|red|violet) spinel/
matchRE getstarstone /(blue|green|white) starstone/
matchRE getsunstone /(red|yellow|white) sunstone/
matchRE getstone /(pink rhodochrosite|banded sardonyx|green alexandrite|green aventurine|green malachite|iridescent labradorite|light pink morganite|polished jet|turquoise) stone/
matchre getstarstone /(red|blue) starstone/
matchRE gettopaz /(blue|clear|golden|green errisian|orange imperial|pink|smoky) topaz/
matchRE gettou /(black|blue|clear|green|pink) tourmaline/
matchRE getzircon /(brown|clear|green|snowflake|yellow) zircon/
matchRE gethel /(pale|yellow) heliodor/

that's a list of matches I use in a SF treasure script using regular expressions.

If you're good, you can save a ton of coded lines this way.

g++
03-18-2008, 08:59 AM
That's why God created Regular expressions.


If you're good, you can save a ton of coded lines this way.

Thats pretty cool and I had no idea you could do that. It would still be an almost insurmountable task to write a get statement even for every combo of type, but that would certainly cut down on it. Im gonna play around with that tonight.

Deathravin
03-18-2008, 09:58 AM
I just put in my macros to put away my right hand before searching, anything on it goes to my hand, then I stow right.

I'll miss some things occasionally, but it's easier.

Gibreficul
04-01-2008, 05:26 AM
Here's an ANNOYING script that someone wrote... it repeats anything anyone says.

I didn't write this, it was posted on the BBS I'm pretty sure, and it's just an example of how powerful a regexp can be, even in a limited language like SF scripting.

Bobmuhthol
04-01-2008, 05:29 AM
That's something you can do in BASIC, which isn't an especially powerful language.

Gibreficul
04-01-2008, 07:44 AM
That's something you can do in BASIC, which isn't an especially powerful language.

Compared to what most people think SF is limited to, that's huge.

g++
04-01-2008, 08:33 AM
Compared to what most people think SF is limited to, that's huge.

Can you declare multiple word variables in an SF script?
setvariable word %word%whatever
So this lets you append to a string? Thats actually getting pretty close to an incredibly shitty data structure.

Gibreficul
04-01-2008, 05:41 PM
Can you declare multiple word variables in an SF script?
setvariable word %word%whatever
So this lets you append to a string? Thats actually getting pretty close to an incredibly shitty data structure.

Yes, you can. You have to enclose the string in quotes.

setvariable thisvariable "The value of thisvariable is this whole string."
setvariable thatvariable "the value of thatvariable is this whole string."

echo %thisvariable%%thatvariable%

The value of thisvariable is this whole string.the value of thatvariable is this whole string.

I hope that answered the question.

AestheticDeath
04-01-2008, 05:53 PM
Using SF though, can't they tell that you are scripting? I was under the impression they can't tell when you are using WizardFE

Gibreficul
04-11-2008, 06:24 AM
Using SF though, can't they tell that you are scripting? I was under the impression they can't tell when you are using WizardFE

Who gives a shit if you aren't AFK?