PDA

View Full Version : Skinning script help



phantasm
10-02-2008, 01:44 PM
#(Skinning Script)
MATCH RottingChimera a rotting chimera that appears dead
MATCH NecroticSnake a necrotic snake that appears dead
put look
MATCHWAIT

NecroticSnake:
save snake
goto SKIN
RottingChimera:
save chimera
goto SKIN

SKIN:
put ready 2weapon
waitfor You remove
put store weapon
waitfor You put
put kneel
waitfor You kneel

MATCH Skinned You skinned
MATCH Botched You botched
MATCH Botched You cannot
MATCH TryAgain You might
put skin %s
MATCHWAIT

TryAgain:
MATCH Skinned You skinned
MATCH Botched You botched
MATCH DONE You cannot
put skin other %s
MATCHWAIT

Skinned:
put stow right
waitfor You put
put stand
waitfor You stand
put ready weapon
waitfor You remove
put put dagger in my cloak
goto DONE

Botched:
put stand
waitfor You stand
put ready weapon
waitfor You remove
put put dagger in my cloak
goto DONE


DONE:
EXIT

phantasm
10-02-2008, 01:45 PM
The script never gets past the first MATCHWAIT, whats wrong with those matches? Is the text too long?

Drunken Durfin
10-02-2008, 02:23 PM
try changing this:

MATCH RottingChimera a rotting chimera that appears dead
MATCH NecroticSnake a necrotic snake that appears dead
put look
MATCHWAIT

to this:

put look
MATCH RottingChimera a rotting chimera that appears dead
MATCH NecroticSnake a necrotic snake that appears dead
MATCHWAIT

AnticorRifling
10-02-2008, 02:28 PM
Correct. It can't match what it never sees. You've got to look, then match.

phantasm
10-02-2008, 03:00 PM
I think I've tried that. The other sets of MATCHWAIT work with it in that order. Anything else it could be?

SolitareConfinement
10-02-2008, 03:28 PM
Correct. It can't match what it never sees. You've got to look, then match.


incorrect the only thing that matters is where the matchwait is placed because it's at the matchwait that it decides what to do, such as goto this one or goto that one or wait for one i can goto (atleast its how i understand it). hence the need for a matchwait also i use this code for my barrier script and it works just fine:


match MyHouse 's Home
match Gobarrier a round marble fountain
match OnDais Hanging Gardens
match GoDucts granite sentinels reach toward the sky
match GoPortal steps descending from the floor
put look
matchwait



ALTHOUGH i can see where coding the script in such a manner could be buggy. the only thing i can think of is maybe you have something misspelled, or perhaps the char you're physically using the script on has some sort of room desc setting that isn't set to full perhaps?

CrystalTears
10-02-2008, 03:33 PM
or perhaps the char you're physically using the script on has some sort of room desc setting that isn't set to full perhaps?
Yeah, if you have it set to brief room descriptions, creatures don't appear dead. I believe you'll see a rotting chimera (dead).

phantasm
10-02-2008, 03:40 PM
You can spread MATCH statements all through the script, each time text is received that matches, that match is set to TRUE. When the script comes to a MATCHWAIT statement, it pops the MATCH statements back off the queue and executes on the first true one it finds. The MATCH queue is then clear until more MATCH statements are executed. Its actually odd that this type works:



put look
MATCH RottingChimera a rotting chimera that appears dead
MATCH NecroticSnake a necrotic snake that appears dead
MATCHWAIT


The reason it works is that the script execution goes much faster than receiving text back from the game. If somehow you could slow the script down to a snails pace, I'd bet that form wouldn't work.

I still can't get this script to match the first set.

CrystalTears
10-02-2008, 03:43 PM
Just out of curiosity, why are you focusing on a skinning script for specific creatures, instead of a generic one to skin/search anything?

phantasm
10-02-2008, 04:00 PM
I intend for this one to be a generic skinning script. I don't want it to search as that might interfere with bounties. I also don't want to use arguments.

Morrff
10-02-2008, 04:16 PM
Match the creature dying, and from there execute the get knife, kneel, skin critter, stow skin, stow knife etc...Or you can try and look each time, in which case a Macro would be just as easy...

AnticorRifling
10-02-2008, 04:22 PM
incorrect the only thing that matters is where the matchwait is placed because it's at the matchwait that it decides what to do, such as goto this one or goto that one or wait for one i can goto (atleast its how i understand it). hence the need for a matchwait also i use this code for my barrier script and it works just fine:


match MyHouse 's Home
match Gobarrier a round marble fountain
match OnDais Hanging Gardens
match GoDucts granite sentinels reach toward the sky
match GoPortal steps descending from the floor
put look
matchwait



ALTHOUGH i can see where coding the script in such a manner could be buggy. the only thing i can think of is maybe you have something misspelled, or perhaps the char you're physically using the script on has some sort of room desc setting that isn't set to full perhaps?
Yeah that makes sense I always had the look or whatever at the front of it so I thought it had to be that way.

Drunken Durfin
10-02-2008, 05:49 PM
.
I still can't get this script to match the first set.

Then something is wrong with what you are trying to MATCH to. Is there a space in your MATCH string after the word "dead" or something?

Some Rogue
10-02-2008, 05:53 PM
SKIN:
put ready 2weapon
waitfor You remove
put store weapon
waitfor You put
put kneel
waitfor You kneel


Aren't you trying to ready your second weapon before stowing the first here?

phantasm
10-02-2008, 06:24 PM
#(Skinning Script)
MATCH RottingChimera a rotting chimera that appears dead
MATCH NecroticSnake a necrotic snake that appears dead
put look
MATCHWAIT


I changed this as follows. And it worked to skin a troll when there was a cudgel on the ground.



#(Skinning Script)
MATCH RottingChimera a rotting chimera that appears dead
MATCH NecroticSnake a necrotic snake that appears dead
MATCH TROLL cudgel
put look
MATCHWAIT



So the problem must be with the text I'm trying to match. Ahhh, just as I was typing this I had a revelation. MONSTERBOLD. It must be having problems because of the color codes. So...the question now is how do I match color codes?

phantasm
10-02-2008, 06:28 PM
I'm going to be using this with a runestaff using empath. I have it pull the dagger into my left hand, then store the runestaff. Am I correct that having an empty hand, and kneeling will yield the best skins? Does stance matter? Dagger in left or right matter?

phantasm
10-02-2008, 06:56 PM
I got working by turning monsterbold to off before I look...this is kinda stupid...how do I match the monsterbold colors? Are they regular ansi color codes? How are they escaped...I don't remember how to connect with telnet so rather than work on that..I'll just ask here.

Some Rogue
10-02-2008, 07:00 PM
I'm going to be using this with a runestaff using empath. I have it pull the dagger into my left hand, then store the runestaff. Am I correct that having an empty hand, and kneeling will yield the best skins? Does stance matter? Dagger in left or right matter?

I don't believe stance, empty hand or kneeling matter. However, if you have the dagger in the left hand, you have to tell it to skin with the dagger or it's going to try to skin with the empty right hand.

Some Rogue
10-02-2008, 07:07 PM
Apparently stance does still matter according to Krakiipedia.

Successfully extracting a skin and the value of the skin is determined by a character's training in First Aid (http://www.krakiipedia.org/wiki/First_Aid) and Survival (http://www.krakiipedia.org/wiki/Survival), the weapon used, whether or not the character is kneeling (http://www.krakiipedia.org/w/index.php?title=Kneeling&action=edit), the character's dexterity (http://www.krakiipedia.org/wiki/Dexterity), and how difficult the creature is to skin.


Of course, this also leaves out wounds and scars which effect it too.

Drunken Durfin
10-03-2008, 12:16 PM
I got working by turning monsterbold to off before I look...this is kinda stupid...how do I match the monsterbold colors? Are they regular ansi color codes? How are they escaped...I don't remember how to connect with telnet so rather than work on that..I'll just ask here.

What front end are you using? I have never had any colors or monsterbold have any affect whatsoever with any of my scripts (and I have a LOT). This is all starting to sound a lot like the argument for Spontaneous Generation.

phantasm
10-03-2008, 03:25 PM
I'm using wizard front end, and its true it cannot match it with the monsterbold on. its working great if I turn monsterbold off at the start of the script. I think the script see's the character codes, so I would have to match something like...

]7mnecrotic snake that appears dead.

I'm not sure what the actual color codes are.

CrystalTears
10-03-2008, 03:43 PM
Personally if the script doesn't work with monsterbold on, it needs to be fixed. I can't imagine having that off.

Morrff
10-03-2008, 03:59 PM
Yeah I'm with Durfin and CT...I have hundreds of scripts working with Wizard FE + Lich. I've never had to turn monsterbold off to have a script function properly.

CrystalTears
10-03-2008, 04:05 PM
I'm not even sure why you want to reinvent the wheel. It's not like you're incorporating something unusual. Hell I do all that in a macro. There are dozens of existing skinning scripts out there that work with monsterbold. Find one and use it.

Drunken Durfin
10-03-2008, 04:29 PM
Here is my never fail skinning script.


Skin:
PUT Stance defensive
PUT put mattock in my har
WAITFOR you put
PUT get my knife
WAITFOR You slip
PUT kneel
WAITFOR You
PUT skin %1
PUT put knife in my other sheath
WAITFOR You slip
PUT get my mattock
PUT search %1

Stand:
PUT stand
MATCH Stood You are already standing.
MATCH Stand ...wait
MATCH Stood You stand back up.
MATCH Stand You struggle, but fail to stand.
MATCH Stand You struggle to stand, but end up falling over.
MATCHWAIT

Stood:
exit

You said that you didn't want to use arguments though, so here is my "Kill, skin and search" routine for a Dissembler. No arguments. Does more than you want, but is easily cut down.


Dissembler:
PUT stance offensive

DissemblerSwing:
PUT ambush diss head
MATCH SkinDissembler and goes still
MATCH SkinDissembler collapses to the floor
MATCH SkinDissembler face before expiring
MATCH SkinDissembler already dead
MATCH DissemblerSwing Roundtime
MATCHWAIT

SkinDissembler:
PUT Stance defensive
PUT put mattock in my har
WAITFOR you put
PUT get my knife
WAITFOR You remove a
PUT kneel
WAITFOR You
PUT skin diss
PUT put knife in sheath
WAITFOR You put a
PUT get my mattock
PUT search diss

StandDissembler:
PUT stand
MATCH StoodDissembler You are already standing.
MATCH StandDissembler ...wait
MATCH StoodDissembler You stand back up.
MATCH StandDissembler You struggle, but fail to stand.
MATCH StandDissembler You struggle to stand, but end up falling over.
MATCHWAIT

StoodDissembler:
PUT get claw
WAITFOR claw
PUT put claw in my sat
EXIT

phantasm
10-03-2008, 07:26 PM
Yah my script is working good except for that weirdness with monsterbold. I like being able to just type .skin, and it will pick a dead thing and skin it. Plus its easy to just add another match for other things I need it to skin. Thanks for the help. You also reminded me I need to double check that I actually did stand.

I'm going to do some more experimenting with the monsterbold problem tonight.

Going to test these matches:

(1)MATCH snake
(2)MATCH necrotic snake
(3)MATCH necrotic snake that

I imagine 1 and 2 will work without regard to monsterbold setting, and that 3 will not work with monsterbold on. Here is why.

This is something similiar to text that gets sent form the game server:

[33mnecrotic snake [0mthat appears dead

So if 1 and 2 work, but 3 doesn't work with monsterbold. It would mean that the first color code gets truncated before it goes to the script engine but the second gets proccessed in the match. Or I might be complete off on this. Any input regarding the monsterbold problem would be appreciated.

Drunken Durfin
10-04-2008, 11:47 AM
Any input regarding the monsterbold problem would be appreciated.

Seriously, has ANYONE ever experienced this issue? None of my wizard or SF scripts have ever had a problem with monsterbold. This can't be the cause of your script not working.

phantasm
10-04-2008, 02:18 PM
I've been doing some research, its a common issue with monsterbold.

Morrff
10-05-2008, 06:35 PM
I've been playing and writing scripts for wizard FE since 94-95 and I've never had a problem nor heard of anyone running into a problem with the monsterbold

phantasm
10-05-2008, 09:44 PM
The problem was the monster bold. I solved it by turning the monster bold off. Here is the working script.



#(Skinning Script)
put monsterbold off
MATCH RottingChimera a rotting chimera that appears dead
MATCH NecroticSnake a necrotic snake that appears dead
put look
MATCHWAIT

NecroticSnake:
save snake
goto SKIN
RottingChimera:
save chimera
goto SKIN

SKIN:
put ready 2weapon
waitfor You remove
put store weapon
waitfor You put
put kneel
waitfor You kneel

MATCH Skinned You skinned
MATCH Botched You botched
MATCH Botched You cannot
MATCH TryAgain You might
put skin %s
MATCHWAIT

TryAgain:
MATCH Skinned You skinned
MATCH Botched You botched
MATCH DONE You cannot
put skin other %s
MATCHWAIT

Skinned:
put stow right
waitfor You put
put stand
waitfor You stand
put ready weapon
waitfor You remove
put put dagger in my cloak
goto DONE

Botched:
put stand
waitfor You stand
put ready weapon
waitfor You remove
put put dagger in my cloak
goto DONE


DONE:
put monsterbold on
EXIT