The Dink Network

Script question: adding an item

October 30th 2002, 02:46 PM
fish.gif
Binirit
Peasant She/Her
 
I want to add an item with no extra features.

Just add item, with an icon, and then, when Dink needs it, load item and talk to someone. But, though I've tried several scripts of the source, it doesn't work: I can't get the item into the inventory by using add_item(), let alone do the rest. What script do I have to use?

October 30th 2002, 02:56 PM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 


add_item("item-sto", 95, 8);

That is a line for giving an item. It should work...
October 30th 2002, 03:13 PM
fish.gif
Binirit
Peasant She/Her
 
: add_item("item-sto", 95, 8);

: That is a line for giving an item. It should work...

Yeah, I know, but to add a new item icon, you have to have a different script. Like "item-sto" should be something else and I can't figure that one out.

October 30th 2002, 05:55 PM
wizardg.gif
Paul
Peasant He/Him United States
 
: I want to add an item with no extra features.

: Just add item, with an icon, and then, when Dink needs it, load item and talk to someone. But, though I've tried several scripts of the source, it doesn't work: I can't get the item into the inventory by using add_item(), let alone do the rest. What script do I have to use?

I'm not quite sure I understand. An item should always have a script IMO, if nothing else it should make Dink say "this is so and so, boy it's ugly." or somesuch, and if made to be compatable with the orginal games items, load Dink's unarmed graphics.

When you say "load item and talk to someone" do you mean you want the game to automatically select the item? Or the player would? There's no good way to do the former.

If it's the icon you're having trouble with, all there is to it is giving the correct sequence and frame number of the graphic you want, it's not connected to the script at all. You could for example give Dink a longsword with a potion graphic (or the reverse).
October 30th 2002, 09:07 PM
fish.gif
: : add_item("item-sto", 95, 8);

: :  That is a line for giving an item. It should work...

: Yeah, I know, but to add a new item icon, you have to have a different script. Like "item-sto" should be something else and I can't figure that one out.

If I understood what you were saying, you want to use a new item icon that is not in the original Dink, then you can do 2 things.

One is to copy all original Dink icon graphics into your graphics subdir and name your new icon in the same way. Do not have any gap in the numbering.

The other way is to define a new unused series in Dink.ini, and use the series and sequence number in

add_item("item-sto", series_number, sequence_number);

If this is not what you asked, please clarify it more.
October 31st 2002, 01:49 PM
fish.gif
Binirit
Peasant She/Her
 
Thanks for the tips. I experimented some more and now I do get the item into the inventory, but I can't get it out of it.

I wrote a script with the add_item() procedure, but I still don't know what script to use for the item. Something like "item-sto", but I don't know what. I used "item-fst" and then I get the item into the inventory, but not out of it by using kill_item(). But "item-fst" is the wrong script since it's about an armed item, and I need a non armed item. What's this "item-sto"?

I want that the player has to load the item first before he talks to someone who needs the item.

Hope you can help me.