PDA

View Full Version : Hunting Script



Latrinsorm
02-18-2004, 04:45 PM
I made one, tell me if (and if so, how) it's fucked up. Yeah, I'm lazy. The hunting area has war trolls, manticores, hill trolls, black bears, and great boars. I only care about killing war trolls, because they're easy to kill and have good treasure. Also, I just put a thing in to grab lockpicks.

#atta trolls

goto Begin

StartAt:
put atta
match Wait ...wait
match Stop dies
match StartAt Roundtime
match Gather at a hill troll!
match Gather at a black bear!
match Gather at a manticore!
match gather at a great boar!
match Gather You currently have
matchwait

wait:
pause 1
goto StartAt

Stop:
put skin target
put loot
waitfor You search
goto StartAt

Gather:
put l
match heart heart
match sapphire sapphire
match ruby ruby
match diamond diamond
match lapis lapis
match pearl pearl
match box box
match strongbox strongbox
match coffer coffer
match trunk trunk
match chest chest
match %s Obvious paths:
matchwait

Heart:
put wear shield
waitfor You sling
put get heart
put put my heart in my pack
waitfor You
put rem shield
goto Gather

Sapphire:
put wear shield
waitfor You sling
put get sapphire
put put my sapphire in my pack
waitfor You
put rem shield
goto Gather

Ruby:
put wear shield
waitfor You sling
put get ruby
put put my ruby in my pack
waitfor You
put rem shield
goto Gather

Lapis:
put wear shield
waitfor You sling
put get lapis
put put my lapis in my pack
waitfor You
put rem shield
goto Gather

Pearl:
put wear shield
waitfor You sling
put get pearl
put put my pearl in my pack
waitfor You
put rem shield
goto Gather

Box:
put wear shield
waitfor You sling
put get box
put put my box in my pack
waitfor You
put rem shield
goto Gather

Strongbox:
put wear shield
waitfor You sling
put get strongbox
put put my strongbox in my pack
waitfor You
put rem shield
goto Gather

Coffer:
put wear shield
waitfor You sling
put get coffer
put put my coffer in my pack
waitfor You
put rem shield
goto Gather

Trunk:
put wear shield
waitfor You sling
put get trunk
put put my trunk in my pack
waitfor You
put rem shield
goto Gather

Chest:
put wear shield
waitfor You sling
put get chest
put put my chest in my pack
waitfor You
put rem shield
goto Gather



Begin:
move out
put l
counter add
save %c

Start:
match End war troll
match %s Obvious paths:
matchwait

1:
move s
counter add
save %c
goto Start

2:
move s
counter add
save %c
goto Start

3:
move se
counter add
save %c
goto Start

4:
move sw
counter add
save %c
goto Start

5:
move sw
counter add
save %c
goto Start

6:
move sw
counter add
save %c
goto Start

7:
move d
counter add
save %c
goto Start

8:
move w
counter add
save %c
goto Start

9:
move nw
counter add
save %c
goto Start

10:
move s
counter add
save %c
goto Start

11:
move se
counter add
save %c
goto Start

12:
move e
counter add
save %c
goto Start

13:
move e
counter add
save %c
goto Start

14:
move d
counter add
save %c
goto Start

15:
move d
counter add
save %c
goto Start

16:
move d
counter add
save %c
goto Start

17:
move d
counter add
save %c
goto Start

18:
move se
counter add
save %c
goto Start

19:
move ne
counter add
save %c
goto Start

20:
move nw
counter add
save %c
goto Start

21:
move e
counter add
save %c
goto Start

22:
move nw
counter add
save %c
goto Start

23:
move n
counter add
counter add
save %c
goto Start

25:
move se
counter add
save %c
goto Start

26:
move n
counter add
save %c
goto Start

27:
move ne
counter add
save %c
goto Start

28:
move nw
counter add
save %c
goto Start

29:
move sw
counter add
save %c
goto Start

30:
move nw
counter add
save %c
goto Start

31:
move w
counter add
save %c
goto Start

32:
move w
counter add
save %c
goto Start

33:
move nw
counter add
save %c
goto Start

34:
move nw
counter add
save %c
goto Start

35:
move ne
counter add
save %c
goto Start

36:
move n
counter add
save %c
goto Start

37:
move ne
counter add
save %c
goto Start

38:
move nw
counter add
save %c
goto Start

39:
move e
counter set 1
save %c
goto Start

End:
match %s Also here
match StartAt Obvious paths
matchwait

Bobmuhthol
02-18-2004, 04:53 PM
<<23:
move n
counter add
counter add
save %c
goto Start
>>

Is that intentional?

Drew2
02-18-2004, 04:54 PM
I don't understand why you people just don't make things easier on yourself and use variables.

The only way I could test that script out is if I were to run it and I don't know where that is so I can't/won't.

Bobmuhthol
02-18-2004, 04:58 PM
1:
2:
10:
move s
counter add
save %c
goto Start

3:
11:
18:
25:
move se
counter add
save %c
goto Start

4:
5:
6:
29:
move sw
counter add
save %c
goto Start

7:
14:
15:
16:
17:
move d
counter add
save %c
goto Start

8:
31:
32:
move w
counter add
save %c
goto Start

9:
20:
28:
38:
30:
33:
34:
22:
move nw
counter add
save %c
goto Start

12:
13:
21:
39:
move e
counter add
save %c
goto Start

23:
move n
counter add
counter add
save %c
goto Start

20:
27:
35:
37:
move ne
counter add
save %c
goto Start

26:
36:
move n
counter add
save %c
goto Start

Latrinsorm
02-18-2004, 05:05 PM
Originally posted by Bobmuhthol
<<23:
move n
counter add
counter add
save %c
goto Start
>>

Is that intentional? Yeah, uh, I had a little trouble reading the map and putting in the directions (damn heroin) so I had a few extra rooms put in, and instead of going through and renumbering everything I just used multiple counter adds. I suppose I could have used counterset, but eh.

Tayre, it's the Slope near the Mine near Thraks/Mants. What do you mean, variables?

Bob, again; thanks, but you put 39 as a counter add, which is bad, I need it to go back to 1, as it's a circle. But I certainly appreciate the effort.

Bobmuhthol
02-18-2004, 05:09 PM
So take out 39 and change it to

39:
move e
counter set 1
save %c
goto start

Latrinsorm
02-18-2004, 05:18 PM
Ok, when I changed it to your (notably more efficient) setup, Bob, it won't work unless I put a "look" in every room. Is there, like a reason for that, or something?

Bobmuhthol
02-18-2004, 05:23 PM
It's the same exact thing as yours but condensed. Did you take out all the extra spaces the PC adds at the end of every line?

J-Tech
02-18-2004, 05:39 PM
Originally posted by Latrinsorm
(damn heroin)

I had to laugh at that comment, i use to say the same thing when i was so twacked out i was sweating when it was 30 degrees in the room and trieng to figure out something (except i said, (damn gak!)), but my mind would be racing so fast i couldnt really keep focus...lol, memories....

J.T.

[Edited on 2-18-2004 by J-Tech]

Latrinsorm
02-18-2004, 05:43 PM
Haha, nope. Ok. It still doesn't work.

Also, I think I figured out what Tayre meant about variables, but I'm already using %s, is there another variable I can use? edit again: scratch that, it's already in the %c, I can use %s I figger.

edit: I changed the thing where it waits for "You" because it really tweaks out, changed it to "You put".

[Edited on 2-18-2004 by Latrinsorm]

[Edited on 2-18-2004 by Latrinsorm]

Bobmuhthol
02-18-2004, 05:56 PM
Latrinsorm, if my version doesn't work, neither does yours.

Latrinsorm
02-18-2004, 06:03 PM
Originally posted by Bobmuhthol
Latrinsorm, if my version doesn't work, neither does yours. Try 'em if you don't believe me. I don't know what the deal is.

gcstader
02-23-2004, 01:23 AM
If you already used %s you can still define your own variables for a variety of uses. Here' s an example from one of my hunting scripts:

preatt:
setvariable critter slaver
setvariable attacknumber 1

preatt2:
setvariable critter corsair
setvariable attacknumber 2

put stance o
put amb %critter left leg
goto attack%attacknumber

You get the picture...

~Greg / Eldas

Latrinsorm
02-24-2004, 09:25 PM
Hey, is that like a SF only thing? Or can it just not be used for match/goto-ing? Because I've got this:

TPawnsell:
setvariable sheath tboxsell
put go pawn
goto GTPawnsell

GTPawnsell:
put l in my pack
match GTWand wand
match GTLockpick lockpick
match GTAmulet amulet
match GTScroll scroll
match GTpapyrus papyrus
match GTvellum vellum
match GTparchment parchment
match GTpaper paper
match GTring ring
match %sheath leaf
matchwait

Which refuses to work. Yeah, I know they're dumb names, but they're necessary.

Bobmuhthol
02-24-2004, 09:27 PM
Yes, it's part of the eScape engine, not Wizard.

Latrinsorm
02-24-2004, 09:38 PM
Originally posted by Bobmuhthol
Yes, it's part of the eScape engine, not Wizard. Damnation. Is there any way to do what he's talking about with Wizard? Cuz I really need to do something like that.

Bobmuhthol
02-24-2004, 09:48 PM
You can write your own scripting engine.

Otherwise no.

Latrinsorm
02-24-2004, 09:49 PM
fux0r

Artha
02-24-2004, 09:53 PM
Reason #9174.418 that SF is better than the Wizard.

Bobmuhthol
02-24-2004, 09:54 PM
But if you write your own scripting engine the Wizard is much more useful than StormFront.

Glavenfyre
02-24-2004, 10:59 PM
Saw this and it made me think of a script I wrote a while back to level my TWC warrior up when he was new. Can easily be adapted. I used eScape because I wanted setvariable and stormfront did not exist I must give props to bob for streamlining this one, which I did not do.


SetVariable huntstance forward
SetVariable weapon imflass tiger-claw
SetVariable secondweapon glaes tiger-claw
SetVariable sheath greatcloak
SetVariable container greatcloak
SetVariable mobdesc lesser orc
setvariable mobdesc2 goblin
SetVariable mob orc
setvariable mob2 goblin
SetVariable skin orc hide
setvariable skin2 goblin skin
SetVariable pickupitem none

counter set 0

begin:
match dead You are a ghost!
match caught Exp. until next lvl: -
match begin2 much more of this!
match begin2 bell.
match begin2 numbed.
match begin2 muddled.
match begin2 clear.
put look
put exper
matchwait

begin2:
match nodetohunt [Raging Thrak Inn, Party Room]
match furtogem [Dakris's Furs, Front Room]
match gemtobank [Gemcutter's, Front Room]
match banktonode [First Elanith Bank, Teller]
put look
matchwait

main:
pause 1
match caught [Scripting Violation Limbo]
match dead You are a ghost!
match pickupskin %skin%
match pickupskin2 %skin2%
match pickuptourm tourmaline
match pickuptopaz topaz
match pickupopal opal
match pickuplapis lapis
match pickupamulet amulet
match pickupcrysw crystal wand
match pickupcrys crystal
match pickupquarorb quartz orb
match pickupquartz quartz
match pickupspinel spinel
match pickupblood bloodstone
match pickupcoral coral
match pickupameth amethyst
match pickupgem gem
match pickupzir zircon
match pickupjasp jasper
match pickupamb amber
match pickupdiop diopside
match pickupsapp sapphire
match pickupgarn garnet
match killcheck %mobdesc
match killcheck %mobdesc2
match move Obvious paths
match move Obvious exits
put look
matchwait

killcheck:
match move Also here:
match move Also in the room:
match killstuff Obvious paths
match killstuff Obvious exits
put look
matchwait

pickupstuffcheck:
match move Also here:
match move Also in the room:
match getstuff Obvious paths
match getstuff Obvious exits
matchwait

checkexp:
pause 1
put exp
match dead You are a ghost!
match 0tofur much more of this!
match movefrom0cont bell.
match movefrom0cont numbed.
match movefrom0cont muddled.
match movefrom0cont clear.
matchwait


dead:
echo You are dead!
put quit

move:
goto movefrom%c

movefrom0:
goto checkexp

movefrom0cont:
move ne
counter add 1
goto main

movefrom1:
move nw
counter add 1
goto main

movefrom2:
move n
counter add 1
goto main

movefrom3:
move n
counter add 1
goto main

movefrom4:
move ne
counter add 1
goto main

movefrom5:
move n
counter add 1
goto main

movefrom6:
move ne
counter add 1
goto main

movefrom7:
move ne
counter add 1
goto main

movefrom8:
move n
counter add 1
goto main

movefrom9:
move nw
counter add 1
goto main

movefrom10:
move se
counter add 1
goto main

movefrom11:
move n
counter add 1
goto main

movefrom12:
move nw
counter add 1
goto main

movefrom13:
move n
counter add 1
goto main

movefrom14:
move ne
counter add 1
goto main

movefrom15:
move sw
counter add 1
goto main

movefrom16:
move s
counter add 1
goto main

movefrom17:
move se
counter add 1
goto main

movefrom18:
move s
counter add 1
goto main

movefrom19:
move s
counter add 1
goto main

movefrom20:
move sw
counter add 1
goto main

movefrom21:
move sw
counter add 1
goto main

movefrom22:
move s
counter add 1
goto main

movefrom23:
move sw
counter add 1
goto main

movefrom24:
move e
counter add 1
goto main

movefrom25:
move s
counter add 1
goto main

movefrom26:
move sw
counter add 1
goto main

movefrom27:
move sw
counter set 0
goto main



killstuff:
match stopkill chase
match stopkill chasing
match stopkill mine
match killstuff Geez! It's still alive! Not a good time for that.
match killstuff ...wait
match main searched.
match main search
match main I could not find
put mstrike
pause 1
put attack %mob%
put attack %mob2%
pause 4
put skin %mob%
put skin %mob2%
pause 1
put search %mob
put search %mob2
matchwait




pickupskin:
setvariable pickupitem %skin%
goto pickupstuffcheck

pickupskin2:
setvariable pickupitem %skin2%
goto pickupstuffcheck

pickuptourm:
setvariable pickupitem tourmaline
goto pickupstuffcheck

pickuptopaz:
setvariable pickupitem topaz
goto pickupstuffcheck

pickupopal:
setvariable pickupitem opal
goto pickupstuffcheck

pickuplapis:
setvariable pickupitem lapis
goto pickupstuffcheck

pickupcrys:
setvariable pickupitem crystal
goto pickupstuffcheck

pickupcrysw:
setvariable pickupitem crystal wand
goto pickupstuffcheck

pickupquartz:
setvariable pickupitem quartz
goto pickupstuffcheck

pickupspinel:
setvariable pickupitem spinel
goto pickupstuffcheck

pickupblood:
setvariable pickupitem bloodstone
goto pickupstuffcheck

pickupcoral:
setvariable pickupitem coral
goto pickupstuffcheck

pickupamulet:
setvariable pickupitem amulet
goto pickupstuffcheck

pickupameth:
setvariable pickupitem amethyst
goto pickupstuffcheck

pickupgem:
setvariable pickupitem gem
goto pickupstuffcheck

pickupzir:
setvariable pickupitem zircon
goto pickupstuffcheck

pickupjasp:
setvariable pickupitem jasper
goto pickupstuffcheck

pickupamb:
setvariable pickupitem amber
goto pickupstuffcheck

pickupdiop:
setvariable pickupitem diopside
goto pickupstuffcheck

pickupquarorb:
setvariable pickupitem quartz orb
goto pickupstuffcheck

pickupsapp:
setvariable pickupitem sapphire
goto pickupstuffcheck

pickupgarn:
setvariable pickupitem garnet
goto pickupstuffcheck

getstuff:
put stance def
wait
put put my %weapon% in my %sheath%
wait
put get %pickupitem%
wait
put put my %pickupitem% in my %container%
wait
put get my %weapon%
wait
put stance %huntstance%
goto main


depositprofit:
match banktonode You don't have that much!
match depositprofit You deposit
put deposit 500
matchwait

node:
put put my %weapon% in my %sheath%
put put my %secondweapon% in my %container%
pause 600
goto begin

stopkill:
put look
goto move


nodetohunt:
counter set 0
put stance off
put stand
pause 1
put stance %huntstance%
put get my %weapon%
pause 1
put get my %secondweapon%
move go door
move out
move n
move n
move e
move n
move go gate
move sw
move s
move s
move s
move s
move s
move se
move e
move e
move go bridge
move climb bank
goto main

furtogem:
move out
move w
move s
move s
move s
move s
move s
move s
move s
move e
move go shop
put put my %weapon% in my %sheath%
put remove my %container%
put sell my %container%
pause 1
put wear my %container%
put get my %weapon% from my %sheath%
goto gemtobank

gemtobank:
move out
move w
move n
move n
move n
move n
move go bank
move go arch
goto depositprofit


0tofur:
move climb bank
move go bridge
move w
move w
move nw
move n
move n
move n
move n
move n
move ne
move go gate
move s
move go shop
put put my %weapon% in my %sheath%
put remove my %container%
put sell my %container%
pause 1
put wear my %container%
put get my %weapon% from my %sheath%
goto furtogem


banktonode:
move go arch
move out
move n
move go inn
move go door
goto node


caught:

badstart:
echo **********You must start from the Party Room, Bank, Gemshop, or Furier**********

[Edited on 2-25-2004 by Glavenfyre]