Author Topic: Lvl based shop?  (Read 1009 times)

Legacy_Genisys

  • Hero Member
  • *****
  • Posts: 961
  • Karma: +0/-0
Lvl based shop?
« Reply #15 on: August 17, 2010, 03:09:57 pm »


               

Who said that I wrote...

What I do wonder though, since its basicly only Appraise check, would it also like lock for example holy items from heathens? Making sure that only thieves or gangs can buy stolen goods?


You check appraise only once, when the store opens, and all said items in the store would be at a discounted price, and of course they could sell "approved" items at a higher price as well, you set this up...


Now, as far as limiting WHO can access what, again, it's simply a matter of determining WHO can open the store in the first place...

Now if you really want to get realistic, you should create a seperate NPC for each store, in a town preferrably, maybe have mutliple NPCs in a temple, for your temple items... which each NPC would then appraise the person they are speaking to, to determine what they should say, e.g.

What do you want heathern?    //TextAppearsWhen - It's not a cleric or druid?

By all the gods, why I never!  [end dialogue]  //  - get lost PC..

Hello there brother/sister how can I help you this day?  //it's a Cleric the clergy is talking with..

I am in desperate need of some potions //for the potion store.. (if the PC is say X level)
I need to see some basic items //for low level clerics
I need to see some finer items // for medium level clerics..
I need to see some church items // for cleric specific weapons & gear.. //cleric levels required..

Do you see where this is going?
               
               

               
            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
Lvl based shop?
« Reply #16 on: August 17, 2010, 03:24:44 pm »


               yes I do.

So basically you need a merchant with about 3 or 4 conversation bars so the PC can choose which one he wants to look at and if the PC has the allignment/class  or whatever for it  + level the store of that lvl will open correct?
               
               

               
            

Legacy_Genisys

  • Hero Member
  • *****
  • Posts: 961
  • Karma: +0/-0
Lvl based shop?
« Reply #17 on: August 17, 2010, 03:56:05 pm »


               yes, but the only place you error is, they won't see the line at all unless they "qualify" you determine who is qualified to read each one, therefore, under TextAppearsWhen, for the LINE (highlight the line you wish to use a script on), in the white box, place the TextAppearsWhen script..

You can use the default bioware wizard to create these, as they are rather trivial to create...
essentiallly, you will want to create it something like so...

int StartingConditional()
{
 object oPC = GetPCSpeaker();  
 
 int i;   //The variable we will be checking..
 i = FALSE; //Always return false (dont' show the line) if the PC isn't qualified..

 if(GetHitDice(oPC) >= 10)  //if the PC is level 10 or higher...
 {
   i = TRUE;   //Show the line in the conversation..
 }

return i;
}

We will replace  if(GetHitDice(oPC) >= 10)  with other functions to do different kinds of checks...

For Example...

      // if the PC has at least 20 Skill Ranks in Appraise... (With Bonuses)
     // use TRUE instead of FALSE (To see if the player has 20 Base Ranks - with no bonuses)
      if(GetSkillRank(SKILL_APPRAISE, oPC, FALSE) >=20) 
     {
       i = TRUE;
     }

or..

//For Multiple Checks... just use multiple conditionals...
     if(GetLevelByclass(class_TYPE_CLERIC, oPC)>=1) //if the PC is a Cleric..
     {
         i = TRUE;
     }
     //If the PC is a Druid & at least level 10 or higher...
     if(GetLevelByclass(class_TYPE_DRUID, oPC)>=1 && GetHitDice(oPC) >=10)
     {
         i = TRUE;
     }

Is this the kind of help you were looking for?
               
               

               


                     Modifié par Genisys, 17 août 2010 - 03:08 .
                     
                  


            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
Lvl based shop?
« Reply #18 on: August 17, 2010, 04:34:01 pm »


               sort of, script doesnt sound too hard.



But what about the IRL ini file? I still didnt get that part....
               
               

               
            

Legacy_Genisys

  • Hero Member
  • *****
  • Posts: 961
  • Karma: +0/-0
Lvl based shop?
« Reply #19 on: August 17, 2010, 08:05:23 pm »


               

Genisys wrote...

in the nwnplayer.ini file...

change this:    ItemLevelRestrictions=0

To this:  ItemLevelRestrictions=1


               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Lvl based shop?
« Reply #20 on: August 17, 2010, 09:48:47 pm »


               lol,  It sounds like Genisys, Is once again going to have you creating a store for every option.  Givining you 40 stores for every level the PC can be.  Also the IRL will not stop a player from buying anything from a stroe like you wanted.  It will only stop them from useing the items reguardless of where they got them from. In order to set the IRL if you wanted to. It is easier to just click the Item Level Restriction  check box when the server is running.  



Ill start working on some scripts In case you are still interested in the system I suggested.
               
               

               
            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
Lvl based shop?
« Reply #21 on: August 18, 2010, 05:10:14 am »


               yes yes I do Lightfoot8!

thank you so much! Sometimes I seem so lost in scripting XD
               
               

               
            

Legacy_Genisys

  • Hero Member
  • *****
  • Posts: 961
  • Karma: +0/-0
Lvl based shop?
« Reply #22 on: August 18, 2010, 01:58:04 pm »


               Of course there are other ways of going about achieving what she wanted, I'll not deny that, and my recommendation may not be the most complex, however it would serve the need, though maybe not in an efficient manner, it would work none the less..  (just because they can't access the items in the store, doesn't mean their other character's cant buy the item, and that's my point, ILR is not the best of solutions either, scripting is the best option by far..)



I'd think the best way to handle this whole thing, would be to spawn the items into the store base upon conditions (When the Conversation Starts), so make like X Placeable Objects (with inventories), which hold items for each class, and then give the items a resref or tagname based upon the level of the item maybe?, to achieve a more dynamic result, we could do the Appraise Skill Check and adjust the price of the store as well based upon the results, which would in turn give you a more dynamic control over the whole thing, without all the frustrations, one script, one simple solution..



The PC wouldn't be able to purchase anything you didn't want them purchasing... And if you wanted to prevent transferring, just script it so the item is associated with the PC buying the item, meaning if they bought it, they can't just give it away... (Though they could resell it..)  All you'd have to do is change the tagname to the PC's name (or the likes) and check when the item is Acquired.. if the name of the PC isn't the same as the tagname, kill the item..



WARN YOUR PLAYERS BEFORE HAND< before you implement any special systems, that way they don't complain to you excessively about item loss or anything other grievance you place upon them, whether intentional or not....



I may not be the smartest or best scripter or builder, but that doesn't mean I'm a bad one either...
               
               

               
            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
Lvl based shop?
« Reply #23 on: August 18, 2010, 02:40:23 pm »


               you are not a bad scripter dude XD The information you gave me really taught me a lot '<img'>

especially seeing how green I am in this, I can actually feel my brain grow '<img'>
               
               

               
            

Legacy_Genisys

  • Hero Member
  • *****
  • Posts: 961
  • Karma: +0/-0
Lvl based shop?
« Reply #24 on: August 19, 2010, 12:29:19 am »


               I assume you mean me?  (if I helped I'm more than happy, thanks for the compliment)
               
               

               


                     Modifié par Genisys, 18 août 2010 - 11:29 .
                     
                  


            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
Lvl based shop?
« Reply #25 on: August 19, 2010, 04:47:01 am »


               yes you have helped me understand it a bit more and no problem for the compliment XD.

am just very interested in the system that lightfoot8 was talking about XD
               
               

               


                     Modifié par Who said that I, 19 août 2010 - 04:18 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Lvl based shop?
« Reply #26 on: August 19, 2010, 04:33:32 pm »


               Yes, I have been a bit slow in working on it.  Hopefully I will have some time today when i get home from work.



I am however think that the level of the item sold in the store is going to be handled by the script im writing.  



For the restriction of goods per class or other. It would be best to place them is a store of there oven and use Genisys system to open the seperate stores in the conversation.  



Ill try and get the script for the level restricted good ASAP
               
               

               
            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
Lvl based shop?
« Reply #27 on: August 19, 2010, 04:37:38 pm »


               ok, well I will try to work this all out, thank you all so much for helping me!

If it werent for you guys I would have gotten my own white padded rooms and my own white straight-jacket without coffee spots on it!
               
               

               
            

Legacy_Genisys

  • Hero Member
  • *****
  • Posts: 961
  • Karma: +0/-0
Lvl based shop?
« Reply #28 on: August 19, 2010, 06:07:27 pm »


               lol, without the coffee spots..

I'm still laughing 10 minutes later...

(NOTE: OP, I"m not laughing at you, I'm laughing with you.... as I'm an avid coffee drinker too, and I know the frustrations of scripting myself as well.)

It's because I can totally relate to what your saying, that's why I was laughing so hard...
               
               

               


                     Modifié par Genisys, 19 août 2010 - 11:03 .
                     
                  


            

Legacy_Who said that I

  • Hero Member
  • *****
  • Posts: 931
  • Karma: +0/-0
Lvl based shop?
« Reply #29 on: August 21, 2010, 06:41:39 am »


               yes, still need to learn a lot. and me always trying to make something new and interesting never helps. (it also doesnt help that I am basically the only scripter of the server)

So any help is appreciated.'<img'>