RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RMXP] Credit Card {RESOLVED}

0 Members and 1 Guest are viewing this topic.

***
herp derp
Rep:
Level 81
Newclear Bomb
Hello RMRK people. In my game, I want to have basically a credit card system. However it would have to be very complex because, after you "max it out" I dont want the player to just forget about it and move on. So I want to know how to create the credit card system in the first place, and how I can make it so that if you take to long to pay off your debt, the company will start taking some of your items. Complex it seems. Thanks
« Last Edit: July 04, 2010, 11:44:31 PM by DylansGamez »

******
Rep:
Level 91
A script with a timer would make it less laggy and overall easier, however it can be done with events.
So first thing first we make the system itself.
Let's open a common event, call it say "check balance" we'll put a variable there, set it to 0 as we start the game (flag it so it will only change once, or set to 0 with another event you run at the start of the game, your call)
Set another the same way call it MaxBalance, let's assume it's 1000.
Now this event does this:
When called, it asks to user to input an amount to withdraw (0-max value), then it checks
if (checkBalance + input <= MaxBalance)
-add gold (input)
else
-show message "you can't withdraw that much you can only withdraw *MaxBalance - currentBalance*"

And now we do another event of the same nature, this will be a payback and it's check will be
if (checkBalance - input >= 0)
-Reduce gold
else
-message "You only owe checkBalance"

Now simply connect both those message to a menu set on any npc you wish around the game and the basic feature is done.

Now let's say that rather than a timer (Which could be inaccurate I mean, the player might wander off of his computer) let's count steps.
So you run another common event, this will be triggered by the previous one (turned on when you withdraw, turned off when you deposit enough to cover your pay, and reset the walk count to 0)
Now you want a StepCount variable
it simply goes "if player moved right +1, if player moved left +1...."
and then you put a branch
if (StepCount >= 5000)
-Message: "Those who do not pay their debt stay without a penny"
-Reduce gold (Amount the player owes)
-delete main character weapon and armor
-Whatever other torment you might like
-Set debt to 0
-Set StepCount to 0
-Set this event's running flag to false.


And that should just about do it.

*Side note: It's been a while since I last used RMRK, this should all be possible but I may have overlooked something, but really this should be enough to at least give you an idea*
« Last Edit: July 04, 2010, 05:57:56 PM by blueXx »
holy shit my sig was big!

**
Rep:
Level 76
Interested RMKR
You can also do conditional branches with a list of items that you can take.

For example:

Set conditional branch: If (item: potion) is in inventory
If: Variable debt +100
If: Step count variable +200
Then: Remove potion from inventory
Else: If: (item: sword) is in inventory
If: Variable debt +150
If step count variable +200
Then: remove sword from inventory.

On each Else (if variable debt <150, step count <200) then end the event. This can be done every time you enter or exit a building or a map. This way, you won't overload every map with parallel processes while you still keep a constant check from removing items.

EDIT: This is if you don't wanna just take random inventory items. This way, you can end the event per debt
« Last Edit: July 04, 2010, 07:44:03 PM by doomed2die »