Finally making Pawn/Bank work, like it should

  • I have changed the code some time ago to make Bank workable, or at least, profitable for the player in a sense that you can USE LENDING as something profitable and enjoyable. And to cut long story short, I have made this changes long time ago, but now I will share them. Best thing what can happen is that something can be learned from this code, and maybe even implemented.

    Lets start:


    First and foremost we need to make Taking credit (and returning it) event much more frequent, so we change this code, in "/Measures/Behaviour/std_Idle.lua":

    Code
    [COLOR=SlateGray]elseif WhatToDo > 80 and not HasProperty("","SchuldenGeb") then
                        idlelib_TakeACredit()
                    elseif WhatToDo > 70 and HasProperty("","SchuldenGeb") then
                        idlelib_ReturnACredit()[/COLOR]

    TO THIS ->

    Code
    [COLOR=Red]                elseif WhatToDo > 65 and not HasProperty("","SchuldenGeb") then
                        idlelib_TakeACredit()
                    elseif WhatToDo > 61 and HasProperty("","SchuldenGeb") then
                        idlelib_ReturnACredit()[/COLOR]

    Second, we need to change, how much they take from our account in "/Scripts/Library/idlelib.lua" from this:

    Code
    [COLOR=SlateGray]                                kreditMeng = ( (kreditMeng / 100) * 1 )
                                elseif schuldner == 2 then
                                    kreditMeng = ( (kreditMeng / 100) * 2 )
                                elseif schuldner == 3 then
                                    kreditMeng = ( (kreditMeng / 100) * (3+Rand(3)) )
                                elseif schuldner == 4 then
                                    kreditMeng = ( (kreditMeng / 100) * (6+Rand(5)) )
                                elseif schuldner == 5 then
                                    kreditMeng = ( (kreditMeng / 100) * (11+Rand(10)) )
                                end[/COLOR]

    TO THIS ->


    Code
    [COLOR=Red]                                kreditMeng = ( (kreditMeng / 100) * (1+Rand(5)) )
                                elseif schuldner == 2 then
                                    kreditMeng = ( (kreditMeng / 100) * (5+Rand(10)) )
                                elseif schuldner == 3 then
                                    kreditMeng = ( (kreditMeng / 100) * (10+Rand(10)) )
                                elseif schuldner == 4 then
                                    kreditMeng = ( (kreditMeng / 100) * (15+Rand(10)) )
                                elseif schuldner == 5 then
                                    kreditMeng = ( (kreditMeng / 100) * (20+Rand(10)) )
                                end[/COLOR]


    Ok, after that we need to change in the same file, our INCOME from their return:

    Code
    schuld = schuld + ( (schuld / 100) * (zinsA+zinsB ) )

    TO THIS ->


    Code
    [COLOR=Red]            schuld = schuld + ( (schuld / 10) * (zinsA+zinsB ) )[/COLOR]

    So to sum it up, i made the event of taking credit (and returning it) somewhat more frequent, and I made them take much more money from the account, also changing, that for EVERY skill in Bargaining and Arcane, you get 10% more profit from the return. (counter to 1% per skill, which was implemented).


    Accounting looses from dead people, are those who never return I think these are fair numbers. Especially because they take more money. So higher risk better reward. And that will be the difference with low level banker and big one, where you will need much more returns to compensate the lending, unlike the big banker (maxed out skills, don't forget Scholar class ONLY have favorable in one skill, PLUS it will make arcane skill MUCH more worth while ingame)


    Also I posted raw code here, so that everyone can implement it and test it with only copy/paste and search option in his notepad.


    There, these are my 2 cents for this.


    P.S.
    Just so there is no misunderstanding. I just "enhanced" the code with better numbers, I didn't add anything creative. Its just plain number re-balancing.

  • I'll try to have a look.


    Edit: I changed the script at a few positions, but I didn't made the same changes as you. You also had a bug in your script ^^
    you changed the script to

    Code
    elseif WhatToDo > 65 and not HasProperty("","SchuldenGeb") then
                        idlelib_TakeACredit()
                    elseif WhatToDo > 55 and HasProperty("","SchuldenGeb") then
                        idlelib_ReturnACredit()


    but the next "elseif" branch says

    Code
    elseif WhatToDo > 60 then
    					if toast == 0 then
    [...]


    If you have "if x > 55 then ... elseif x > 60 then ... end" the second condition will never be true.

  • Crap, I was so opportunistic in it, that I didn't look it whole when I copy pasted! ;)


    You are right, I either need to change position of that part of the script or just increase numbers! (My original numbers were greater)


    (I'm going to increase the numbers) I fixed it the bug in my original code.


    P.S.
    I think whatever you change, you need to make pawn shop self-sufficient with "lending", cause looking at the age and effects of pawnshops. They should be very sufficient on their own, even with low money input! They should be like they always were, most legal way of being a criminal!