aladarxp Posted February 25, 2010 Share Posted February 25, 2010 OK I created two new items but I am unsure how to place them on a vendor so that my pc can purchase them Link to comment Share on other sites More sharing options...
hdhd Posted February 27, 2010 Share Posted February 27, 2010 You have to create a script(untested!): #include "wrappers_h" void main() { object vendor = GetObjectByTag("store_camp_bodahn"); CreateItemOnObject(R"your_item.uti", vendor); } This would give the vendor in the player camp your_item.uti. Link to comment Share on other sites More sharing options...
aladarxp Posted February 27, 2010 Author Share Posted February 27, 2010 Thank you very much Link to comment Share on other sites More sharing options...
hdhd Posted February 27, 2010 Share Posted February 27, 2010 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. Link to comment Share on other sites More sharing options...
aladarxp Posted February 27, 2010 Author Share Posted February 27, 2010 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, vendor);# i++; Link to comment Share on other sites More sharing options...
hdhd Posted February 27, 2010 Share Posted February 27, 2010 You just have to add more numbers to Item[here the number]. For exampleItem[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. Link to comment Share on other sites More sharing options...
aladarxp Posted February 27, 2010 Author Share Posted February 27, 2010 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 Link to comment Share on other sites More sharing options...
hdhd Posted February 27, 2010 Share Posted February 27, 2010 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? Link to comment Share on other sites More sharing options...
Recommended Posts