OK I created two new items but I am unsure how to place them on a vendor so that my pc can purchase them
how do u place items in a vendor
Started by
aladarxp
, Feb 25 2010 09:59 PM
7 replies to this topic
#1
Posted 25 February 2010 - 09:59 PM
#2
Posted 27 February 2010 - 12:49 PM
You have to create a script(untested!):
[codebox]
#include "wrappers_h"
void main()
{
object vendor = GetObjectByTag("store_camp_bodahn");
CreateItemOnObject(R"your_item.uti", vendor);
}
[/codebox]
This would give the vendor in the player camp your_item.uti.
[codebox]
#include "wrappers_h"
void main()
{
object vendor = GetObjectByTag("store_camp_bodahn");
CreateItemOnObject(R"your_item.uti", vendor);
}
[/codebox]
This would give the vendor in the player camp your_item.uti.
#3
Posted 27 February 2010 - 05:21 PM
Thank you very much
#4
Posted 27 February 2010 - 07:54 PM
I made a much better script (original script by joshimoo). This one checks if an item was already added to the merchant.
Here's a small tutorial:
1. Create a plot named quickitem000pl_main.
2. Insert a main flag with the name QUICKITEM_ADDED to your plot.
3. Create a script (the name doesn't matter) and paste everything from http://de.pastebin.ca/1814267 in your script.
4. Rename the items in the script.
5. Compile and export the script.
6. Finished.
Here's a small tutorial:
1. Create a plot named quickitem000pl_main.
2. Insert a main flag with the name QUICKITEM_ADDED to your plot.
3. Create a script (the name doesn't matter) and paste everything from http://de.pastebin.ca/1814267 in your script.
4. Rename the items in the script.
5. Compile and export the script.
6. Finished.
#5
Posted 27 February 2010 - 08:54 PM
lets say i want to add more than one item to the vendor I just add more to this?
#
Item[00]=R"your_item1.uti";
#
Item[01]=R"your_item2.uti";
or would i have to add them to
#
int i = 0; <----- not understanding that this part does other than it is item[00]
#
while (i < GetArraySize(Item))
#
{
#
CreateItemOnObject(Item[i], vendor);
#
i++;
#
Item[00]=R"your_item1.uti";
#
Item[01]=R"your_item2.uti";
or would i have to add them to
#
int i = 0; <----- not understanding that this part does other than it is item[00]
#
while (i < GetArraySize(Item))
#
{
#
CreateItemOnObject(Item[i], vendor);
#
i++;
#6
Posted 27 February 2010 - 10:16 PM
You just have to add more numbers to Item[here the number]. For example
Item[00]=R"gen_im_acc_rng_exp.uti";
Item[01]=R"gen_im_qck_book_formari.uti";
Item[02]=R"prm000im_wolf_charm.uti";
Item[03]=R"prm000im_gm_belt.uti";
...
Everytime you add a new item you just have to add Item[number]=R"Item name";
int i = 0 is just a variable which after each itemadd adds 1 (i++
until there aren't any items to add.
Item[00]=R"gen_im_acc_rng_exp.uti";
Item[01]=R"gen_im_qck_book_formari.uti";
Item[02]=R"prm000im_wolf_charm.uti";
Item[03]=R"prm000im_gm_belt.uti";
...
Everytime you add a new item you just have to add Item[number]=R"Item name";
int i = 0 is just a variable which after each itemadd adds 1 (i++
#7
Posted 27 February 2010 - 10:20 PM
I am having problems I crated the item and the script and the plot but when i export everything and create the dazip and install it to my game I don't see the weapons on the vendor
#8
Posted 27 February 2010 - 10:59 PM
Have you changed in Manage Modules --> YOUR_ADDON --> Properties --> Script --> modules_core to YOUR_SCRIPT? If you have done this and it still doesn't work try adding some debug things to find the issue. For instance DisplayFloatyMessage(GetHero(),"DEBUG: IT WORKS!",FLOATY_MESSAGE,0xFFFF00,5.0); before object vendor = GetObjectByTag("store_camp_bodahn");. But I don't think that I made a mistake in the code. Maybe you've done something wrong with the plots. Have you exported them?



Sign In
Create Account
Back to top








