Author Topic: An NPC or placeable to exchange one type of item for another.  (Read 965 times)

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
An NPC or placeable to exchange one type of item for another.
« Reply #30 on: September 04, 2011, 12:23:42 am »


                The line line in your main script where I had: 

if(!nMaxStack) Get2DAString("baseitems","Stacking",GetBaseItemType(oItem));

'Posted Oops.   I never placed the value whee it needed to go.   change it to.

if(!nMaxStack) nMaxStack = StringToInt(Get2DAString("baseitems","Stacking",GetBaseItemType(oItem)));

Sorry about that.  Im going to edit the other post also.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
An NPC or placeable to exchange one type of item for another.
« Reply #31 on: September 04, 2011, 12:33:49 am »


               @ffbj:  I think his starting condition is still
  
     object oPC = GetPCSpeaker();
    // Custom Function that returns the # of a particular item
    // (included stack counts) that the PC has on them
    int nCount = GetIemCount(oPC, sItemTagName);
    if (nCount >= nRequired && GetGold(oPC) >= nGoldRequired)
    { return TRUE; }
    else
    { return FALSE; }
.........

with the config stuff above it to define the vars.  
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
An NPC or placeable to exchange one type of item for another.
« Reply #32 on: September 04, 2011, 12:35:24 am »


               Yeah I should have figured you guys had it covered.
               
               

               
            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0
An NPC or placeable to exchange one type of item for another.
« Reply #33 on: September 04, 2011, 12:46:20 am »


               Thank you Light, I will give that a try. Guess I will test it locally first though before putting it on the server (I should know better by now lol.)
               
               

               
            

Legacy_Lazarus Magni

  • Hero Member
  • *****
  • Posts: 1837
  • Karma: +0/-0
An NPC or placeable to exchange one type of item for another.
« Reply #34 on: September 04, 2011, 03:20:13 am »


               Tested locally, and live, looks like this is all good now. TYVM all!
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
An NPC or placeable to exchange one type of item for another.
« Reply #35 on: September 04, 2011, 03:51:06 am »


               welcome.