Author Topic: I need some help with a few dialogue issues.  (Read 1923 times)

Offline Joe

  • Planewalker
  • *****
  • Posts: 582
  • Gender: Male
I need some help with a few dialogue issues.
« on: August 09, 2006, 03:30:14 AM »
Okay, so I want Ellesime to give the player two items. Here is the particular code I am using:

IF ~~ THEN BEGIN 13 // from: 12.1 11.1
  SAY #55250 /* ~There is no reward adequate enough for one who has done so much.  Let us offer, then, the eternal thanks of our people... and an Amulet of the Seldarine to remind you forever that you are welcome here amongst us. I have also taken the liberty of having your sword reforged blah blah~ [ELLESI24] */
  IF ~~ DO ~GiveItemCreate("SCRIBE",Player1,1,0,0) GiveItemCreate("JBELT",Player1,1,0,0)~ GOTO 15 END

Neither of the items are given.

Also, I have created some items for Cromwell. They are not given at the conclusion of the conversations.

Code:

EXTEND_BOTTOM WSMITH01 13
IF ~OR(2)
      PartyHasItem("BRAC10")
      PartyHasItem("BRAC07")~ THEN GOTO PartyHasAtLeastOnePair
END

APPEND WSMITH01
IF ~~ THEN BEGIN PartyHasAtLeastOnePair SAY ~Hm...ye've some nice gauntlets, I see.~
  IF ~PartyHasItem("BRAC10")
      PartyHasItem("BRAC07")~ THEN GOTO PartyHasAllParts
  IF ~OR(2)
      PartyHasItem("BRAC10")
      PartyHasItem("BRAC07")~ THEN GOTO PartyDoesNotHaveAllParts
END

IF ~~ THEN BEGIN PartyDoesNotHaveAllParts SAY ~If ye have the gauntlets of weapon expertise and the gauntlets of dexterity both, I can forge somethin' to make any warrior smile.~
  IF ~~ THEN GOTO MovingRightAlong
END

IF ~~ THEN BEGIN PartyHasAllParts SAY ~With the gauntlets of dexterity and the gauntlets of weapon expertise, I can create for ye what I like t'call 'gauntlets of war'.~
  IF ~~ THEN REPLY ~What would that take?~ GOTO HowMuch
  IF ~~ THEN REPLY ~No, I'm not interested. Is there anything else you can use?~ GOTO MovingRightAlong
END

IF ~~ THEN BEGIN HowMuch SAY ~ It'll cost ye 5,000 gold for me troubles. What d'ye say?~
  IF ~PartyGoldGT(4999)~ THEN DO ~SetGlobal("ForgeItem","GLOBAL",400)
                                  SetGlobal("ForgeStuff","GLOBAL",1)
                                  TakePartyGold(5000)
                                  DestroyGold(5000)~ REPLY ~Yes, let's do it.~ GOTO 56
  IF ~~ THEN REPLY ~No, I'm not interested. Is there anything else you can use?~ GOTO MovingRightAlong
END

IF ~~ THEN BEGIN MovingRightAlong SAY ~Well, let's see what ye've got then.~
  COPY_TRANS WSMITH01 13
END
END

Offline Lu

  • Planewalker
  • *****
  • Posts: 750
  • Gender: Female
Re: I need some help with a few dialogue issues.
« Reply #1 on: August 09, 2006, 11:37:18 AM »
  1) Change the order of transitions in PartyHasAtLeastOnePair block, i.e

IF ~~ THEN BEGIN PartyHasAtLeastOnePair SAY ~Hm...ye've some nice gauntlets, I see.~
  IF ~OR(2)
      PartyHasItem("BRAC10")
      PartyHasItem("BRAC07")~ THEN GOTO PartyDoesNotHaveAllParts
  IF ~PartyHasItem("BRAC10")
      PartyHasItem("BRAC07")~ THEN GOTO PartyHasAllParts
END

  Though I'd rather write the first as

  IF ~OR(2)
      !PartyHasItem("BRAC10")
      !PartyHasItem("BRAC07")~ THEN GOTO PartyDoesNotHaveAllParts

 (which is more logical) or even just

  IF ~~ THEN GOTO PartyDoesNotHaveAllParts

 (as those conditions are already checked in block 13 anyway)
 but it's not critical in this particular situation

  2) Fix the rest



Offline Joe

  • Planewalker
  • *****
  • Posts: 582
  • Gender: Male
Re: I need some help with a few dialogue issues.
« Reply #2 on: August 09, 2006, 11:43:03 AM »
Will a change like that affect whether or not the item is given to the player?

By the way, this is the area code for my upgrades:

IF
  Global("ForgeItem","GLOBAL",400)
  Global("ForgeStuff","GLOBAL",1)
THEN
  RESPONSE #100
      SetGlobal("ForgeStuff","GLOBAL",0)
      TakePartyItem("BRAC10")
      TakePartyItem("BRAC07")
      DestroyItem("BRAC10")
      DestroyItem("BRAC07")
      GiveItemCreate("GOFWAR",PLAYER1,0,0,0) // completed item
      ActionOverride("wsmith01",StartDialogueNoSet([PC]))
END

IF
  Global("ForgeItem","GLOBAL",401)
  Global("ForgeStuff","GLOBAL",1)
THEN
  RESPONSE #100
      SetGlobal("ForgeStuff","GLOBAL",0)
      TakePartyItem("CLCK26")
      TakePartyItem("TARMOR")
      TakePartyItem("SCRL07")
      TakePartyItem("RING34")
      DestroyItem("CLCK26")
      DestroyItem("TARMOR")
      DestroyItem("SCRL07")
      DestroyItem("RING34")
      GiveItemCreate("TREF",PLAYER1,0,0,0) // completed item
      ActionOverride("wsmith01",StartDialogueNoSet([PC]))
END

IF
  Global("ForgeItem","GLOBAL",402)
  Global("ForgeStuff","GLOBAL",1)
THEN
  RESPONSE #100
      SetGlobal("ForgeStuff","GLOBAL",0)
      TakePartyItem("RING39")
      TakePartyItem("MISCAU")
      DestroyItem("RING39") 
      DestroyItem("MISCAU")
      GiveItemCreate("ROV",PLAYER1,0,0,0) // completed item
      ActionOverride("wsmith01",StartDialogueNoSet([PC]))
END

IF
  Global("ForgeItem","GLOBAL",403)
  Global("ForgeStuff","GLOBAL",1)
THEN
  RESPONSE #100
      SetGlobal("ForgeStuff","GLOBAL",0)
      TakePartyItem("PLAT18")
      TakePartyItem("SCRL1F")
      DestroyItem("PLAT18") 
      DestroyItem("SCRL1F")
      GiveItemCreate("dfarmor",PLAYER1,0,0,0) // completed item
      ActionOverride("wsmith01",StartDialogueNoSet([PC]))
END

Offline Lu

  • Planewalker
  • *****
  • Posts: 750
  • Gender: Female
Re: I need some help with a few dialogue issues.
« Reply #3 on: August 11, 2006, 12:06:18 AM »
   I don't think that your .D file will compile, btw. You can't place DO ~blah blah~ before REPLY ~blah blah~, and that's exactly what you did in the first transition in HowMuch

Offline Joe

  • Planewalker
  • *****
  • Posts: 582
  • Gender: Male
Re: I need some help with a few dialogue issues.
« Reply #4 on: August 11, 2006, 05:26:16 AM »
It compiles just fine.

Offline Grim Squeaker

  • Fallen
  • Planewalker
  • *****
  • Posts: 1019
  • Gender: Male
Re: I need some help with a few dialogue issues.
« Reply #5 on: August 11, 2006, 05:37:35 AM »
   I don't think that your .D file will compile, btw. You can't place DO ~blah blah~ before REPLY ~blah blah~, and that's exactly what you did in the first transition in HowMuch

It's technically right, just not the way we usually write it.
"You alone can make my song take flight..."

Offline Joe

  • Planewalker
  • *****
  • Posts: 582
  • Gender: Male
Re: I need some help with a few dialogue issues.
« Reply #6 on: August 11, 2006, 02:11:04 PM »
So is there anything wrong with the part that is supposed to create the item in the character's inventory?

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: