icecreamassassin Posted September 11, 2011 Share Posted September 11, 2011 ok, so I have this insane little script I;m working on which converts bank notes (paper currency) into gold when you are in dialog mode, and then converts it back when you are done. So thus far it works great. I can go to the banker, exchange some gold for bank notes, then when I talk to anyone while I have bank notes, the value of the notes is added to my gold count, and the notes are removed. Then when you leave the conversation, the notes are replaced and your gold count reduced. Problem #1 this works fine EXCEPT that the same amount which was converted from notes to gold isn't being converted back from gold to notes. You still have exactly the total value of money that you should have, no spontaneous replication or degradation of funds, but the script doesn't seem to run through the bill replacement cycles accurately. Problem #2 I then go back to anyone and talk to them and my gold does not increase by the bank note value and the notes are not removed. Essentially the script is dead after the first use. I believe the state variables are set properly and being progressed right but obviously not. Maybe someone else can see what I'm missing. I am guessing that there is some problem with the state progression, or somehow the CRWRKTTL variable is not being cycled down in value accurately when the dialog menu is ended. It DOES cycle, but it seems to drop below a value of 5 before the converted bank notes are all replaced. (granted the denominations are not the same every time, and that's fine). the state problem though is keeping me from testing it further because I can't repeat the script's function for some reason. long CRWRKTTL ; the working total of all funds long CRGOLDCT ; initial gold count of actual cash on hand before notes converstion long CRBANKNOTECT ; the total gold value of all bank notes short state ; stage handling variable Begin GameMode if state == 1 Set CRWRKTTL to CRWRKTTL - CRGOLDCT Set CRGOLDCT to 0 if CRWRKTTL >= 5 if CRWRKTTL >= 100000 message " " message " " player.additem MEOclutterseptimsstack1000 1 player.removeitem gold001 100000 set CRWRKTTL to CRWRKTTL - 100000 elseif CRWRKTTL >= 50000 && CRWRKTTL < 100000 message " " message " " player.additem MEOclutterseptimsstack0500 1 player.removeitem gold001 50000 set CRWRKTTL to CRWRKTTL - 50000 elseif CRWRKTTL >= 10000 && CRWRKTTL < 50000 message " " message " " player.additem MEOclutterseptimsstack0100 1 player.removeitem gold001 10000 set CRWRKTTL to CRWRKTTL - 10000 elseif CRWRKTTL >= 5000 CRWRKTTL < 10000 message " " message " " player.additem MEOclutterseptimsstack0050 1 player.removeitem gold001 5000 set CRWRKTTL to CRWRKTTL - 5000 elseif CRWRKTTL >= 2000 CRWRKTTL < 5000 message " " message " " player.additem MEOclutterseptimsstack0020 1 player.removeitem gold001 2000 set CRWRKTTL to CRWRKTTL - 2000 elseif CRWRKTTL >= 1000 CRWRKTTL < 2000 message " " message " " player.additem MEOclutterseptimsstack0010 1 player.removeitem gold001 1000 set CRWRKTTL to CRWRKTTL - 1000 elseif CRWRKTTL >= 500 CRWRKTTL < 1000 message " " message " " player.additem MEOclutterseptimsbill0500 1 player.removeitem gold001 500 set CRWRKTTL to CRWRKTTL - 500 elseif CRWRKTTL >= 100 CRWRKTTL < 500 message " " message " " player.additem MEOclutterseptimsbill0100 1 player.removeitem gold001 100 set CRWRKTTL to CRWRKTTL - 100 elseif CRWRKTTL >= 50 CRWRKTTL < 100 message " " message " " player.additem MEOclutterseptimsbill0050 1 player.removeitem gold001 50 set CRWRKTTL to CRWRKTTL - 50 elseif CRWRKTTL >= 20 CRWRKTTL < 50 message " " message " " player.additem MEOclutterseptimsbill0020 1 player.removeitem gold001 20 set CRWRKTTL to CRWRKTTL - 20 elseif CRWRKTTL >= 10 CRWRKTTL < 20 message " " message " " player.additem MEOclutterseptimsbill0010 1 player.removeitem gold001 10 set CRWRKTTL to CRWRKTTL - 10 elseif CRWRKTTL >= 5 CRWRKTTL < 10 message " " message " " player.additem MEOclutterseptimsbill0005 1 player.removeitem gold001 5 set CRWRKTTL to CRWRKTTL - 5 endif endif endif if CRWRKTTL == 0 set state to 0 endif end Begin MenuMode 1009 if state == 0 set CRGOLDCT to player.getitemcount gold001 ;player starts with X gold ;presets currency exchange variables set CRBANKNOTECT to 0 set CRWRKTTL to 0 ;total gold value of all paper money player has set CRBANKNOTECT to CRBANKNOTECT + player.getitemcount MEOclutterseptimsbill0005 * 5 set CRBANKNOTECT to CRBANKNOTECT + player.getitemcount MEOclutterseptimsbill0010 * 10 set CRBANKNOTECT to CRBANKNOTECT + player.getitemcount MEOclutterseptimsbill0020 * 20 set CRBANKNOTECT to CRBANKNOTECT + player.getitemcount MEOclutterseptimsbill0050 * 50 set CRBANKNOTECT to CRBANKNOTECT + player.getitemcount MEOclutterseptimsbill0100 * 100 set CRBANKNOTECT to CRBANKNOTECT + player.getitemcount MEOclutterseptimsbill0500 * 500 set CRBANKNOTECT to CRBANKNOTECT + player.getitemcount MEOclutterseptimsbill1000 * 1000 set CRBANKNOTECT to CRBANKNOTECT + player.getitemcount MEOclutterseptimsstack0005 * 500 set CRBANKNOTECT to CRBANKNOTECT + player.getitemcount MEOclutterseptimsstack0010 * 1000 set CRBANKNOTECT to CRBANKNOTECT + player.getitemcount MEOclutterseptimsstack0020 * 2000 set CRBANKNOTECT to CRBANKNOTECT + player.getitemcount MEOclutterseptimsstack0050 * 5000 set CRBANKNOTECT to CRBANKNOTECT + player.getitemcount MEOclutterseptimsstack0100 * 10000 set CRBANKNOTECT to CRBANKNOTECT + player.getitemcount MEOclutterseptimsstack0500 * 50000 set CRBANKNOTECT to CRBANKNOTECT + player.getitemcount MEOclutterseptimsstack1000 * 100000 set CRWRKTTL to CRBANKNOTECT + CRGOLDCT ;total starting funds of gold and bank notes player has ;bill type and count player has (please note that all of the variables being set here are in fact listed in the script, I just didn't bother listing them on this forum posting) set 5bill to player.getitemcount MEOclutterseptimsbill0005 set 10bill to player.getitemcount MEOclutterseptimsbill0010 set 20bill to player.getitemcount MEOclutterseptimsbill0020 set 50bill to player.getitemcount MEOclutterseptimsbill0050 set 100bill to player.getitemcount MEOclutterseptimsbill0100 set 500bill to player.getitemcount MEOclutterseptimsbill0500 set 1000bill to player.getitemcount MEOclutterseptimsbill1000 set 5stack to player.getitemcount MEOclutterseptimsstack0005 set 10stack to player.getitemcount MEOclutterseptimsstack0010 set 20stack to player.getitemcount MEOclutterseptimsstack0020 set 50stack to player.getitemcount MEOclutterseptimsstack0050 set 100stack to player.getitemcount MEOclutterseptimsstack0100 set 500stack to player.getitemcount MEOclutterseptimsstack0500 set 1000stack to player.getitemcount MEOclutterseptimsstack1000 Message " " Message " " player.additem gold001 CRBANKNOTECT player.removeitem MEOclutterseptimsbill0005 5bill player.removeitem MEOclutterseptimsbill0010 10bill player.removeitem MEOclutterseptimsbill0020 20bill player.removeitem MEOclutterseptimsbill0050 50bill player.removeitem MEOclutterseptimsbill0100 100bill player.removeitem MEOclutterseptimsbill0500 500bill player.removeitem MEOclutterseptimsbill1000 1000bill player.removeitem MEOclutterseptimsstack0005 5stack player.removeitem MEOclutterseptimsstack0010 10stack player.removeitem MEOclutterseptimsstack0020 20stack player.removeitem MEOclutterseptimsstack0050 50stack player.removeitem MEOclutterseptimsstack0100 100stack player.removeitem MEOclutterseptimsstack0500 500stack player.removeitem MEOclutterseptimsstack1000 1000stack set state to 1 endif end Link to comment Share on other sites More sharing options...
Hickory Posted September 11, 2011 Share Posted September 11, 2011 Script elements are executed in the order that they appear in the script, so you have your gamemode before your dialog menu actions. Without knowing the whole story, or spending any time or testing on it, I would give this a try: long CRWRKTTL ; the working total of all funds long CRGOLDCT ; initial gold count of actual cash on hand before notes converstion long CRBANKNOTECT ; the total gold value of all bank notes short state ; stage handling variable Begin MenuMode 1009 if state == 0 ;presets currency exchange variables set CRBANKNOTECT to 0 set CRWRKTTL to 0 ;player starts with X gold set CRGOLDCT to player.getitemcount gold001 ;bill type and count player has set 5bill to player.getitemcount MEOclutterseptimsbill0005 set 10bill to player.getitemcount MEOclutterseptimsbill0010 set 20bill to player.getitemcount MEOclutterseptimsbill0020 set 50bill to player.getitemcount MEOclutterseptimsbill0050 set 100bill to player.getitemcount MEOclutterseptimsbill0100 set 500bill to player.getitemcount MEOclutterseptimsbill0500 set 1000bill to player.getitemcount MEOclutterseptimsbill1000 set 5stack to player.getitemcount MEOclutterseptimsstack0005 set 10stack to player.getitemcount MEOclutterseptimsstack0010 set 20stack to player.getitemcount MEOclutterseptimsstack0020 set 50stack to player.getitemcount MEOclutterseptimsstack0050 set 100stack to player.getitemcount MEOclutterseptimsstack0100 set 500stack to player.getitemcount MEOclutterseptimsstack0500 set 1000stack to player.getitemcount MEOclutterseptimsstack1000 ;total gold value of all paper money player has set CRBANKNOTECT to ( ( 5bill * 5 ) + ( 10bill * 10 ) + ( 20bill * 20 ) + ( 50bill * 50 ) + ( 100bill * 100 ) + ( 500bill * 500 ) + ( 1000bill * 1000 ) + ( 5stack * 500 ) + ( 10stack * 1000 ) + ( 20stack * 2000 ) + ( 50stack * 5000 ) + ( 100stack * 10000 ) + ( 500stack * 50000 ) + ( 1000stack * 100000 ) ) ;total starting funds of gold and bank notes player has set CRWRKTTL to CRBANKNOTECT + CRGOLDCT Message " " Message " " player.additem gold001 CRBANKNOTECT player.removeitem MEOclutterseptimsbill0005 5bill player.removeitem MEOclutterseptimsbill0010 10bill player.removeitem MEOclutterseptimsbill0020 20bill player.removeitem MEOclutterseptimsbill0050 50bill player.removeitem MEOclutterseptimsbill0100 100bill player.removeitem MEOclutterseptimsbill0500 500bill player.removeitem MEOclutterseptimsbill1000 1000bill player.removeitem MEOclutterseptimsstack0005 5stack player.removeitem MEOclutterseptimsstack0010 10stack player.removeitem MEOclutterseptimsstack0020 20stack player.removeitem MEOclutterseptimsstack0050 50stack player.removeitem MEOclutterseptimsstack0100 100stack player.removeitem MEOclutterseptimsstack0500 500stack player.removeitem MEOclutterseptimsstack1000 1000stack set state to 1 endif end Begin GameMode if state == 1 Set CRWRKTTL to CRWRKTTL - CRGOLDCT Set CRGOLDCT to 0 if CRWRKTTL >= 5 if CRWRKTTL >= 100000 message " " message " " player.additem MEOclutterseptimsstack1000 1 player.removeitem gold001 100000 set CRWRKTTL to CRWRKTTL - 100000 elseif CRWRKTTL >= 50000 && CRWRKTTL < 100000 message " " message " " player.additem MEOclutterseptimsstack0500 1 player.removeitem gold001 50000 set CRWRKTTL to CRWRKTTL - 50000 elseif CRWRKTTL >= 10000 && CRWRKTTL < 50000 message " " message " " player.additem MEOclutterseptimsstack0100 1 player.removeitem gold001 10000 set CRWRKTTL to CRWRKTTL - 10000 elseif CRWRKTTL >= 5000 CRWRKTTL < 10000 message " " message " " player.additem MEOclutterseptimsstack0050 1 player.removeitem gold001 5000 set CRWRKTTL to CRWRKTTL - 5000 elseif CRWRKTTL >= 2000 CRWRKTTL < 5000 message " " message " " player.additem MEOclutterseptimsstack0020 1 player.removeitem gold001 2000 set CRWRKTTL to CRWRKTTL - 2000 elseif CRWRKTTL >= 1000 CRWRKTTL < 2000 message " " message " " player.additem MEOclutterseptimsstack0010 1 player.removeitem gold001 1000 set CRWRKTTL to CRWRKTTL - 1000 elseif CRWRKTTL >= 500 CRWRKTTL < 1000 message " " message " " player.additem MEOclutterseptimsbill0500 1 player.removeitem gold001 500 set CRWRKTTL to CRWRKTTL - 500 elseif CRWRKTTL >= 100 CRWRKTTL < 500 message " " message " " player.additem MEOclutterseptimsbill0100 1 player.removeitem gold001 100 set CRWRKTTL to CRWRKTTL - 100 elseif CRWRKTTL >= 50 CRWRKTTL < 100 message " " message " " player.additem MEOclutterseptimsbill0050 1 player.removeitem gold001 50 set CRWRKTTL to CRWRKTTL - 50 elseif CRWRKTTL >= 20 CRWRKTTL < 50 message " " message " " player.additem MEOclutterseptimsbill0020 1 player.removeitem gold001 20 set CRWRKTTL to CRWRKTTL - 20 elseif CRWRKTTL >= 10 CRWRKTTL < 20 message " " message " " player.additem MEOclutterseptimsbill0010 1 player.removeitem gold001 10 set CRWRKTTL to CRWRKTTL - 10 elseif CRWRKTTL >= 5 CRWRKTTL < 10 message " " message " " player.additem MEOclutterseptimsbill0005 1 player.removeitem gold001 5 set CRWRKTTL to CRWRKTTL - 5 endif endif endif if CRWRKTTL == 0 set state to 0 endif end Link to comment Share on other sites More sharing options...
fg109 Posted September 11, 2011 Share Posted September 11, 2011 You could try what Hickory suggested; it might make prevent some problems. But the problem you're describing is probably from something else. I suspect the reason it only works once is because (like you said) the state variable isn't being reset. To fix it, you need to set the "state" variable back to 0 in the GameMode block. You did it for cases "if CRWRKTTL == 0", but that's not enough. You should change that condition to "if CRWRKTTL < 5". Link to comment Share on other sites More sharing options...
KMSvalley Posted September 11, 2011 Share Posted September 11, 2011 Ok I think I might know what one of the problems is (the issue with the code only running once) if CRWRKTTL == 0 set state to 0endif I don't think this section of code is ever active because just aboveyou see set the CRWRKTTL variable within the if state == 1 block In the Begin MenuMode 1009 code block (this runs first since state == 0) ... set CRWRKTTL to CRBANKNOTECT + CRGOLDCT ;total starting funds of gold and bank notes player has ... set state to 1endif Alittle confusing trying to read and think of how it all works together but maybe you can try changing if CRWRKTTL == 0 set state to 0endif to the following code if CRGOLDCT == 0 set state to 0endif or as fg109 mentioned just above try changing the condition to "if CRWRKTTL < 5" Link to comment Share on other sites More sharing options...
icecreamassassin Posted September 11, 2011 Author Share Posted September 11, 2011 Thanks guys. I did have the CRWRKTTL < 5 condition set before and it still had the same problem, which is why I tried it at 0, but I think I'll give hickory's advice a shot and reverse the GameMode and MenuMode code groups and use the suggested code he posted and see if that works Thanks again for the advice Link to comment Share on other sites More sharing options...
icecreamassassin Posted September 11, 2011 Author Share Posted September 11, 2011 ;total gold value of all paper money player has set CRBANKNOTECT to ( ( 5bill * 5 ) + ( 10bill * 10 ) + ( 20bill * 20 ) + ( 50bill * 50 ) + ( 100bill * 100 ) + ( 500bill * 500 ) + ( 1000bill * 1000 ) + ( 5stack * 500 ) + ( 10stack * 1000 ) + ( 20stack * 2000 ) + ( 50stack * 5000 ) + ( 100stack * 10000 ) + ( 500stack * 50000 ) + ( 1000stack * 100000 ) ) this line the CS didn't like, couldn't seem to use "5bill" as a variable, maybe it thinks that "5" is the value and "bill" is some other unknown. maybe I need to change the short variables to be "fivebill" etc. I stuck back in my code for that section (which seemed to be logical) but the script functions pretty much in the same way, you can do it once and then yer done, and the hand back of notes is not the same as what were pulled out to add to the gold value (again all gold totals are correct, but the split doesn't work correctly) Link to comment Share on other sites More sharing options...
icecreamassassin Posted September 11, 2011 Author Share Posted September 11, 2011 I think I am going to have to abandon this approach :( It seems that the script is moving too slowly (even with the fQuestdelaytimer set low) and if the full change out doesn't occur between leaving one conversation and starting another, weird things happen and the exchange isn't made quick enough. I think I will go more the direction of having the paper money be able to be "given away" which will (by script) add to your gold value, and do what someone else suggested and have merchants be able to draw an advance for you on your personal bank account for a small fee, both of which I can easily set up. Thanks for your help though Link to comment Share on other sites More sharing options...
KMSvalley Posted September 12, 2011 Share Posted September 12, 2011 think your just missing the following; set CRBANKNOTECT to CRBANKNOTECT+( ( 5bill * 5 ) + ( 10bill * 10 ) + ( 20bill * 20 ) + ( 50bill * 50 ) + ( 100bill * 100 ) + ( 500bill * 500 ) + ( 1000bill * 1000 ) + ( 5stack * 500 ) + ( 10stack * 1000 ) + ( 20stack * 2000 ) + ( 50stack * 5000 ) + ( 100stack * 10000 ) + ( 500stack * 50000 ) + ( 1000stack * 100000 ) ) 5bill etc + 5stack etc variables all need to be of the same type as CRBANKNOTECT so all type:long btw did you try the below code? using CRGOLDCT == 0 instead of the variable CRWRKTTL? if CRGOLDCT == 0 set state to 0 endif Link to comment Share on other sites More sharing options...
icecreamassassin Posted September 13, 2011 Author Share Posted September 13, 2011 think your just missing the following; set CRBANKNOTECT to CRBANKNOTECT+( ( 5bill * 5 ) + ( 10bill * 10 ) + ( 20bill * 20 ) + ( 50bill * 50 ) + ( 100bill * 100 ) + ( 500bill * 500 ) + ( 1000bill * 1000 ) + ( 5stack * 500 ) + ( 10stack * 1000 ) + ( 20stack * 2000 ) + ( 50stack * 5000 ) + ( 100stack * 10000 ) + ( 500stack * 50000 ) + ( 1000stack * 100000 ) ) Oh ok, yeah that's what was missing from hickory's code, but I think that it still isn't going to work since it doesn't like the numeric value in the variable name, so those are being changed and I'll try the above line again 5bill etc + 5stack etc variables all need to be of the same type as CRBANKNOTECT so all type:long why would that be? none of these variables are ever more than 100 btw did you try the below code? using CRGOLDCT == 0 instead of the variable CRWRKTTL? I'll give that a shot, looks like CRGOLDCT is set to 0 more reliably Link to comment Share on other sites More sharing options...
icecreamassassin Posted September 13, 2011 Author Share Posted September 13, 2011 ok so I tried it, and there is some progress... 1st though, setting the CRWRKTTL == 0 condition to be CRGOLDCT == 0 instead doesn't work because the CRGOLDCT is set to 0 and thus would prevent the script section from cycling. I think I will remove the set CRGOLDCT to 0 command because I think when the thing initializes again, it will reset the value anyways, then I can try the CRGOLDCT as the reset variable instead of the CRWRKTTL... so here's the script as it stands now: ScriptName CRbankhousenewsscript float fQuestDelayTimer short convertedfunds short customerservice short doonce short account short interestdays short convertedfunds ; paper currency convertion variables long CRWRKTTL long CRGOLDCT long CRBANKNOTECT short state ;paper currency counts short fivebill short tenbill short twentybill short fiftybill short hundredbill short fivehundredbill short thousandbill short fivestack short tenstack short twentystack short fiftystack short hundredstack short fivehundredstack short thousandstack Begin MenuMode 1009 if state == 0 ;presets currency exchange variables set CRBANKNOTECT to 0 set CRWRKTTL to 0 ;player starts with X gold set CRGOLDCT to player.getitemcount gold001 ;bill type and count player has set fivebill to player.getitemcount MEOclutterseptimsbill0005 set tenbill to player.getitemcount MEOclutterseptimsbill0010 set twentybill to player.getitemcount MEOclutterseptimsbill0020 set fiftybill to player.getitemcount MEOclutterseptimsbill0050 set hundredbill to player.getitemcount MEOclutterseptimsbill0100 set fivehundredbill to player.getitemcount MEOclutterseptimsbill0500 set thousandbill to player.getitemcount MEOclutterseptimsbill1000 set fivestack to player.getitemcount MEOclutterseptimsstack0005 set tenstack to player.getitemcount MEOclutterseptimsstack0010 set twentystack to player.getitemcount MEOclutterseptimsstack0020 set fiftystack to player.getitemcount MEOclutterseptimsstack0050 set hundredstack to player.getitemcount MEOclutterseptimsstack0100 set fivehundredstack to player.getitemcount MEOclutterseptimsstack0500 set thousandstack to player.getitemcount MEOclutterseptimsstack1000 ;total gold value of all paper money player has set CRBANKNOTECT to CRBANKNOTECT + ( ( fivebill * 5 ) + ( tenbill * 10 ) + ( twentybill * 20 ) + ( fiftybill * 50 ) + ( hundredbill * 100 ) + ( fivehundredbill * 500 ) + ( thousandbill * 1000 ) + ( fivestack * 500 ) + ( tenstack * 1000 ) + ( twentystack * 2000 ) + ( fiftystack * 5000 ) + ( hundredstack * 10000 ) + ( fivehundredstack * 50000 ) + ( thousandstack * 100000 ) ) ;total starting funds of gold and bank notes player has set CRWRKTTL to CRBANKNOTECT + CRGOLDCT Message " " Message " " player.additem gold001 CRBANKNOTECT player.removeitem MEOclutterseptimsbill0005 fivebill player.removeitem MEOclutterseptimsbill0010 tenbill player.removeitem MEOclutterseptimsbill0020 twentybill player.removeitem MEOclutterseptimsbill0050 fiftybill player.removeitem MEOclutterseptimsbill0100 hundredbill player.removeitem MEOclutterseptimsbill0500 fivehundredbill player.removeitem MEOclutterseptimsbill1000 thousandbill player.removeitem MEOclutterseptimsstack0005 fivestack player.removeitem MEOclutterseptimsstack0010 tenstack player.removeitem MEOclutterseptimsstack0020 twentystack player.removeitem MEOclutterseptimsstack0050 fiftystack player.removeitem MEOclutterseptimsstack0100 hundredstack player.removeitem MEOclutterseptimsstack0500 fivehundredstack player.removeitem MEOclutterseptimsstack1000 thousandstack set state to 1 endif end Begin GameMode set fQuestdelayTimer to .01 setstage CRbankhouses 10 if state == 1 Set CRWRKTTL to CRWRKTTL - CRGOLDCT Set CRGOLDCT to 0 if CRWRKTTL >= 5 if CRWRKTTL >= 100000 message " " message " " player.additem MEOclutterseptimsstack1000 1 player.removeitem gold001 100000 set CRWRKTTL to CRWRKTTL - 100000 elseif CRWRKTTL >= 50000 && CRWRKTTL < 100000 message " " message " " player.additem MEOclutterseptimsstack0500 1 player.removeitem gold001 50000 set CRWRKTTL to CRWRKTTL - 50000 elseif CRWRKTTL >= 10000 && CRWRKTTL < 50000 message " " message " " player.additem MEOclutterseptimsstack0100 1 player.removeitem gold001 10000 set CRWRKTTL to CRWRKTTL - 10000 elseif CRWRKTTL >= 5000 CRWRKTTL < 10000 message " " message " " player.additem MEOclutterseptimsstack0050 1 player.removeitem gold001 5000 set CRWRKTTL to CRWRKTTL - 5000 elseif CRWRKTTL >= 2000 CRWRKTTL < 5000 message " " message " " player.additem MEOclutterseptimsstack0020 1 player.removeitem gold001 2000 set CRWRKTTL to CRWRKTTL - 2000 elseif CRWRKTTL >= 1000 CRWRKTTL < 2000 message " " message " " player.additem MEOclutterseptimsstack0010 1 player.removeitem gold001 1000 set CRWRKTTL to CRWRKTTL - 1000 elseif CRWRKTTL >= 500 CRWRKTTL < 1000 message " " message " " player.additem MEOclutterseptimsbill0500 1 player.removeitem gold001 500 set CRWRKTTL to CRWRKTTL - 500 elseif CRWRKTTL >= 100 CRWRKTTL < 500 message " " message " " player.additem MEOclutterseptimsbill0100 1 player.removeitem gold001 100 set CRWRKTTL to CRWRKTTL - 100 elseif CRWRKTTL >= 50 CRWRKTTL < 100 message " " message " " player.additem MEOclutterseptimsbill0050 1 player.removeitem gold001 50 set CRWRKTTL to CRWRKTTL - 50 elseif CRWRKTTL >= 20 CRWRKTTL < 50 message " " message " " player.additem MEOclutterseptimsbill0020 1 player.removeitem gold001 20 set CRWRKTTL to CRWRKTTL - 20 elseif CRWRKTTL >= 10 CRWRKTTL < 20 message " " message " " player.additem MEOclutterseptimsbill0010 1 player.removeitem gold001 10 set CRWRKTTL to CRWRKTTL - 10 elseif CRWRKTTL >= 5 CRWRKTTL < 10 message " " message " " player.additem MEOclutterseptimsbill0005 1 player.removeitem gold001 5 set CRWRKTTL to CRWRKTTL - 5 endif endif endif if CRWRKTTL <= 5 set state to 0 endif end At first it seemed to work, I was able to talk to a merchant and the bills added back to the gold value, and vanished, then when I left the script added the bills back in and subtracted gold. It seemed to only do 100K at first but I sat there for a few more seconds and eventually it added more bills and took more gold. I talked to the merchant again and it added the funds back over no problem. Then I left and boom, no bills appeared and no gold vanished. Then I talked to him again and no money converted back over to gold, the bills remained and the script went dead basically. Link to comment Share on other sites More sharing options...
Recommended Posts