PDA

View Full Version : Psinet options and SF scripts



Kinslar
05-21-2009, 06:29 PM
In a lot of my scripts I look in bags to determine what is there. I found that the baggage options of PsiNet do not work with those scripts. So I have to turn those options off. Is there a way to turn those options on / off within a SF script?

Would love to be able to leave the options on for general play.

Allereli
05-21-2009, 06:32 PM
I used baggage commands all the time with SF scripts, especially for alchemy. Can you post an example?

Kinslar
05-21-2009, 06:38 PM
For example this SF code


trydisk:
SETVARIABLE lockcontainer kinslar disk
SETVARIABLE lockstep trydisk
match gotcoffer coffer
match gottrunk trunk
match gotstrong strongbox
match gotbox box
match gotchest chest
match nothing nothing in there
match nothing you see
match nothing could not find
put look in %lockcontainer
MATCHWAIT


if the baggage options in PsiNet are enabled the boxes will not match properly.

Without PsiNet baggage options (unchecked) you see:


In the forest green backpack you see a a skinning knife, a copper lockpick, a rock crystal, a clear topaz, some polished black coral, a rat hide badge, a black crystal, a small crystalline cylinder, a crystal amulet, a black crystal, a crystal amulet, a rations kit, a dingy gold ring, some acantha leaf, an exquisite gold ring, some ambrominas leaf and a crystal amulet.

With PsiNet enabled you see:


In the forest green backpack you see a a skinning knife, a copper lockpick, a rat hide badge, a small crystalline cylinder, a rations kit and the following:
3 Gems: some polished black coral, a rock crystal, a clear topaz
7 Magic: a crystal amulet (x3), a black crystal (x2), a dingy gold ring, an exquisite gold ring
2 Herbs: some acantha leaf, some ambrominas leaf

The SF script above will only match off items that are in the first list (before "and the following"). Everything listed after will not work for match commands.

Donquix
05-21-2009, 06:47 PM
working fine for me with a little script i made to test



SETVARIABLE lockbackp my backpack
match chest chest
match box box
put look in %lockbackp
matchwait

box:
echo BOX FOUND
exit

chest:
echo CHEST FOUND

>.checker
[Script checker is running, Esc to cancel, Shift-Esc to pause]
setVariable: lockbackp=my backpack
>look in my backpack
In the dirty sailcloth backpack you see a a short sword, a solid moonstone cube and the following:
4 Boxes: an engraved silver chest, a scratched wooden chest, a scratched haon coffer, an enruned monir trunk
CHEST FOUND
[script done]

Khariz
05-21-2009, 07:01 PM
Just change all instances of the word "look" in script to the work "llook" with two Ls

That bypasses the feature.

Allereli
05-21-2009, 07:18 PM
Just change all instances of the word "look" in script to the work "llook" with two Ls

That bypasses the feature.

good call

Kinslar
05-22-2009, 01:05 AM
Just change all instances of the word "look" in script to the work "llook" with two Ls

That bypasses the feature.

Excellent tip thanks!

Kinslar
05-22-2009, 01:06 AM
working fine for me with a little script i made to test
>.checker
[Script checker is running, Esc to cancel, Shift-Esc to pause]
setVariable: lockbackp=my backpack
>look in my backpack
In the dirty sailcloth backpack you see a a short sword, a solid moonstone cube and the following:
4 Boxes: an engraved silver chest, a scratched wooden chest, a scratched haon coffer, an enruned monir trunk
CHEST FOUND
[script done]

Thank you for testing that. Will have to look closer at my script. Maybe I mis-attributed the error I received.

Kinslar
06-03-2009, 01:13 AM
After further testing on my side it looks like the option that kills my scripts is "Sort Items into categories".

Drunken Durfin
06-03-2009, 01:37 AM
Just change all instances of the word "look" in script to the word "llook" with two Ls

That bypasses the feature.

I had no idea. This solves MANY problems with some of my Lich scripts. Thanks much.

JamusPsi
06-03-2009, 03:46 AM
Your problem was that you were using "you see" as a 'none of the above' match. Because the boxes were on a lower line, 'you see' appeared first and so you were going to "nothing".

In my own scripts I usually use POW just as an 'end of baggage' message if I want to access specific categories (I find it handy, sometimes, to let baggage sorting help me out by breaking out a list of gems for the script). Or, as mentioned, I use LLOOK, which means 'long look'- it disables the sorting feature for the next container seen.

You can also disable the feature entirely in Baggage Options, as mentioned. It's handy for people, less handy for scripts, frequently.

Jamus