How do I add items to an existing merchant?
#1
Posté 10 décembre 2009 - 11:38
Does anyone know how to add an item to a merchant, for example adding a Grandmaster Spell Resist rune or a custom item to Bodahn?
#2
Posté 10 décembre 2009 - 11:50
oNearestStores = GetNearestObjectByTag(GetHero(), "store_camp_bodahn", OBJECT_TYPE_STORE, TRUE); if(GetArraySize(oNearestStores) == 0) return; oNearbyStore = oNearestStores[0]; if(oNearbyStore == OBJECT_INVALID) return; CreateItemOnObject(R"gen_im_upg_cry_gdm_dwe.uti", oNearbyStore, 1);
Or something-ish, in case I forgot something while copy-pasting.
Modifié par Phaenan, 10 décembre 2009 - 11:50 .
#3
Posté 10 décembre 2009 - 11:55
Edit: Follow-up: How do you add to a mob's droplist?
Modifié par KigenBarzhad, 10 décembre 2009 - 11:56 .
#4
Posté 11 décembre 2009 - 12:33
#5
Posté 11 décembre 2009 - 12:38
#6
Posté 11 décembre 2009 - 12:47
There are included in that pastie.
And if that's not the issue at hand, well, won't be able to guess much without a look at the very code rejected by the compiler. ^_~
#7
Posté 11 décembre 2009 - 12:49
Thank you =)
Say for instance I want to add an item to another store's NPC... say one of the dwarves in Orzammar what do I do?
Modifié par KigenBarzhad, 11 décembre 2009 - 12:50 .
#8
Posté 11 décembre 2009 - 12:58
That my module/addin/wtvr has to load on that map to take effect other wise it fails (sorta).
#9
Posté 11 décembre 2009 - 01:08
KigenBarzhad wrote...
Say for instance I want to add an item to another store's NPC... say one of the dwarves in Orzammar what do I do?
Basically you need its tag, and probably the area tag/ID in order to properly choose when to look for the store tag.
For instance store_orz200cr_figor for the "Figor's Imports" store in the area orz220ar_shop/1340.
You can get those details by using a few utility scripts while in-game (like a simple GetNearestObject and a displayfloatymessage) or - I suppose - by digging through the SP campaign ERF packages.
Yep. But a script can't do much outside the current area : only the objects from the current area are loaded in the memory at a given time. Hopefully.That my module/addin/wtvr has to load on that map to take effect other wise it fails (sorta).
Modifié par Phaenan, 11 décembre 2009 - 01:09 .
#10
Posté 11 décembre 2009 - 02:47
#11
Posté 12 décembre 2009 - 02:24
Modifié par KigenBarzhad, 12 décembre 2009 - 03:09 .
#12
Posté 12 décembre 2009 - 02:25
Modifié par KigenBarzhad, 12 décembre 2009 - 03:09 .
#13
Posté 12 décembre 2009 - 03:08
Edit: Accidently triple post... my internet is finicky
Modifié par KigenBarzhad, 12 décembre 2009 - 03:09 .
#14
Posté 12 décembre 2009 - 07:41
I just downloaded the toolset and am a newbie and this code below doesn't mean anything to me yet =)
Phaenan wrote...
oNearestStores = GetNearestObjectByTag(GetHero(), "store_camp_bodahn", OBJECT_TYPE_STORE, TRUE); if(GetArraySize(oNearestStores) == 0) return; oNearbyStore = oNearestStores[0]; if(oNearbyStore == OBJECT_INVALID) return; CreateItemOnObject(R"gen_im_upg_cry_gdm_dwe.uti", oNearbyStore, 1);





Retour en haut






