TAB - thinBasic Adventure Builder
Would you like to react to this message? Create an account in a few clicks or log in to continue.

TAB - thinBasic Adventure Builder

T.A.B. is an interactive fiction/text adventure program for Windows and made with thinBasic.
 
HomeLatest imagesSearchRegisterLog in
Latest topics
» How was it done? Implementing in-game clocks
Responses I_icon_minitimeToday at 9:54 am by catventure

» How to engage in intelligent conversation with NPCs?
Responses I_icon_minitimeYesterday at 9:01 pm by catventure

» refine player-available gender/name options
Responses I_icon_minitimeMon Nov 18, 2024 6:04 pm by catventure

» Incubation pt 1
Responses I_icon_minitimeSun Nov 17, 2024 4:22 pm by catventure

» Happy New Year 2024!
Responses I_icon_minitimeSun Dec 31, 2023 4:04 pm by catventure

» TAB Version 71
Responses I_icon_minitimeMon Aug 21, 2023 12:17 pm by catventure

» TAB Version 70
Responses I_icon_minitimeSun Oct 02, 2022 1:49 pm by catventure

» TAB Version 70
Responses I_icon_minitimeFri Sep 30, 2022 10:23 pm by catventure

» TAB Version 70
Responses I_icon_minitimeMon May 23, 2022 4:08 pm by catventure


Share | 
 

 Responses

View previous topic View next topic Go down 
AuthorMessage
Kaneb1997
Novice Adventurer


Number of posts : 1
Adventure Points : 1
Registration date : 2010-09-25

Responses Empty
PostSubject: Responses   Responses I_icon_minitimeSun Sep 26, 2010 8:05 pm

Hey all,im new to this whole thing (only started yesterday) so can you please be noob friendly.

My problem is that im want to make a guy that when you talk to him he says go get somthing,then when you talk to him again is does a check to see if u have the item in ur inv,then if u do it removes it and you get a reward,in this case a Knife.

So ive got
[start]talk to weapon dealer#charpresent3#[acts]cmess Weapon Dealer: Hey mate,Sorry but I dont have any weapons in,some idiot stole them.Tell you what if you get me a stick ill give you a Knife.Show me the stick once you get 1.#flag1=1#[end]

then ive got

[start]talk to weapon dealer#charpresent3#flag1=1#check for stick#[acts]cmess Weapon Dealer: So I see you have the stick,ill just take that from you and here is the Knife.#remove stick#add knife[end]

Back to top Go down
catventure
Admin Adventurer
catventure

Male
Number of posts : 410
Age : 72
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 77
Registration date : 2008-06-08

Responses Empty
PostSubject: Re: Responses   Responses I_icon_minitimeMon Sep 27, 2010 8:12 am

Kaneb1997 wrote:
Hey all,im new to this whole thing (only started yesterday) so can you please be noob friendly.

My problem is that im want to make a guy that when you talk to him he says go get somthing,then when you talk to him again is does a check to see if u have the item in ur inv,then if u do it removes it and you get a reward,in this case a Knife.

So ive got
[start]talk to weapon dealer#charpresent3#[acts]cmess Weapon Dealer: Hey mate,Sorry but I dont have any weapons in,some idiot stole them.Tell you what if you get me a stick ill give you a Knife.Show me the stick once you get 1.#flag1=1#[end]

then ive got

[start]talk to weapon dealer#charpresent3#flag1=1#check for stick#[acts]cmess Weapon Dealer: So I see you have the stick,ill just take that from you and here is the Knife.#remove stick#add knife[end]


Hi Kaneb1997,

Welcome to the TAB IF Community.

You are on the right track alright. Where you have put "check for stick" you need to use one of the object check CONDITION eg:
#objlocX=501#
or
#carriedX#
(where X is the object number of the stick; checks player carried inventory to see if that object is being carried)

Where you have put "remove stick" you need to use an object manipulation
ACTION such as:
#destroyX#
or
#objlocX=0#
(where X is object number of stick; removes stick from game)

As "weapon dealer" is 2 words you may need to change it to "dealer" in the Character NOUN field in the Character Editor...
/dealer/

and add "weapon" to the deletions vocabulary...

Where you have put #add knife# in the entry you agian use one of the object ACTIONS eg:
#objlocX=501#
(where X is the object number of the KNIFE... puts the object to the player's carried inventory)

You may also need to check that flag1=0 and amend it to hold a value of 2 when the knife has been handed over...

So your entries would look something like this:

[start]talk to dealer#charpresent3#flag1=0[acts]cmessWeapon Dealer: "Hey mate, Sorry but I dont have any weapons in. Some idiot stole them. Tell you what if you get me a stick I'll give you a Knife. Show me the stick once you get one.#flag1=1[end]

[start]talk to dealer#charpresent3#flag1=1#carriedX[acts]cmessWeapon Dealer: "So I see you have the stick. I'll just take that from you and here is the knife.#destroyX#objlocX=501#flag1=2[end]

[start]talk to dealer#charpresent3#flag1=2[acts]cmessWeapon Dealer: "I have nothing further to say or tell you!"[end]

The third entry triggers if they talk to the dealer AFTER he has given up the knife.. (flag1=2)

Hope this helps.

Let me know, anyway.

Regards,
catventure.
Back to top Go down
https://adventure.forumotion.com
 

Responses

View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
TAB - thinBasic Adventure Builder :: TAB FORUMS :: Adventure Projects-
Jump to: