ID:161868
Mar 22 2008, 3:43 pm
|
|
how would i limit the ammount of times a person can recreate their char per week?
|
In response to Deity Production 08
|
|
That code won't work. Don't try and help someone if you don't know what you're doing yourself.
|
In response to Popisfizzy
|
|
I fixed it. Its very basic but itll work if he implements it correctly. I just forgot the usr.recreated += 1 and i added it.
|
In response to Deity Production 08
|
|
maybe im adding it wrong or something because it doesnt start creation it just says recreating then after 3rd time it lets me create
|
In response to Bluntmonkey
|
|
That's because, as Popisfizzy said, it doesn't work. You're deleting the very savefile that you're saving the recreated variable in. Additionally, the variable isn't reset on a weekly basis.
|
In response to Deity Production 08
|
|
No, you see, that code is just wrong. Firstly, this line:
del(player/"[usr.name]") I do not know a language out there that will properly do anything similiar to this. Firstly, you're telling the DM to divide player (which is probably an object) by a text string, which doesn't make sense at all. Then it's supposed to delete the value. What, may I ask, were you trying to do? Secondly, you've got a useless return statement. |
In response to Popisfizzy
|
|
well yea i messed up there i ment to put a \ and itll mostlikely need to be changed to whatever his saving system names the .savs
|
In response to Deity Production 08
|
|
That won't work either! Just don't help people unless you know what the hell you're doing, which you don't. Just stop. Do not help again for months, possibly even years. Helping implies you will make the situation better. I don't help someone fix a flat tire by smashing in their window. I help them by taking the flat tire off and getting the new one on. Right now, all you're doing is smashing windows in. But, so you don't feel too bad, you're doing very well at smashing those windows.
|
In response to Garthor
|
|
garthor, or anyone else? someone explain it to me than?
|
In response to Popisfizzy
|
|
Popisfizzy wrote:
That won't work either! Just don't help people unless you know what the hell you're doing, which you don't. Just stop. Do not help again for months, possibly even years. Helping implies you will make the situation better. I don't help someone fix a flat tire by smashing in their window. I help them by taking the flat tire off and getting the new one on. Right now, all you're doing is smashing windows in. But, so you don't feel too bad, you're doing very well at smashing those windows. ROFL!!!!! OMG Owned! XD An to explain a few issues with that system for one the player would need to be logged in to even get the recreate reset if you could some how manage to get it to work. XD -wipes the tears from his eyes- Smashing windows ahah priceless... You would no doubt be better off making a list that is called on on world/new and save it when the world is shut down then have the list save the amount of times a key has recreated then make a verb to delete that list when ever you feel like it. Id post an example but im just to lazy to write one. Its safe to say that be by far the most simple way of pulling it off. I mean if you wanted to go about it a really lazy and sloppy way of coding you could just make a second var that saves how many times the person has recreate and save it to a recreate folder as the key name then make it check the save file for the number of times they have created before moving them onto the creation proc. Then just delete the folder ever week but as I said this has got to be the most sloppy and lazy way of doing it and I would not recommend it. |
Maybe try this:
Have a list of realtime timestamps. When a user logs in, loop through their list and remove any timestamp if (world.realtime - timestamp) > 10*60*60*24*7 If the list len is < timesperweek, enable their recreation command. When they recreate a character, put world.realtime in their list. If the len is >= timesperweek disable their recreation command. I haven't messed with realtime so I dunno if this would work or not. |
then under New or w/e you have tomake the person recreate, put this
then id create a gm reset verb and give it to them like this