I'm interested in creating some merchants that will sell only to PCs that have a specific class, race, or alignment.
Can anyone suggest a basic script that will accomplish the task (or at least point me in the right direction)?
Thanks in advance for any advice.
Merchant Script based on class/Alignment/Race
Débuté par
Badwater
, oct. 27 2010 06:20
#1
Posté 27 octobre 2010 - 06:20
#2
Posté 27 octobre 2010 - 01:29
This should determine if the char has one or more levels in the required class and open the store.
if(GetLevelByclass(class_TYPE, OBJECT_CREATURE) >= 1)OpenStore(STORE, OBJECT_CREATURE);
Of course you would have to fill in the class type, the object which is usally oPC, the store tag, and critter again.
if(GetLevelByclass(class_TYPE, OBJECT_CREATURE) >= 1)OpenStore(STORE, OBJECT_CREATURE);
Of course you would have to fill in the class type, the object which is usally oPC, the store tag, and critter again.
#3
Posté 27 octobre 2010 - 01:31
Race:
if(GetRacialType(OBJECT_CREATURE) == RACIAL_TYPE) OpenStore(STORE, OBJECT_CREATURE);
if(GetRacialType(OBJECT_CREATURE) == RACIAL_TYPE) OpenStore(STORE, OBJECT_CREATURE);
#4
Posté 27 octobre 2010 - 01:33
Alignment:
if(GetAlignmentGoodEvil(OBJECT_CREATURE) == ALIGNMENT_EVIL) OpenStore(STORE, OBJECT_CREATURE);
Could use GetAlignmentLawChaos instead of the good/evil on also.
if(GetAlignmentGoodEvil(OBJECT_CREATURE) == ALIGNMENT_EVIL) OpenStore(STORE, OBJECT_CREATURE);
Could use GetAlignmentLawChaos instead of the good/evil on also.
#5
Posté 27 octobre 2010 - 02:07
Huh, the vault is being odd and not displaying the pages I was looking for. So hopefully these links will work for you.
Bedlamson's Dynamic Merchants System by Bedlamson
http://nwvault.ign.c...361276850.shtml
That one has some very neat stuff in it plus it will "clean" out the shop inventory. I don't honestly remember if it does all three that you are looking for and I can't check cause the vault is being wonky for me right now.
Alignment, class and Level Based Generic Shop Script
http://nwvault.ign.c...d=20023&id=3770
This one won't do the racial stuff, but it will handle class and alignment. The script is reusable across multiple shop merchants. If you know how to script, the code is fairly well documented so you could add in the racial restriction as well.
*grins and noogies Baragg*
Good luck Badwater.
-- Mistress
Bedlamson's Dynamic Merchants System by Bedlamson
http://nwvault.ign.c...361276850.shtml
That one has some very neat stuff in it plus it will "clean" out the shop inventory. I don't honestly remember if it does all three that you are looking for and I can't check cause the vault is being wonky for me right now.
Alignment, class and Level Based Generic Shop Script
http://nwvault.ign.c...d=20023&id=3770
This one won't do the racial stuff, but it will handle class and alignment. The script is reusable across multiple shop merchants. If you know how to script, the code is fairly well documented so you could add in the racial restriction as well.
*grins and noogies Baragg*
Good luck Badwater.
-- Mistress
#6
Posté 27 octobre 2010 - 03:24
~grins at the Lass~ Thanks sweetie.
#7
Posté 27 octobre 2010 - 04:37
Many thanks to both of you. I will noodle around with this tonight and tomorrow and post the scripting that I come up with after testing.
#8
Posté 01 décembre 2010 - 09:45
I like the Dynamic merchants very much and I'm putting them to good use. I'm also using them in conjunction with Baragg's suggestions in conversation, which adds some nice nuances. Thanks again!
#9
Posté 17 décembre 2010 - 12:04
*smiles* Glad it is working out for you Badwater.





Retour en haut






