PDA

View Full Version : Hunting script



gcstader
01-26-2004, 12:32 PM
I modified a script Kranar had posted to work for manticores. Here's the script, followed by a couple questions I have:



counter set 1

start:
pause 1
put look
match filter manticore
#match lost Arctic Tundra
match continuehunt Table]
match logoff [Scripting Violation Limbo]
match logoff [The Cell]
#match lost Obvious paths:
matchwait

#lost:
#pause .5
#put look
#match R1
#match R2
#match R3
#match R4
#match R5
#match R6
#match R7
#match R8
#match R9
#match R10
#matchwait

checkexp:
put exp
match moverest You must rest
match R1 Your mind is
matchwait

hunt:
pause 1
goto R1

R1:
pause .5
put e
counter set 2
goto checkroom

R2:
pause .5
put e
counter set 3
goto checkroom

R3:
pause .5
put go opening
counter set 4
goto checkroom

R4:
pause .5
put ne
counter set 5
goto checkroom

R5:
pause .5
put sw
counter set 6
goto checkroom

R6:
pause .5
put n
counter set 7
goto checkroom

R7:
pause .5
put w
counter set 8
goto checkroom

R8:
pause .5
put e
counter set 9
goto checkroom

R9:
pause .5
put s
counter set 10
goto checkroom

R10:
pause .5
put go opening
counter set 11
goto checkroom

R11:
pause .5
put w
counter set 12
goto checkroom

R12:
pause .5
put go opening
counter set 13
goto checkroom

R13:
pause .5
put north
counter set 14
goto checkroom

R14:
pause .5
put nw
counter set 15
goto checkroom

R15:
pause .5
put se
counter set 16
goto checkroom

R16:
pause .5
put s
counter set 17
goto checkroom

R17:
pause .5
put go opening
counter set 18
goto checkroom

R18:
pause .5
put w
counter set 19
goto checkroom

R19:
pause .5
put go opening
counter set 20
goto checkroom

R20:
pause .5
put n
counter set 21
goto checkroom

R21:
pause .5
put nw
counter set 22
goto checkroom

R22:
pause .5
put w
counter set 23
goto checkroom

R23:
pause .5
put e
counter set 24
goto checkroom

R24:
pause .5
put n
counter set 25
goto checkroom

R25:
pause .5
put s
counter set 26
goto checkroom

R26:
pause .5
put ne
counter set 27
goto checkroom

R27:
pause .5
put sw
counter set 28
goto checkroom

R28:
pause .5
put se
counter set 29
goto checkroom

R29:
pause .5
put s
counter set 30
goto checkroom

R30:
pause .5
put go opening
counter set 31
goto checkroom

R31:
goto checkexp

checkroom:
match start Sorry, you may only type ahead
match R%c You can't go there
match R%c I could not find what
match logoff V'reen
match logoff morph
match filter manticore
match R%c Obvious paths:
match R%c Obvious exits:
matchwait

filter:
match start You can't go there.
match R%c Also here:
match preatt Obvious paths:
match preatt Obvious exits:
matchwait

preatt:
put hide
pause 3
put SIGN OF SHIELDS
waitfor !
put SIGN OF STRIKING
waitfor !
put SIGN OF SMITING
waitfor !
put SIGN OF SWORDS
waitfor !
put SIGN OF DEFENDING
waitfor !
put SIGN OF WARDING
waitfor !
goto attack

attack:
put hide
pause 3
put stance o
put amb mant neck
match dead manticore screams one last
match dead falls to the ground and dies.
match attack You fail to find
match attack is stunned!
match attack wait
match attack Roundtime
match dead already dead
match R%c What were
match R%c I could not
matchwait


dead:
put search mantico
pause 1
put SIGN OF SHIELDS
waitfor !
put stance d
put look
goto checkroom




moverest:
put put my longsword in my harness
waitfor longsword
put wear my shield
waitfor shield
put stance o
put climb gate
put get longsword from my harness
waitfor longsword
put rem shield
put stance d
move go trail
move northeast
move northeast
move east
move east
put give guard 5 silver
move go gate
move east
move east
move east
move east
move east
move east
move go bank
goto bankdepo

gohunt:
pause 150
put exp
match continuehunt Mana: 21/
match continuehunt Mana: 22/
match continuehunt Mana: 23/
match continuehunt Mana: 24/
match continuehunt Mana: 25/
match continuehunt Mana: 26/
match continuehunt Mana: 27/
match continuehunt Mana: 28/
match continuehunt Mana: 29/
match continuehunt Mana: 30/
match continuehunt Mana: 31/
match continuehunt Mana: 32/
match continuehunt Mana: 33/
match continuehunt Mana: 34/
match continuehunt Mana: 35/
match continuehunt Mana: 36/
match continuehunt Mana: 37/
match continuehunt Mana: 38/
match continuehunt Mana: 39/
match continuehunt Mana: 40/
match continuehunt Mana: 41/
match continuehunt Mana: 42/
match continuehunt Mana: 43/
match continuehunt Mana: 44/
match continuehunt Mana: 45/
match continuehunt Mana: 46/
match continuehunt Mana: 47/
match continuehunt Mana: 48/
match continuehunt Mana: 49/
match continuehunt Mana: 50/
match continuehunt Mana: 51/
match continuehunt Mana: 52/
match continuehunt Mana: 53/
match continuehunt Mana: 54/
match continuehunt Mana: 55/
match continuehunt Mana: 56/
match continuehunt Mana: 57/
match continuehunt Mana: 58/
match continuehunt Mana: 59/
match continuehunt Mana: 60/
match continuehunt Mana: 61/
match continuehunt Mana: 62/
match continuehunt Mana: 63/
match continuehunt Mana: 64/
match continuehunt Mana: 65/
match continuehunt Mana: 107/
match gohunt Max
matchwait

continuehunt:
put stand
waitfor You scoot your chair
put get my longsword
waitfor You remove a
put rem my shield
move out
move go stair
move out
put prep 606
put cast
pause 3
put prep 606
put cast
pause 3
move north
move go gate
move west
move west
move sw
move sw
move go trail
put put my longsword in my harness
waitfor longsword
put wear my shield
waitfor shield
put stance o
put climb gate
put get longsword from my harness
waitfor longsword
put rem shield
put stance d
put SIGN OF STRIKING
waitfor !
put SIGN OF SMITING
waitfor !
put SIGN OF SHIELDS
waitfor !
put SIGN OF WARDING
waitfor !
put SIGN OF DEFENDING
waitfor !
put SIGN OF SWORDS
waitfor !
goto R1



bankdepo:
pause 1
put depo 1000
match bankdepo You deposit
match gobankrest You don't have that much.
matchwait

gobankrest:
move out
move w
move w
move w
move w
move w
move w
move s
move go pub
move go stair
put go table
pause 1
put sit
pause 1
goto rest

bankdepo:
pause 1
put depo 1000
match bankdepo You deposit 1000 silvers in
match gobankrest You don't have that much!
matchwait

rest:
put put longsword in my harness
put wear shield
pause 120
put exp
pause 120
put exp
pause 120
put exp
pause 120
put exp
pause 120
put exp
pause 120
put experience

goto spellup1

spellup1:

put rem my brig
pause 12

put prep 601
put cast
pause 4

put prep 601
put cast
pause 4

put prep 601
put cast
pause 4

put prep 602
put cast
pause 4

put prep 602
put cast
pause 4

put prep 613
put cast
pause 4

put prep 613
put cast
pause 4

put prep 618
put cast
pause 4

put prep 618
put cast
pause 4

put prep 103
put cast
pause 4

put prep 101
put cast
pause 4

put prep 101
put cast
pause 4

put prep 107
put cast
pause 4

put prep 107
put cast
pause 4

put wear my brig

pause 300
goto continuehunt


logoff:
put exit
----------------
Couple questions:
What would be the best way to pick up gems that the creatures drop after I search them? I tried something like this but it didn't work out too good:

dead:
put search mantico
pause 1
put SIGN OF SHIELDS
waitfor !
put stance d
put look
match get1 gem
match broke It had nothing of interest.
match broke nothing else of value
matchwait

broke:
put look
goto checkroom

get1:
put put longsword in my harness
waitfor longsword
put get gem
put put gem in my cloak
MATCH nofit1 won't fit
MATCH inside You put
MATCHWAIT

inside:
put get longsword from my harness
put stance d
put look
goto checkroom

nofit1:
put drop gem
put get longsword from my harness
waitfor longsword
put stance d
put look
goto checkroom

Any help?

Jonty
01-26-2004, 12:38 PM
Pauses make it slow.

gcstader
01-26-2004, 12:40 PM
I use the pauses because I'm resting when I spell up so, I actually need it to take awhile.

Jonty
01-26-2004, 12:56 PM
I mean when you're moving around.

peam
01-26-2004, 01:00 PM
Anyone want to modify that to work with Sorcerers?

gcstader
01-26-2004, 01:01 PM
Pausing for a half second doesn't slow it down at all really. It's only there to prevent overflow so this doesn't happen:

put se
put se
put nw
You can only type one line ahead....

You could use move but that waits for a room description and is even slower.

The script works really good as is. Dropped 15000 experience yesterday without touching the keyboard. ;) I just wish I could pick up treasure...

~Greg

[Edited on 1-26-2004 by gcstader]

Jonty
01-26-2004, 01:25 PM
Originally posted by gcstader
Pausing for a half second doesn't slow it down at all really.You can only type one line ahead....

You could use move but that waits for a room description and is even slower.

~Greg

[Edited on 1-26-2004 by gcstader]

Yes it does slow it down. Take that part where you put up your signs.... Replace the waitfors with pause .5, and see how much slower it is. Now that pause throughout a whole hunt, does slow it down.



It's only there to prevent overflow so this doesn't happen:

put se
put se
put nw


That's why you use "wait"s instead. Works just like it does now, just faster.



The script works really good as is. Dropped 15000 experience yesterday without touching the keyboard. ;) I just wish I could pick up treasure...


I'm not saying your script is bad, it could just be faster. I'll post my search script. Maybe you can take the ideas from it and implement it into your hunt script.

Soulpieced
01-26-2004, 01:26 PM
Use move to move, and waitfors after every put. The new scripting engine is 3x as fast as it used to be with waitfors.

Jonty
01-26-2004, 01:43 PM
Things like this also make your script slow.



put hide
pause 3


The wizard autmatically waits the 3 seconds RT. So with the above code, you're actually waiting 6 seconds.... You can either change it to 1 second, or add in error catching code to enter the attack command in again if you get an error.

example of an ambush script I run after hiding:



if_1 goto start
startw:
wait

start:
match startw ...wait
match ambush You are now in an offensive stance.
match ambush Your rage causes you
put stance off
matchwait

ambush:
if_2 put ambush %1 %2
if_2 exit
put ambush %1

gcstader
01-26-2004, 07:52 PM
Anyone wanna post a search script that I could incorporate into my original?

Thanks
~Greg

Bobmuhthol
01-26-2004, 07:57 PM
OMG BEST IDEA EVER:

Don't hunt with a script.

gcstader
01-26-2004, 08:04 PM
OMG BEST IDEA EVER:

Fuck off and mind your own business

~Greg / Eldas in GS

Halfsilver
01-26-2004, 08:07 PM
Post it here, and it's everybodies' business.

First rule of BBS-world. :P

edited: cause bob would yell for punctuation otherwise! lol.

[Edited on 1-27-2004 by Halfsilver]

Bobmuhthol
01-26-2004, 08:12 PM
If I can read it, it's my business you stupid cunt. Especially when you openly asked for advice, and I gave you some.

gcstader
01-26-2004, 08:38 PM
<< If I can read it, it's my business you stupid cunt. Especially when you openly asked for advice, and I gave you some. >>

You're right, I asked for advice. Not smart ass comments from a middle aged loser.

~Greg

Anebriated
01-26-2004, 08:42 PM
Bob is 13, not middle aged.

Bobmuhthol
01-26-2004, 08:42 PM
Middle school aged, thanks.

gcstader
01-26-2004, 08:51 PM
<< Bob is 13, not middle aged. >>

That would explain it.

I thought you were middle aged because of the pic you posted in the picture thread:
http://forum.gsplayers.com/viewthread.php?tid=987

~Greg

[Edited on 1-27-2004 by gcstader]

Jonty
01-26-2004, 08:54 PM
Originally posted by gcstader
Anyone wanna post a search script that I could incorporate into my original?

Thanks
~Greg

Um, I posted a search and skin script in their own folder. If you care to work out the incorporation, that's up to you.

Edited: I read this thread first, so I didn't know you responded in the other....

[Edited on 1-27-2004 by Jonty]

FinisWolf
02-26-2004, 04:41 AM
Its actually fairly simple to search and pick stuff up if you are scripting.

at the begining of the script:

put flag righthand on

&

put stow set <container>

Just before you search the critters in your script, wither put your weapon away, or stow it, it doesn't matter. then do your search, you will gather the coins automatically, and grab anything the critter drops, yes even the chipped bricks ::chuckle::, after your search get your weapon back out.

vera simple really

Course with the script ninjas here, I am sure they have a better way. ::shrug::

dats my hairbrained idea

Best of Luck