What is CMD to an NPC take the item?

Help Topics, Bug Reports, Feature Requests, etc.
Post Reply
User avatar
bround
Rainbow Master
Posts: 641
Joined: Thu Jul 24, 2008 10:55 am

What is CMD to an NPC take the item?

Post by bround » Thu Jun 18, 2009 9:44 am

What is CMD to an NPC take the item?
Also, what do Data1, Data2, Data3, and Data4 do with CMD?
Avid TTR player and TTS developer, a new revolutionary server in works.
User avatar
cbloopy
Rainbow Master
Posts: 612
Joined: Thu Jan 01, 2009 11:21 am

Post by cbloopy » Thu Jun 18, 2009 11:00 am

No such CMD exists. The only way to *simulate* an NPC taking an item is to issue an NPC Move CMD (61) to move to or past the item, and ensure that right before the NPC reaches the item, the NPC steps on a general command button to deactivate or destroy the item.

For details on documented CMDs see Midnight Synergy's Editor reference.

For details on NPC CMDs see this post.
User avatar
bround
Rainbow Master
Posts: 641
Joined: Thu Jul 24, 2008 10:55 am

Post by bround » Thu Jun 18, 2009 7:45 pm

I knew that already! But I need CMD to an NPC take won of your items without move.. I'll look in adventures if i dont get help.
Avid TTR player and TTS developer, a new revolutionary server in works.
User avatar
cbloopy
Rainbow Master
Posts: 612
Joined: Thu Jan 01, 2009 11:21 am

Post by cbloopy » Thu Jun 18, 2009 8:24 pm

Your question was very confusing then, since it sounded like you want an NPC to pick up an item from the level, not to take away an item you already picked up. If you want an NPC to take away something from your inventory, you'll need to use dialog to do so:

http://www.midnightsynergy.com/adventur ... orial5.htm

See the table in the middle of the dialog tutorial, the row that has FN 5.
User avatar
bround
Rainbow Master
Posts: 641
Joined: Thu Jul 24, 2008 10:55 am

Post by bround » Fri Jun 19, 2009 9:18 am

FN 5? Ok. but how to do player got the message (4) then that item is in your bucket. and then message (2) then its not in your bucket? Also ID?
Avid TTR player and TTS developer, a new revolutionary server in works.
User avatar
cbloopy
Rainbow Master
Posts: 612
Joined: Thu Jan 01, 2009 11:21 am

Post by cbloopy » Sun Jun 21, 2009 7:57 pm

Have you ever create a "shopping" dialog? You know, one where the merchant offers a number of things for sale, and if you have enough coins, the merchant will activate the item for you to pick up on the level and take away the number of coins from you? That's Fn 4.

Fn 5 is the same idea except that instead of number of coins, you specify the ID of the item to take away. The item that the player picks up must have an ID so that Fn 5 works. Here's an example:

Say player picks up a custom item with ID=1.

Dialog with some NPC:

interchange 0: Do you have the item?
answer 0: Yes.
Fn 5 FnData 1

interchange 1: Um, you don't actually have the item.
answer 0: Oops
Fn 1 FnData 0

interchange 2: Cool, thanks for the item.
answer 0: You're welcome
Fn 1 FnData 2.

If you start the dialog w/o an item with ID=1, then the Fn 5 will bring you to interchange 1. If you start the dialog w/ the item, then Fn 5 will skip ahead to interchange 2, and the item will be taken away from your inventory.
User avatar
bround
Rainbow Master
Posts: 641
Joined: Thu Jul 24, 2008 10:55 am

Post by bround » Mon Jun 22, 2009 12:19 pm

Thanks! Now I know it. Thanks!!

EDIT: I been. but the item been not take.
Avid TTR player and TTS developer, a new revolutionary server in works.
User avatar
cbloopy
Rainbow Master
Posts: 612
Joined: Thu Jan 01, 2009 11:21 am

Post by cbloopy » Mon Jun 22, 2009 6:44 pm

Make sure you set an ID for the item. That ID shouldn't be -1 for example.

If it's still not working, PM me your level and dialog files and I'll take a look.
User avatar
bround
Rainbow Master
Posts: 641
Joined: Thu Jul 24, 2008 10:55 am

Post by bround » Tue Jun 23, 2009 12:32 pm

Data is FN ID. And FNC need to be 5.
Avid TTR player and TTS developer, a new revolutionary server in works.
User avatar
cbloopy
Rainbow Master
Posts: 612
Joined: Thu Jan 01, 2009 11:21 am

Post by cbloopy » Tue Jun 23, 2009 6:31 pm

bround wrote:Data is FN ID. And FNC need to be 5.
Hmm, I see your confusion.

A custom item's "Fn ID" is not the same as its "ID". To use here you need to set the item's "ID" (not "Fn ID") to match with the Data you use for FNC 5.
User avatar
bround
Rainbow Master
Posts: 641
Joined: Thu Jul 24, 2008 10:55 am

Post by bround » Tue Jun 23, 2009 8:07 pm

I knew it! I mean, ID is not the FN ID. all of custom items have a FN ID.

Well, there a test adventure....
Avid TTR player and TTS developer, a new revolutionary server in works.
User avatar
LittleZbot
Rainbow MegaStar
Posts: 3039
Joined: Fri Jul 03, 2009 10:51 pm
Contact:

Post by LittleZbot » Wed Jul 29, 2009 4:02 am

What if you WANT a Item from a NPC?
User avatar
bround
Rainbow Master
Posts: 641
Joined: Thu Jul 24, 2008 10:55 am

Post by bround » Wed Jul 29, 2009 12:56 pm

LittleZbot wrote:What if you WANT a Item from a NPC?
CMD: 1
Dat1: Item ID
Dat2: 0
Dat3: 0
Dat4: 0
Avid TTR player and TTS developer, a new revolutionary server in works.
User avatar
LittleZbot
Rainbow MegaStar
Posts: 3039
Joined: Fri Jul 03, 2009 10:51 pm
Contact:

Post by LittleZbot » Fri Jul 31, 2009 9:13 pm

Thank you.


Hey, what if you want to deactivate gates by pressing an answer to a dialog? Gates don't have ID!
User avatar
DEEMAN223344
Rainbow MegaStar
Posts: 3145
Joined: Tue Dec 04, 2007 8:07 pm

Post by DEEMAN223344 » Fri Jul 31, 2009 9:21 pm

:lol: :lol: their id is 500* the number of the color. :lol: :D
User avatar
LittleZbot
Rainbow MegaStar
Posts: 3039
Joined: Fri Jul 03, 2009 10:51 pm
Contact:

Post by LittleZbot » Fri Jul 31, 2009 10:23 pm

What if you want different answers to open different gates?
User avatar
Qloof234
Rainbow AllStar
Posts: 4193
Joined: Wed Oct 03, 2007 10:33 pm
Location: Canada

Post by Qloof234 » Fri Jul 31, 2009 11:32 pm

DEEMAN223344 wrote::lol: :lol: their id is 500* the number of the color. :lol: :D
No it isn't, not exactly.

The formula for a gate's ID is:

500 + (5*color value of gate)

and for subcolours:

500 + (5*color value of gate) + (subcolour number (1-4))
Image
User avatar
DEEMAN223344
Rainbow MegaStar
Posts: 3145
Joined: Tue Dec 04, 2007 8:07 pm

Post by DEEMAN223344 » Sat Aug 01, 2009 1:07 am

oops! i was in a hurry!
User avatar
LittleZbot
Rainbow MegaStar
Posts: 3039
Joined: Fri Jul 03, 2009 10:51 pm
Contact:

Post by LittleZbot » Sat Aug 01, 2009 1:18 am

What's the '*5 color value of the gate?'
User avatar
DEEMAN223344
Rainbow MegaStar
Posts: 3145
Joined: Tue Dec 04, 2007 8:07 pm

Post by DEEMAN223344 » Sat Aug 01, 2009 1:20 am

LittleZbot wrote:What's the '*5 color value of the gate?'

the way to deactvate a gate is: the color value of the gate times 5, + 500
User avatar
LittleZbot
Rainbow MegaStar
Posts: 3039
Joined: Fri Jul 03, 2009 10:51 pm
Contact:

Post by LittleZbot » Sat Aug 01, 2009 2:41 am

Thank you all.
User avatar
gameboy991
Rainbow Master
Posts: 710
Joined: Thu Apr 09, 2009 2:44 am

Post by gameboy991 » Wed Aug 05, 2009 11:32 pm

Uh, CAN SOMEONE SPIT THIS OUT IN ACTUAL ENGLISH AND NOT ALL THESE NUMBERS AND SYMBOLS AND LETTERS!?!?!?!?!?!?!?!?
maxnick
Rainbow Master
Posts: 986
Joined: Fri Sep 14, 2007 12:27 am

Post by maxnick » Wed Aug 05, 2009 11:37 pm

Sorry thats in the realm of physical imossibilty! :twisted: :lol:
Uijt jt nz tjhobuvsf.
User avatar
gameboy991
Rainbow Master
Posts: 710
Joined: Thu Apr 09, 2009 2:44 am

Post by gameboy991 » Thu Aug 06, 2009 12:00 am

:cry:
User avatar
bround
Rainbow Master
Posts: 641
Joined: Thu Jul 24, 2008 10:55 am

Post by bround » Thu Aug 06, 2009 7:29 am

gameboy991 wrote:Uh, CAN SOMEONE SPIT THIS OUT IN ACTUAL ENGLISH AND NOT ALL THESE NUMBERS AND SYMBOLS AND LETTERS!?!?!?!?!?!?!?!?
Um, In editor, its NUMBERS!!!!!!!!
Avid TTR player and TTS developer, a new revolutionary server in works.
Post Reply