Aller au contenu

Photo

Money accumulation and payout script


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Friar

Friar
  • Members
  • 293 messages
This one might be too much of a challenge...

I'm trying to create a script that accumulates 10gp per 8 ingame hours, and caps out at 500. I want the pc to be able to see how much there is to collect for instance:

"Inside the coffer is 342 gp. What do you do?"
(1) Collect
(2) Leave alone

Also, I'd like to make it so that as the pc progresses, in the journal entries for instance, the payouts become larger.
For example:
Journal:
The Business
entry 1 - Tech level 1, The business pays out 5 gp per day until it maxes out at 100gp.
entry 2 - Tech level 2, The business pays out 10gp every 8hrs until it maxes out at 500gp.
entry 3 - Tech level 3, Business is good and now pays out 20gp a day until maxing out at 750gp.

I know it must be possible because those stupidly addictive facebook mafia games use this sort of same script over and over and over again.

#2
Eguintir Eligard

Eguintir Eligard
  • Members
  • 1 832 messages
Do you have a script started at all or do you not know scripting yet?



If I recall to put gold in a chest you will be using CreateItemOnObject() or something very similar sounding



I believe it lets you set a stack size too so that would be your gold amount.

#3
Friar

Friar
  • Members
  • 293 messages

Eguintir Eligard wrote...

Do you have a script started at all or do you not know scripting yet?

If I recall to put gold in a chest you will be using CreateItemOnObject() or something very similar sounding

I believe it lets you set a stack size too so that would be your gold amount.



I'm not a very good scripter and many might say I do not know how to script. All I have so far is the script for checking to see if there is a journal entry in a conversation. So:
nt StartingConditional()
{
object oPC = GetPCSpeaker();

int nInt;
nInt=GetLocalInt(oPC, "NW_JOURNAL_ENTRYThe White Hart Inn");

if (nInt < 1)
   return FALSE;

return TRUE;
}



It becomes tricky for me when I trying to think of a way to remember the ammount of time since the pc last used the script and then to award gp according to that length of time.

But the chest idea sounds really promising. I think I will fiddle a little with that idea seed you present. Thanks Eligard! 

#4
dethia

dethia
  • Members
  • 146 messages
If it's not too much trouble join the irc channel:

http://social.biowar...2/index/3116620



I'd be more than wiling to help you or write some of the scripts for you once you describe what you want in a bit more detail, but I also prefer a somewhat more real-time conversation ;D. There are also many devs there who'd be happy to answer questions you may have.





In a more general answer you would have a generic conversation you had listed before which would use a custom token. This token would be populated by the script with gold value based on whatever parameters the pc meets (which I am not clear about at the moment). Most of your containers in that case would not be containers (unless they only have items or not even that possibly), again if you can join irc or send me a pm with perhaps an instant messenger information we can talk faster in more detail.



The conversation would have of course a simple gc script that will check for the criteria, and a an action script that will give out the gold and possibly items.

#5
Friar

Friar
  • Members
  • 293 messages
I was not aware that there is an irc. Thanks I'll get to it right away.

If it helps clarify anything...

Remember how in Baldur's Gate 2 the pc could run the Thieves guild or the De'Arnise Keep? These pc owned businesses would offer a payout ever so often.

In GTA III Vice City the character could own a taxi business, Ice Cream Shop, Car Dealership, Strip Club and a number of other fronts.

I'm trying to do something similar for my adventure, but then I want to have my own unique spin put on it. I do not want to let my cat out of the bag though. At least not this early in my project. It might spoil the fun for many of you.

Modifié par koundog1, 10 septembre 2010 - 12:15 .