Jump to content


Photo

Checking for stats


  • Please log in to reply
5 replies to this topic

#1 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 16 June 2004 - 10:22 AM

Perhaps my last coding problem, cause thanks to my dedicated debugger we have crumbled at lot of problems (I think, cause I still need to check by playing the mod). I have stuff where I want to let the stats of the player come into account. I try to program it like this (see last line).:

IF ~~ THEN BEGIN myfate
  SAY ~Come on, gods can even die. I am sure they can take over a toy of another god if they want it for themselves.~
  IF ~~ THEN REPLY ~I don't like to be seen as a toy of gods. I rather have nothing to do with Bhaal or Cyric.~ GOTO difopinion
  IF ~~ THEN REPLY ~I don't like be called a toy, but I'm affraid that you might be right. That I'm a toy, but I'm not sure what to do about that.~ GOTO greypath
  IF ~~ THEN REPLY ~I am no toy of the gods and I shall prove that!~ GOTO okayend
  IF ~~ THEN REPLY ~I'm a son of a god, not just a mere toy. If I must be called a toy, then I am a prize winning one.~ GOTO okayend
  IF ~~ THEN REPLY ~You are right, it doesn't matter anyway. We are all pawns in the gods hands, but I will make myself a grand pawn indeed. And I couldn't care less whoes son I need to be in order to do that.~ GOTO happyend
  IF ~(PLAYER1,13,INT)~ THEN REPLY ~Technically, they only died in the Times of Trouble, when they were made mortal. So gods in their god-form are immortal. At least we think them to be immortal, perhaps there is a way, but no one knows it.~ GOTO detail
  IF ~~ THEN EXIT
END


I don't know where I got the idea from, but someone told me. However if install at this moment it fails and the debug files says he doesn't understand the command (PLAYER1,13,INT).

Is there another way to script this? Or am I just overlooking something here?

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#2 Rastor

Rastor

    Yes, I really am a dragon. Yes, I am a jerk. Live with it.

  • Member
  • 2001 posts

Posted 16 June 2004 - 10:49 AM

Change to:

IF ~~ THEN BEGIN myfate
  SAY ~Come on, gods can even die. I am sure they can take over a toy of another god if they want it for themselves.~
  IF ~~ THEN REPLY ~I don't like to be seen as a toy of gods. I rather have nothing to do with Bhaal or Cyric.~ GOTO difopinion 
  IF ~~ THEN REPLY ~I don't like be called a toy, but I'm affraid that you might be right. That I'm a toy, but I'm not sure what to do about that.~ GOTO greypath 
  IF ~~ THEN REPLY ~I am no toy of the gods and I shall prove that!~ GOTO okayend
  IF ~~ THEN REPLY ~I'm a son of a god, not just a mere toy. If I must be called a toy, then I am a prize winning one.~ GOTO okayend
  IF ~~ THEN REPLY ~You are right, it doesn't matter anyway. We are all pawns in the gods hands, but I will make myself a grand pawn indeed. And I couldn't care less whoes son I need to be in order to do that.~ GOTO happyend
  IF ~CheckStatGT(Player1,13,INT)THEN REPLY ~Technically, they only died in the Times of Trouble, when they were made mortal. So gods in their god-form are immortal. At least we think them to be immortal, perhaps there is a way, but no one knows it.~ GOTO detail
  IF ~~ THEN EXIT
END

What you need to change is in bold. [edit]Never mind. Can't bold things in the [code=auto:0] headings. The commands are CheckStat(Whoever,Value,Stat) for exact amounts. Add GT (for greater than) and LT (for less than) to check ranges.

BTW, what's with the IF ~~ THEN EXIT? All that's going to do is end the dialogue and not allow any replies.

Edited by Rastor, 16 June 2004 - 10:51 AM.

Home of Kitanya, Improved Asylum, more...

Posted Image

#3 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 17 June 2004 - 04:19 AM

whoops, Thank you about the IF ~~ THEN EXIT thingy

And my debugger and I disagree on something. Does the following work?

CHAIN
  IF ~Global("upsetkorgansc","LOCALS",0)
  InParty("Korgan")
  See("Korgan")
  Global("upsetkorganfirst","LOCALS",1)
  !StateCheck("Korgan",STATE_SLEEPING)~ THEN BKIDO deedo
  ~Oempa loempa, dample dee do
I've you are smart you would do as I do
And if society doesn't like what ya do, then make that society fall
Like I did with them all!~
DO ~SetGlobal("upsetkorgansc","LOCALS",1)~
== BKORGAN
~I be raising me axe!~
END
IF ~~ THEN REPLY ~No Korgan! We need Kido! And I rather like his singing.~ GOTO lastwarning
IF ~~ THEN REPLY ~Kido be quiet! And Korgan put your axe away!~
IF ~~ THEN REPLY ~As much as I love a good fight Korgan. Ya better leave Kido alive. He might be useful.~ GOTO lastwarning
== BKORGAN
IF ~~ THEN BEGIN lastwarning
SAY ~Ya be lucky bard, but as soon as <CHARNAME> be protecting ye no more. I be cutting your tongue out!~
EXIT


I got the idea from someone here on the forum aswell, but my debugger says you cannot have your PC reply in a chain? Any comments on this?

[edit] Better to say is this possible or must I delete the lastwarning part of Korgan or must I append KorganJ and how should I code this? Cause I really want to let the player reply

Edited by Deathsangel, 17 June 2004 - 04:27 AM.

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#4 Deathsangel

Deathsangel

    Living on Wings of Dreams

  • Modder
  • 3089 posts

Posted 17 June 2004 - 04:26 AM

CHAIN
  IF ~Global("Aerieprank","LOCALS",0)
  InParty("Aerie")
  See("Aerie")
  !StateCheck("Aerie",STATE_SLEEPING)~ THEN BKIDO hurtaerie
  ~So Aerie, you lost your wings?~
DO ~SetGlobal("Aerieprank","LOCALS",1)~
== BAERIE
~Yes, but I would rather not talk about it.~
== BKIDO
~That is a shame.~
== BAERIE
~Yes it is.~
== BKIDO
~No that is not why meant. I meant it is a shame you didn't magically loose them while you were flying. It would have made an awesome spectacle!~
== BAERIE
~What? I wouldn't have thought that anyone could be so cruel.~
END
IF ~~ THEN REPLY ~Kido, how could you?!~
IF ~~ THEN REPLY ~You better place your... unique sense of humour somewhere else, Kido.~
IF ~~ THEN REPLY ~Well said Kido!~
EXIT


This is the other one

Still modding the Mod for the Wicked... It is a big project you know... And I got sidetracked (several times) a bit... sorry.
However, as we all know, Evil never really sleeps.


Sentences marking (my) life:

Winds of change... Endure them, and in Enduring grow Stronger
It takes a fool to look for logic in a man's heart
Never question the sanity of the insane
The Harmony of Life is Chaos
Living on Wings of Dreams



(1st march 2009) SHS women over me:
Kat: if there were more guys that looked like you out here, people's offspring wouldnt be so damn ugly
Noctalys: you are adorable :P

~~ I love it, and I am humbled! Yay! ~~


#5 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 17 June 2004 - 04:58 AM

CHAIN
  IF ~Global("upsetkorgansc","LOCALS",0)
  InParty("Korgan")
  See("Korgan")
  Global("upsetkorganfirst","LOCALS",1)
  !StateCheck("Korgan",STATE_SLEEPING)~ THEN BKIDO deedo
  ~Oempa loempa, dample dee do
I've you are smart you would do as I do
And if society doesn't like what ya do, then make that society fall
Like I did with them all!~
DO ~SetGlobal("upsetkorgansc","LOCALS",1)~
== BKORGAN
~I be raising me axe!~
END
IF ~~ THEN REPLY ~No Korgan! We need Kido! And I rather like his singing.~ EXTERN BKorgan lastwarning
IF ~~ THEN REPLY ~Kido be quiet! And Korgan put your axe away!~ EXTERN BKorgan lastwarning
IF ~~ THEN REPLY ~As much as I love a good fight Korgan. Ya better leave Kido alive. He might be useful.~ EXTERN BKorgan lastwarning

APPEND BKORGAN
IF ~~ THEN BEGIN lastwarning
SAY ~Ya be lucky bard, but as soon as <CHARNAME> be protecting ye no more. I be cutting your tongue out!~
IF ~~ THEN EXIT
END
END

I got the idea from someone here on the forum aswell, but my debugger says you cannot have your PC reply in a chain? Any comments on this?

[edit] Better to say is this possible or must I delete the lastwarning part of Korgan or must I append KorganJ and how should I code this? Cause I really want to let the player reply

If Lastwarning is in Korgan's banter file, you should use EXTERN BKorgan lastwarning instead of GOTO lastwarning. Your second reply line needs a GOTO or an EXTERN as well.

If you use PC replies in a CHAIN then you don't follow them with an EXIT.

#6 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 17 June 2004 - 05:00 AM


CHAIN
  IF ~Global("Aerieprank","LOCALS",0)
  InParty("Aerie")
  See("Aerie")
  !StateCheck("Aerie",STATE_SLEEPING)~ THEN BKIDO hurtaerie
  ~So Aerie, you lost your wings?~
DO ~SetGlobal("Aerieprank","LOCALS",1)~
== BAERIE
~Yes, but I would rather not talk about it.~
== BKIDO
~That is a shame.~
== BAERIE
~Yes it is.~
== BKIDO
~No that is not why meant. I meant it is a shame you didn't magically loose them while you were flying. It would have made an awesome spectacle!~
== BAERIE
~What? I wouldn't have thought that anyone could be so cruel.~
END
IF ~~ THEN REPLY ~Kido, how could you?!~
IF ~~ THEN REPLY ~You better place your... unique sense of humour somewhere else, Kido.~
IF ~~ THEN REPLY ~Well said Kido!~
EXIT


This is the other one

Your replies all need a transition (GOTO OR EXTERN or EXIT). Get rid of that final EXIT after the replies.