PDA

View Full Version : I'm not so great when it comes to scripting...



LeftOverForGood
03-18-2007, 07:03 PM
So here's my questions.

Is there a way in SF for a script to have the action set to a particular item's arrival but include the descriptor in the script response?

What I mean is this. If I set my hunting script for waitfor troll and a thunder troll shows up, is there some nifty way I can make the script understand that it's a thunder troll and input that into the game?

Like:

Script running..

A <insert troll kind> arrives.

Script inputs this:

You swing a tiny sword at a thunder troll.

A <different troll kind> arrives.

You swing a tiny sword at a stone troll.

If this is possible, can the same action be done when I enter a new room and the troll shows up in the room description?


Another question about pickpocketing.

Is SF smart enough to be instructed to automatically steal from any player entering the room? Without having to input that specific player's name?

Jobob arrives.

You reach over and pocket 2 cents from JoBob.

BobbyJo arrives.

You reach over and pocket 2 cents from Bobbyjo.

Sorry if I'm not quite clear about what I'm wanting to do, but I've never created more than a simple movement script.

Bobmuhthol
03-18-2007, 07:07 PM
No, not with StormFront. You need a separate script engine. The two that I have experience with, JSE and Lich, can do that very, very easily. JSE requires Wizard, I'm pretty sure Lich works with SF. You'd have to ask someone else about it since I pretty much stopped programming and quit GS, though.

LeftOverForGood
03-18-2007, 07:13 PM
Thanks for the response Bob.

So, with that answer, anyone familiar with Lich able to help me cobble something?

On second thought, first I need to figure out how to actually run Lich...

Vizy
03-18-2007, 07:20 PM
Lich (http://lich.sudolife.com) comes with it's own set of scripts. Including a repository, so you can look at other peoples scripts and hack together your own.

It's also got an installer, which makes it very easy to setup, and runs in RUBY.. which you can find various websites with tons of information on to assist you in coding your own from scratch.

Bob is correct, it does run in SF and Wizard.