Waiting eagerly....
PnP Coins for NWN1
Débuté par
Mad.Hatter
, mai 07 2011 07:14
#26
Posté 27 mai 2011 - 05:19
#27
Posté 27 mai 2011 - 06:12
Greyfort sent me an e-mail where he stated that he didn't crash until 50,000 pounds of coins had been created on the PC. My code allows for creating more than 50,000 pounds, so I assume this is an issue with encumbrance.2da. I will likely be leaving it as is because I can't think of many people who want a legitimate encumbrance system who plan on carrying 50,000 pounds of coin around. Anyone who is knowledgeable to hack the game up enough to carry that much weight can alter that themselves.
Part of the weight code simplification is to make changing the weight of coins a single editable entry. Right now it is 50 per pound, which means the system won't choke until a PC is carrying 50*50,000 = 2,500,000 coins. You could adjust the weight to anything you like and allow for millions of coins possible on a PC (just raising the limit to the NWN2 version's 1,000 per pound would (theoretically) allow 50,000,000 coins on a PC without slowing).
Part of the weight code simplification is to make changing the weight of coins a single editable entry. Right now it is 50 per pound, which means the system won't choke until a PC is carrying 50*50,000 = 2,500,000 coins. You could adjust the weight to anything you like and allow for millions of coins possible on a PC (just raising the limit to the NWN2 version's 1,000 per pound would (theoretically) allow 50,000,000 coins on a PC without slowing).
#28
Posté 28 mai 2011 - 09:51
I created a money changer script, the last issue i seem to be dealing with its the remainder after conversion example: 12 gp into 1 plat wiith 2 gold left over it give pp and 4gp thats 1 bug.
Here is script it stands alone but you do need the pnp no cep mod from this forum, and you need to add a line into the conversation of merchant money changer to trouble shoot it in the mod.
//////////////////////$$$$$$$$$$$$$$$$$$$$$$$$$$$//////////////////////
//
// Greyfort $$$ MONEY CHANGER $$$
//
//////////////////////$$$$$$$$$$$$$$$$$$$$$$$$$$$//////////////////////
// name of your coins
const string sTypeU ="coin";
//-----------------------------------------------
// corrects xtra coin after stack=0
void CheckCoinOverFlow(object oPC=OBJECT_SELF);
void CheckCoinOverFlow(object oPC=OBJECT_SELF)
{
// check for items to remove
object oCoinR =GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oCoinR)==TRUE)
{
if( GetLocalString(oCoinR,"Dstry")=="TRUE")
{
DestroyObject(oCoinR);
}
oCoinR =GetNextItemInInventory(oPC);
}
}
///////////////////[end of function]////////////////////////
//-----------------------------------------------
// changes copper to pp,gp,ep,sp////
void Change_copper(object oPC =OBJECT_SELF);
void Change_copper(object oPC =OBJECT_SELF)
{
string sType=sTypeU;
int ncpStk,ncp2pp1,ncp2pp2,ncp2gp1,ncp2gp2,ncp2ep1,ncp2ep2,ncp2sp1,ncp2sp2;
object oCoin =GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oCoin))
{
//::///////////////////////
//int ncpStk,ncp2pp1,ncp2pp2,ncp2gp1,ncp2gp2,ncp2ep1,ncp2ep2,ncp2sp1,ncp2sp2;
// !! CHECK COPPERS !!
if (GetStringRight(GetTag(oCoin),5)=="coin1" )
{
ncpStk = GetItemStackSize(oCoin);
if( ncpStk >9)
{
// debug
FloatingTextStringOnCreature("Start copper stack="+IntToString(ncpStk)+"",oPC,FALSE);
// give max platinum
if( ncpStk >=1000)
{
ncp2pp1 = ncpStk / 1000;
ncp2pp2 = ncpStk - ( ncp2pp1 * 1000);
ncpStk = ncp2pp2;
SetItemStackSize(oCoin,ncpStk);
CreateItemOnObject("coin_"+sType+"5", oPC, ncp2pp1);
}
// give max gold
if( ncpStk >=100)
{
ncp2gp1 = ncpStk / 100;
ncp2gp2 = ncpStk - ( ncp2gp1 * 100);
ncpStk = ncp2gp2;
SetItemStackSize(oCoin,ncpStk);
CreateItemOnObject("coin_"+sType+"4", oPC, ncp2gp1);
}
// give max electrum
if( ncpStk >=50)
{
ncp2ep1 = ncpStk / 50;
ncp2ep2 = ncpStk - ( ncp2ep1 * 50);
ncpStk = ncp2ep2;
SetItemStackSize(oCoin,ncpStk);
CreateItemOnObject("coin_"+sType+"3", oPC, ncp2ep1);
}
// give max silver
if( ncpStk >=10)
{
ncp2sp1 = ncpStk / 10;
ncp2sp2 = ncpStk - ( ncp2sp1 * 10);
ncpStk = ncp2sp2;
if ( ncpStk >=1 ){
SetItemStackSize(oCoin,ncpStk);}
if ( ncpStk <=0 ){
SetLocalString(oCoin,"Dstry","TRUE");}
CheckCoinOverFlow( oPC);
CreateItemOnObject("coin_"+sType+"2", oPC, ncp2sp1);
}
// debug
FloatingTextStringOnCreature("Finish copper stack="+IntToString(ncpStk)+"",oPC,FALSE);
}
}
// look for more coins
oCoin =GetNextItemInInventory(oPC);
}
}
///////////////////[end of function]////////////////////////
//-----------------------------------------------
// changes silver to pp,gp,ep////
void Change_silver(object oPC =OBJECT_SELF);
void Change_silver(object oPC =OBJECT_SELF)
{
string sType=sTypeU;
int nspStk,nsp2pp1,nsp2pp2,nsp2gp1,nsp2gp2,nsp2ep1,nsp2ep2;
object oCoin =GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oCoin))
{
//::///////////////////////
//int nspStk,nsp2pp1,nsp2pp2,nsp2gp1,nsp2gp2,nsp2ep1,nsp2ep2;
// !! CHECK SILVER !!
if (GetStringRight(GetTag(oCoin),5)=="coin2" )
{
nspStk = GetItemStackSize(oCoin);
if( nspStk >9)
{
// debug
FloatingTextStringOnCreature("Start silver stack="+IntToString(nspStk)+"",oPC,FALSE);
// give max platinum
if( nspStk >=1000)
{
nsp2pp1 = nspStk / 100;
nsp2pp2 = nspStk - ( nsp2pp1 * 100);
nspStk = nsp2pp1;
SetItemStackSize(oCoin,nspStk);
CreateItemOnObject("coin_"+sType+"5", oPC, nsp2pp1);
}
// give max gold
if( nspStk >=100)
{
nsp2gp1 = nspStk / 10;
nsp2gp2 = nspStk - ( nsp2gp1 * 10);
nspStk = nsp2gp2;
SetItemStackSize(oCoin,nspStk);
CreateItemOnObject("coin_"+sType+"4", oPC, nsp2gp1);
}
// give max electrum
if( nspStk >=10)
{
nsp2ep1 = nspStk / 10;
nsp2ep2 = nspStk - ( nsp2ep1 * 10);
nspStk = nsp2ep2;
if ( nspStk >=1 ){
SetItemStackSize(oCoin,nspStk);}
if ( nspStk <=0 ){
SetLocalString(oCoin,"Dstry","TRUE");}
CheckCoinOverFlow( oPC);
CreateItemOnObject("coin_"+sType+"3", oPC, nsp2ep1);
}
// debug
FloatingTextStringOnCreature("Finish silver stack="+IntToString(nspStk)+"",oPC,FALSE);
}
}
// look for more coins
oCoin =GetNextItemInInventory(oPC);
}
}
///////////////////[end of function]////////////////////////
//-----------------------------------------------
// changes electrum to pp,gp////
void Change_electrum(object oPC =OBJECT_SELF);
void Change_electrum(object oPC =OBJECT_SELF)
{
string sType=sTypeU;
int nepStk,nep2pp1,nep2pp2,nep2gp1,nep2gp2;
object oCoin =GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oCoin))
{
//::///////////////////////
//int nepStk,nep2pp1,nep2pp2,nep2gp1,nep2gp2;
// !! CHECK ELECTRUM !!
if (GetStringRight(GetTag(oCoin),5)=="coin3" )
{
nepStk = GetItemStackSize(oCoin);
if( nepStk >1)
{
// debug
FloatingTextStringOnCreature("Start electrum stack="+IntToString(nepStk)+"",oPC,FALSE);
// give max platinum
if( nepStk >=1000)
{
nep2pp1 = nepStk / 20;
nep2pp2 = nepStk - ( nep2pp1 * 20);
nepStk = nep2pp2;
SetItemStackSize(oCoin,nepStk);
CreateItemOnObject("coin_"+sType+"5", oPC, nep2pp1);
}
// give max gold
if( nepStk >=2)
{
nep2gp1 = nepStk / 2;
nep2gp2 = nepStk - ( nep2gp1 * 2);
nepStk = nep2gp2;
if ( nepStk >=1 ){
SetItemStackSize(oCoin,nepStk);}
if ( nepStk <=0 ){
SetLocalString(oCoin,"Dstry","TRUE");}
CheckCoinOverFlow( oPC);
CreateItemOnObject("coin_"+sType+"4", oPC, nep2gp1);
}
// debug
FloatingTextStringOnCreature("Finish electrum stack="+IntToString(nepStk)+"",oPC,FALSE);
}
}
// look for more coins
oCoin =GetNextItemInInventory(oPC);
}
}
///////////////////[end of function]////////////////////////
//-----------------------------------------------
// changes gold to pp////
void Change_gold(object oPC =OBJECT_SELF);
void Change_gold(object oPC =OBJECT_SELF)
{
string sType=sTypeU;
int ngpStk,ngp2pp1,ngp2pp2;
object oCoin =GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oCoin))
{
//::///////////////////////
//int ngpStk,ngp2pp1,ngp2pp2;
// !! CHECK GOLD !!
if (GetStringRight(GetTag(oCoin),5)=="coin4" )
{
ngpStk = GetItemStackSize(oCoin);
if( ngpStk >9)
{
// debug
FloatingTextStringOnCreature("Start gold stack="+IntToString(ngpStk)+"",oPC,FALSE);
// give max platinum
if( ngpStk >=10)
{
ngp2pp1 = ngpStk / 10;
ngp2pp2 = ngpStk - ( ngp2pp1 * 10);
ngpStk = ngp2pp2;
if ( ngpStk >=1 ){
SetItemStackSize(oCoin,ngpStk);}
if ( ngpStk <=0 ){
SetLocalString(oCoin,"Dstry","TRUE");}
CheckCoinOverFlow( oPC);
CreateItemOnObject("coin_"+sType+"5", oPC, ngp2pp1);
}
// debug
FloatingTextStringOnCreature("Finish gold stack="+IntToString(ngpStk)+"",oPC,FALSE);
}
}
// look for more coins
oCoin =GetNextItemInInventory(oPC);
}
}
///////////////////[end of function]////////////////////////
//-----------------------------------------------
// changes gold to pp////
void Change_platinum(object oPC =OBJECT_SELF);
void Change_platinum(object oPC =OBJECT_SELF)
{
string sType=sTypeU;
int nppStk,npp2mn1,npp2mn2;
object oCoin =GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oCoin))
{
//::///////////////////////
//int nppStk,npp2mn1,npp2mn2;
// !! CHECK PLATINUM !!
if (GetStringRight(GetTag(oCoin),5)=="coin5" )
{
nppStk = GetItemStackSize(oCoin);
if( nppStk >999999)
{
// debug
FloatingTextStringOnCreature("Start platinum stack="+IntToString(nppStk)+"",oPC,FALSE);
// give max platinum
if( nppStk >=1000000)
{
npp2mn1 = nppStk / 1000000;
npp2mn2 = nppStk - ( npp2mn1 * 1000000);
nppStk = npp2mn2;
if ( nppStk >=1 ){
SetItemStackSize(oCoin,nppStk);}
if ( nppStk <=0 ){
SetLocalString(oCoin,"Dstry","TRUE");}
CheckCoinOverFlow( oPC);
CreateItemOnObject("mnote", oPC, npp2mn1);
}
// debug
FloatingTextStringOnCreature("Finish platinum stack="+IntToString(nppStk)+"",oPC,FALSE);
}
}
// look for more coins
oCoin =GetNextItemInInventory(oPC);
}
}
///////////////////[end of function]////////////////////////
//////////[ MAIN ]////////
void main()
{
object oPC =GetPCSpeaker();
// set vars
int cpdone,spdone,epdone,gpdone=0;
// check coins
if(cpdone==0 ){ Change_copper(oPC); cpdone=1; }
if(cpdone==1 ){ Change_silver(oPC); spdone=1; }
if(spdone==1 ){ Change_electrum(oPC); epdone=1; }
if(epdone==1 ){ Change_gold(oPC); gpdone=1; }
if(gpdone==1 ){ Change_platinum(oPC); }
//reset vars
cpdone=0;spdone=0;epdone=0;gpdone=0;
///////[ END OF SCRIPT ]///////
}
On another note: I made a work around for the million dollar players...a M-Note no weight worth a milion gp, only thing its lacking is a model files in hak so it looks like a bag of coins when. I also added a creature on death script, and a object open/death script both generate loot droped. I will post mod on valt or give newest version to mad.hatter if he wants to add it to his vault link.
If y'all could look at script and maybe tell me why its not giving me correct change I be much thankful
Here is script it stands alone but you do need the pnp no cep mod from this forum, and you need to add a line into the conversation of merchant money changer to trouble shoot it in the mod.
//////////////////////$$$$$$$$$$$$$$$$$$$$$$$$$$$//////////////////////
//
// Greyfort $$$ MONEY CHANGER $$$
//
//////////////////////$$$$$$$$$$$$$$$$$$$$$$$$$$$//////////////////////
// name of your coins
const string sTypeU ="coin";
//-----------------------------------------------
// corrects xtra coin after stack=0
void CheckCoinOverFlow(object oPC=OBJECT_SELF);
void CheckCoinOverFlow(object oPC=OBJECT_SELF)
{
// check for items to remove
object oCoinR =GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oCoinR)==TRUE)
{
if( GetLocalString(oCoinR,"Dstry")=="TRUE")
{
DestroyObject(oCoinR);
}
oCoinR =GetNextItemInInventory(oPC);
}
}
///////////////////[end of function]////////////////////////
//-----------------------------------------------
// changes copper to pp,gp,ep,sp////
void Change_copper(object oPC =OBJECT_SELF);
void Change_copper(object oPC =OBJECT_SELF)
{
string sType=sTypeU;
int ncpStk,ncp2pp1,ncp2pp2,ncp2gp1,ncp2gp2,ncp2ep1,ncp2ep2,ncp2sp1,ncp2sp2;
object oCoin =GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oCoin))
{
//::///////////////////////
//int ncpStk,ncp2pp1,ncp2pp2,ncp2gp1,ncp2gp2,ncp2ep1,ncp2ep2,ncp2sp1,ncp2sp2;
// !! CHECK COPPERS !!
if (GetStringRight(GetTag(oCoin),5)=="coin1" )
{
ncpStk = GetItemStackSize(oCoin);
if( ncpStk >9)
{
// debug
FloatingTextStringOnCreature("Start copper stack="+IntToString(ncpStk)+"",oPC,FALSE);
// give max platinum
if( ncpStk >=1000)
{
ncp2pp1 = ncpStk / 1000;
ncp2pp2 = ncpStk - ( ncp2pp1 * 1000);
ncpStk = ncp2pp2;
SetItemStackSize(oCoin,ncpStk);
CreateItemOnObject("coin_"+sType+"5", oPC, ncp2pp1);
}
// give max gold
if( ncpStk >=100)
{
ncp2gp1 = ncpStk / 100;
ncp2gp2 = ncpStk - ( ncp2gp1 * 100);
ncpStk = ncp2gp2;
SetItemStackSize(oCoin,ncpStk);
CreateItemOnObject("coin_"+sType+"4", oPC, ncp2gp1);
}
// give max electrum
if( ncpStk >=50)
{
ncp2ep1 = ncpStk / 50;
ncp2ep2 = ncpStk - ( ncp2ep1 * 50);
ncpStk = ncp2ep2;
SetItemStackSize(oCoin,ncpStk);
CreateItemOnObject("coin_"+sType+"3", oPC, ncp2ep1);
}
// give max silver
if( ncpStk >=10)
{
ncp2sp1 = ncpStk / 10;
ncp2sp2 = ncpStk - ( ncp2sp1 * 10);
ncpStk = ncp2sp2;
if ( ncpStk >=1 ){
SetItemStackSize(oCoin,ncpStk);}
if ( ncpStk <=0 ){
SetLocalString(oCoin,"Dstry","TRUE");}
CheckCoinOverFlow( oPC);
CreateItemOnObject("coin_"+sType+"2", oPC, ncp2sp1);
}
// debug
FloatingTextStringOnCreature("Finish copper stack="+IntToString(ncpStk)+"",oPC,FALSE);
}
}
// look for more coins
oCoin =GetNextItemInInventory(oPC);
}
}
///////////////////[end of function]////////////////////////
//-----------------------------------------------
// changes silver to pp,gp,ep////
void Change_silver(object oPC =OBJECT_SELF);
void Change_silver(object oPC =OBJECT_SELF)
{
string sType=sTypeU;
int nspStk,nsp2pp1,nsp2pp2,nsp2gp1,nsp2gp2,nsp2ep1,nsp2ep2;
object oCoin =GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oCoin))
{
//::///////////////////////
//int nspStk,nsp2pp1,nsp2pp2,nsp2gp1,nsp2gp2,nsp2ep1,nsp2ep2;
// !! CHECK SILVER !!
if (GetStringRight(GetTag(oCoin),5)=="coin2" )
{
nspStk = GetItemStackSize(oCoin);
if( nspStk >9)
{
// debug
FloatingTextStringOnCreature("Start silver stack="+IntToString(nspStk)+"",oPC,FALSE);
// give max platinum
if( nspStk >=1000)
{
nsp2pp1 = nspStk / 100;
nsp2pp2 = nspStk - ( nsp2pp1 * 100);
nspStk = nsp2pp1;
SetItemStackSize(oCoin,nspStk);
CreateItemOnObject("coin_"+sType+"5", oPC, nsp2pp1);
}
// give max gold
if( nspStk >=100)
{
nsp2gp1 = nspStk / 10;
nsp2gp2 = nspStk - ( nsp2gp1 * 10);
nspStk = nsp2gp2;
SetItemStackSize(oCoin,nspStk);
CreateItemOnObject("coin_"+sType+"4", oPC, nsp2gp1);
}
// give max electrum
if( nspStk >=10)
{
nsp2ep1 = nspStk / 10;
nsp2ep2 = nspStk - ( nsp2ep1 * 10);
nspStk = nsp2ep2;
if ( nspStk >=1 ){
SetItemStackSize(oCoin,nspStk);}
if ( nspStk <=0 ){
SetLocalString(oCoin,"Dstry","TRUE");}
CheckCoinOverFlow( oPC);
CreateItemOnObject("coin_"+sType+"3", oPC, nsp2ep1);
}
// debug
FloatingTextStringOnCreature("Finish silver stack="+IntToString(nspStk)+"",oPC,FALSE);
}
}
// look for more coins
oCoin =GetNextItemInInventory(oPC);
}
}
///////////////////[end of function]////////////////////////
//-----------------------------------------------
// changes electrum to pp,gp////
void Change_electrum(object oPC =OBJECT_SELF);
void Change_electrum(object oPC =OBJECT_SELF)
{
string sType=sTypeU;
int nepStk,nep2pp1,nep2pp2,nep2gp1,nep2gp2;
object oCoin =GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oCoin))
{
//::///////////////////////
//int nepStk,nep2pp1,nep2pp2,nep2gp1,nep2gp2;
// !! CHECK ELECTRUM !!
if (GetStringRight(GetTag(oCoin),5)=="coin3" )
{
nepStk = GetItemStackSize(oCoin);
if( nepStk >1)
{
// debug
FloatingTextStringOnCreature("Start electrum stack="+IntToString(nepStk)+"",oPC,FALSE);
// give max platinum
if( nepStk >=1000)
{
nep2pp1 = nepStk / 20;
nep2pp2 = nepStk - ( nep2pp1 * 20);
nepStk = nep2pp2;
SetItemStackSize(oCoin,nepStk);
CreateItemOnObject("coin_"+sType+"5", oPC, nep2pp1);
}
// give max gold
if( nepStk >=2)
{
nep2gp1 = nepStk / 2;
nep2gp2 = nepStk - ( nep2gp1 * 2);
nepStk = nep2gp2;
if ( nepStk >=1 ){
SetItemStackSize(oCoin,nepStk);}
if ( nepStk <=0 ){
SetLocalString(oCoin,"Dstry","TRUE");}
CheckCoinOverFlow( oPC);
CreateItemOnObject("coin_"+sType+"4", oPC, nep2gp1);
}
// debug
FloatingTextStringOnCreature("Finish electrum stack="+IntToString(nepStk)+"",oPC,FALSE);
}
}
// look for more coins
oCoin =GetNextItemInInventory(oPC);
}
}
///////////////////[end of function]////////////////////////
//-----------------------------------------------
// changes gold to pp////
void Change_gold(object oPC =OBJECT_SELF);
void Change_gold(object oPC =OBJECT_SELF)
{
string sType=sTypeU;
int ngpStk,ngp2pp1,ngp2pp2;
object oCoin =GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oCoin))
{
//::///////////////////////
//int ngpStk,ngp2pp1,ngp2pp2;
// !! CHECK GOLD !!
if (GetStringRight(GetTag(oCoin),5)=="coin4" )
{
ngpStk = GetItemStackSize(oCoin);
if( ngpStk >9)
{
// debug
FloatingTextStringOnCreature("Start gold stack="+IntToString(ngpStk)+"",oPC,FALSE);
// give max platinum
if( ngpStk >=10)
{
ngp2pp1 = ngpStk / 10;
ngp2pp2 = ngpStk - ( ngp2pp1 * 10);
ngpStk = ngp2pp2;
if ( ngpStk >=1 ){
SetItemStackSize(oCoin,ngpStk);}
if ( ngpStk <=0 ){
SetLocalString(oCoin,"Dstry","TRUE");}
CheckCoinOverFlow( oPC);
CreateItemOnObject("coin_"+sType+"5", oPC, ngp2pp1);
}
// debug
FloatingTextStringOnCreature("Finish gold stack="+IntToString(ngpStk)+"",oPC,FALSE);
}
}
// look for more coins
oCoin =GetNextItemInInventory(oPC);
}
}
///////////////////[end of function]////////////////////////
//-----------------------------------------------
// changes gold to pp////
void Change_platinum(object oPC =OBJECT_SELF);
void Change_platinum(object oPC =OBJECT_SELF)
{
string sType=sTypeU;
int nppStk,npp2mn1,npp2mn2;
object oCoin =GetFirstItemInInventory(oPC);
while (GetIsObjectValid(oCoin))
{
//::///////////////////////
//int nppStk,npp2mn1,npp2mn2;
// !! CHECK PLATINUM !!
if (GetStringRight(GetTag(oCoin),5)=="coin5" )
{
nppStk = GetItemStackSize(oCoin);
if( nppStk >999999)
{
// debug
FloatingTextStringOnCreature("Start platinum stack="+IntToString(nppStk)+"",oPC,FALSE);
// give max platinum
if( nppStk >=1000000)
{
npp2mn1 = nppStk / 1000000;
npp2mn2 = nppStk - ( npp2mn1 * 1000000);
nppStk = npp2mn2;
if ( nppStk >=1 ){
SetItemStackSize(oCoin,nppStk);}
if ( nppStk <=0 ){
SetLocalString(oCoin,"Dstry","TRUE");}
CheckCoinOverFlow( oPC);
CreateItemOnObject("mnote", oPC, npp2mn1);
}
// debug
FloatingTextStringOnCreature("Finish platinum stack="+IntToString(nppStk)+"",oPC,FALSE);
}
}
// look for more coins
oCoin =GetNextItemInInventory(oPC);
}
}
///////////////////[end of function]////////////////////////
//////////[ MAIN ]////////
void main()
{
object oPC =GetPCSpeaker();
// set vars
int cpdone,spdone,epdone,gpdone=0;
// check coins
if(cpdone==0 ){ Change_copper(oPC); cpdone=1; }
if(cpdone==1 ){ Change_silver(oPC); spdone=1; }
if(spdone==1 ){ Change_electrum(oPC); epdone=1; }
if(epdone==1 ){ Change_gold(oPC); gpdone=1; }
if(gpdone==1 ){ Change_platinum(oPC); }
//reset vars
cpdone=0;spdone=0;epdone=0;gpdone=0;
///////[ END OF SCRIPT ]///////
}
On another note: I made a work around for the million dollar players...a M-Note no weight worth a milion gp, only thing its lacking is a model files in hak so it looks like a bag of coins when. I also added a creature on death script, and a object open/death script both generate loot droped. I will post mod on valt or give newest version to mad.hatter if he wants to add it to his vault link.
If y'all could look at script and maybe tell me why its not giving me correct change I be much thankful
#29
Posté 28 mai 2011 - 10:12
Greyfort, are you using the updated version 1.3? I fixed the change issue. I just tested your exact situation in the test module and got the correct change back.
#30
Posté 28 mai 2011 - 10:31
I belive I have the right version from the link in the forums, or the one from the Pm.
The money changer script is a script that changes copper to maxx pp,then gp,then ep,then sp and so on with each coin so players dont have to carry a 50k stack of copper.
I will look again to see if I have correct no cep version.
The money changer script is a script that changes copper to maxx pp,then gp,then ep,then sp and so on with each coin so players dont have to carry a 50k stack of copper.
I will look again to see if I have correct no cep version.
#31
Posté 28 mai 2011 - 11:02
ok i downloaded 1_3 i was able to hold 49000lbs any more[tried to pick up a 50kstck which would have given me 50000lb] crash...the value of coins i collected was 5,275,500gp
MY above money changer script converts coins to there highest value coin type nicer then carrying 5 50k stacks of copper.
The M-Note (million gp) allows players to have 100's of millions with out adding weight.
I will adjust my work to fit the 1-3 version, and send you what I have. I'm sure like my money changer, I feel its a logic[toolset limits or quarks] issue and not a math issue.
MY above money changer script converts coins to there highest value coin type nicer then carrying 5 50k stacks of copper.
The M-Note (million gp) allows players to have 100's of millions with out adding weight.
I will adjust my work to fit the 1-3 version, and send you what I have. I'm sure like my money changer, I feel its a logic[toolset limits or quarks] issue and not a math issue.
#32
Posté 28 mai 2011 - 11:12
Yeah, the only real issue (besides mispackaging) I didn't know about was CreateItemOnObject not creating multiple stacks. The v1.3 coins_inc should create stacks of 50,000 weight objects if iPounds >= 50000... Unusual.
Since you're looking for a more actionny feel, Greyfort. You should try changing the denominator of the weight function to something higher than 50. That would allow you to carry much more coin.
Since you're looking for a more actionny feel, Greyfort. You should try changing the denominator of the weight function to something higher than 50. That would allow you to carry much more coin.
Modifié par Mad.Hatter, 28 mai 2011 - 11:13 .
#33
Posté 01 juin 2011 - 07:33
Here is my latest work for all the millionares out there, I have some RL work so it may be a little while before I can do any more work on them. I am here to answer any questions on what I have done. Mad.Hatter version is incororated into my example but stands alone. If he makes any updates hak files but doesn't change script. The work I have done should work just fine. If he alters script code i will then have to adjust my code, but a small change.
Here is link to nwn vaults:
nwn_vault link:
http://nwvault.ign.c....Detail&id=6171
God Blesss all
Here is link to nwn vaults:
nwn_vault link:
http://nwvault.ign.c....Detail&id=6171
God Blesss all
#34
Posté 03 juin 2011 - 01:03
I have combined my gold encumbrance with the pnp coins, insuring player encumbered by coins, and nwn gold. Take a look it works nice. If a player gets their coin changed to gold they are encumbered, if they get there gold changed to coin they are encumbered. And if perchance they are still weighted down use the gold pouch and it will straiten out your problem. This also allows mod builders to either use pnp coin loot drop or the nwn standard and players to be realistically weighted down by coins. so far no weight crash over load scale for nwn gold is 1lb =1000gp and for pnp coins 1lb=50 coins. This was done so when coins turned into gold at merchants player still weighted, and if someone uses scarfaces banking they can deposit gold, if they got it changed by the money changer. You can see it all in the module.
module name: houndsilver_v11a106 Vault Link:
http://nwvault.ign.c....Detail&id=6171
module name: houndsilver_v11a106 Vault Link:
http://nwvault.ign.c....Detail&id=6171





Retour en haut






