Forum

> > Stranded II > Scripts > Conditions with letters
Forums overviewStranded II overview Scripts overviewLog in to reply

English Conditions with letters

6 replies
To the start Previous 1 Next To the start

old Conditions with letters

Stranded_Guy2910
User Off Offline

Quote
I know I made a thread about it. But I made a big mistake and put it on the mod forum. (can close or delete this one on the mod forum)

The problem is with this script:
1
2
3
4
5
6
7
8
9
10
11
on:use {
     $spell=inputwin("Write your spell",1,"Cancel","Cast the Spell");
     if ($spell=="spell name") {
                     addstate "unit",1,17;
                     msg "Imortal spell casted",4;
                     play "magic.wav";
     }else{
     msg "What you wrote isn't a spell",3;
     speech "negative";
     }
}

The problem is that the script only works when the spell name is a number, but I saw a map using the script to save the variable as a name ( see it here )

Can somebody help me?

old Re: Conditions with letters

Hurri04
Super User Off Offline

Quote
dunno then.

although I'd recommend using s2 cmd dialogue instead since it's very hard to guess the right name for a spell (unless you give a hint). and also it's work to type a spell again and again so the buttons in a dialogue would be better.

old Re: Conditions with letters

Stranded_Guy2910
User Off Offline

Quote
user Hurri04 has written
dunno then.

although I'd recommend using s2 cmd dialogue instead since it's very hard to guess the right name for a spell (unless you give a hint). and also it's work to type a spell again and again so the buttons in a dialogue would be better.


Yes, but the big deal is to go find the spells. Just like: you must create an wilson and talk to him 'till he give you a spell and things like that.

old Re: Conditions with letters

Hurri04
Super User Off Offline

Quote
then make different dialogue pages with combinations for the different enabled spell-buttons and open the related page upon using by checking the conditions.

old Re: Conditions with letters

Stranded_Guy2910
User Off Offline

Quote
user Hurri04 has written
then make different dialogue pages with combinations for the different enabled spell-buttons and open the related page upon using by checking the conditions.


Of course, how could I be so stupid and don't think on it.
Thanks man.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview