Log in

View Full Version : Can it be Faster?



StrayRogue
10-10-2004, 04:11 PM
Alright, my current hunting script moves from room to room in a pretty standard way. As it moves to a new room it pauses, then does a check, then, if theres a critter it will attack, if not it will move on etc. Is there a way of making it move and check quicker?

Here is the pertinent script data:

S1:
pause .5
put release
pause 1
put spellup auto
waitfor PsiNet is done spelling you up.
put sw
counter set 2
goto checkroom

S2:
pause 1
put e
counter set 3
goto checkroom

Bobmuhthol
10-10-2004, 04:12 PM
By not pausing.

StrayRogue
10-10-2004, 04:14 PM
If I don't pause it tends to run past critters.

Drew
10-10-2004, 04:24 PM
It's a scripting engine limitation really, the quickest way I've found is to have it do two checks with no pauses in each room.

Latrinsorm
10-10-2004, 05:32 PM
The pause function is exceedingly crappy. I agree with Bob. I don't know why your script would run past creatures without the pause.

BigWorm
10-12-2004, 05:03 AM
Don't use MOVE, use put and WAITFOR [

Then go into you check for critters/people

It'll be like super duper fast

ogurty
10-14-2004, 02:35 AM
1:
counter add 1
put e
match rat a giant rat
match movewait Obvious
matchwait

2:
counter add 1
put e
match rat a giant rat
match movewait Obvious
matchwait

rat:
match movewait Also here
match movewait Also in the room
match kill Obvious
matchwait

movewait:
waitfor paths
goto %c

kill:


you get the idea. it's like speedwalking.

edit. missed a matchwait

[Edited on 10-14-2004 by ogurty]

Deathravin
10-19-2004, 05:39 PM
MoveRoomAddLook:
put look
goto MoveRoomAdd
MoveRoomAddWait:
Waitfor obvious
goto MoveRoomAdd
MoveRoomAdd:
counter add 1
goto MoveRoom%BansheeHuntScriptPos%%c%


HuntRoomCheckLookSet:
SetVariable BansheeHuntScriptPos Hunt
goto HuntRoomCheckLook
HuntRoomCheckSet:
SetVariable BansheeHuntScriptPos Hunt
goto HuntRoomCheck

HuntRoomCheckLookP:
pause 1
HuntRoomCheckLook:
put look
HuntRoomCheck:
Match GenericStandupAdd P>
Match KillBanshee a banshee
Match MoveRoomHunt ...wait
Match MoveRoomAdd Obvious exits:
Match MoveRoomAdd Obvious paths:
Match ComeBackToCenter You can't go there.
Match ComeBackFromGoGo I could not find what you were referring to.
Match GenericCast430 The tingling sensation and sense of security leaves you.
Match ComeBackFrom130 around you.
Match ComeBackFrom130 leaves you.
Match ComeBackFrom130 A dark shadow seems to detach itself from your body, swiftly dissipating into the air.
Match GenericStandupAdd You don't seem to be able to move to do that.
Match GenericStandupAdd You can't do that while laying down.
Match GenericStandupAdd You must be standing to do that.
Match GenericStandupAdd You are still stunned.
Match GenericSignsAdd is no longer effective.
Matchwait


MoveRoomHuntP:
pause 1
HuntGenericSub:
MoveRoomHunt:
goto MoveRoomHunt%c%
MoveRoomHunt1:
put South
goto huntRoomCheck
MoveRoomHunt2:
put South
goto huntRoomCheck
MoveRoomHunt3:
put South
goto huntRoomCheck
MoveRoomHunt4:
put SouthWest
goto huntRoomCheck
MoveRoomHunt5:
put West
goto huntRoomCheck
MoveRoomHunt6:
put North
goto huntRoomCheck
MoveRoomHunt7:
put North
goto huntRoomCheck
MoveRoomHunt8:
put West
goto huntRoomCheck
MoveRoomHunt9:
put Down
goto huntRoomCheck
MoveRoomHunt10:
put Down
goto huntRoomCheck
MoveRoomHunt11:
put Up
goto huntRoomCheck
MoveRoomHunt12:
put Up
goto huntRoomCheck
MoveRoomHunt13:
put East
goto huntRoomCheck
MoveRoomHunt14:
pause 15
goto huntRoomCheckLook
MoveRoomHunt15:
put North
goto huntRoomCheck
MoveRoomHunt16:
put NorthEast
goto huntRoomCheck
MoveRoomHunt17:
Counter set 0
put East
Goto huntRoomCheck

BigWorm
10-19-2004, 09:37 PM
Use the variables more fully and you can tighten your code:


Move1:
Move7:
COUNTER ADD 1
MATCH Start You can't go there.
MATCH Stand You will have to stand up first or crawl there.
MATCH Stand You can't do that while sitting.
MATCH RoomCheck [
PUT north
MATCHWAIT

Move2:
Move6:
Move8:
Move9:
Move10:
COUNTER ADD 1
MATCH Start You can't go there.
MATCH Stand You will have to stand up first or crawl there.
MATCH Stand You can't do that while sitting.
MATCH RoomCheck [
PUT south
MATCHWAIT

See what I'm talking about?

StrayRogue
10-19-2004, 09:39 PM
Thats pretty much how it looks now. I over-hauled the entire thing and it works perfectly. Thanks all.