Basically What I Want To Try To Do Is Make An Auto Rank System That Can Rank People Up Automatically By Checking Saves And Making Sure Nobody Is Said Rank Before The Rank Up. But The Problem Is, I Have No Idea Where To Start Or How To Make It Check Saves.
Example: Knight -- Check Saves --> Paladin --Check Saves --> King
1
2
I Was Thinking Of Having A Rank Save File For It, So It Would Check One Save To See If People Are Occupying The Rank, But Idk How To Do That, Nor How To Make A Save Like That, lol. Also, I Didn't Make It Intentionally, I Just Edited The Original And It Made It A New Topic For Some Reason, So I Deleted The Old One.
|
In response to Narutogx2
|
|
I Was Thinking Of Having A Rank Save File For It, So It Would Check One Save To See If People Are Occupying It, But Idk How To Do That [...] You still don't need (or want) to do that though. Perhaps you'd want to save/load that information into a list. The only "checking" you'd be doing is when you load the savefile into the list initially. var/savefile/somesavefile = new("somesavefile.sav") // The file extension really doesn't matter, but I prefer this. Loading would be just the same, in reverse (and the addition of checking if the savefile exists prior to taking action). |
But See, A Save File Would Allow It To Be Constantly Updated, As It Will Be Keeping Track Of Multiple Ranks At The Same Time, And Wouldn't A List Get Erased When The Game Reboots?
|
Saving a list does create a save file
All you have to do is load the list into a global list and check whenever a player does something to see if there rank changes If someone is offline and needs to be removed from a rank you could also add a check on login in a separate list that would make whatever changes you need to make to that person |
Zag I've Been Trying To Message U On Skype, lol. Also, I Don't Know How To Make The List, lol. I'm Inexperienced In That Sort Of Thing.
|
In response to Narutogx2
|
|
EDIT: Fixed a word choice error that somehow flew over my head for an entire day.
Dude, can you not capitalize the first letter of every word? reading your comments is cringe worthy. Seriously. Anyways, you do not need to be checking every player's savefile to find out if a rank is being used. You can have a list keeping track of all the ranks and, if applicable, who is currently assigned said rank. |
In response to Narutogx2
|
|
U Really Can't Just Explain It? I Don't Have The Patience To Read Through That Long Page.
|
In response to Narutogx2
|
|
Narutogx2 wrote:
U Really Can't Just Explain It? I Don't Have The Patience To Read Through That Long Page. This is the reason why you are getting nowhere. |
U Mean Because Nobody's Bothering To Explain Anything In Detail, Lmao. Besides I Can't Understand Like Half The Shit In That Link He Posted Cuz Its Moderately Complicated. And I Don't Have Time To Read It Either. P.S. I Should've Said That, By Patience, I Mean Attention Span.
|
In response to Narutogx2
|
|
You've been given more than enough information to take action. The pieces of the puzzle were handed to you, now you must put it together.
This idea of "not having time" doesn't fly. You have plenty of time, you are just choosing to muck around instead of make the most of it. We will help you help yourself, but there will be no spoon-feeding, especially when you have shown no effort to solve the problem yourself. |
We will help you help yourself, but there will be no spoon-feeding, especially when you have shown no effort to solve the problem yourself. Narutogx2 wrote: U Mean Because Nobody's Bothering To Explain Anything In Detail, Lmao. Besides I Can't Understand Like Half The Shit In That Link He Posted Cuz Its Moderately Complicated. And I Don't Have Time To Read It Either. P.S. I Should've Said That, By Patience, I Mean Attention Span. You know... I had to come back to this because you are the first person that we've ever explained this to that's been honest about why you aren't understanding something. And you know, people often attack the helpers around here for being rude/dismissive. But that honesty is incredible. It's not being unwilling to help yourself that attracts ire: It's being unwilling to help yourself and lying to yourself and us about why you won't. You didn't do that second bit, so really, no rudeness is justified. We have to get on people all the time for refusing to read, for not starting at the beginning, for not acknowledging a lack of acquired skills to tackle something before wanting to have it done. But you are honestly the first person that's ever come right out and said that you won't read something that's been linked to you because you lack the attention span/patience. In all my years, I've never seen someone refuse to help themselves and then not make excuses for why they refuse to do so. That honesty is actually really respectable. Your reasons aren't, but at least being honest about it is. Unfortunately, there's nothing else that can be done. Programming takes a lot of time/effort/reading. If you don't do what's required of you to learn how to do it, you have two options: Make a lot of money and pay someone else to do it for you (I mean, we're talking a lot of money. A decent programmer is worth more than $20 an hour, and there are few systems you can ask for that take less than a handful of hours.), or you button up, start reading, and start learning. Not much else can be said. There should never be a case where you have an idea for something you want to do, but have no idea where to start. If you are ever in this boat, it's because you lack the skills to do it. No amount of explaining it to you will help. You have to build those skills first. |
The Thing Is, I Basically Taught Myself How To Code, With Little Help, From Basically Trial And Error (And The Basic Dream Maker Guides). But I've Never Had To Read Something That's Long Like That Link Was. And What I DID Need Help On, Was Explained To Me, lol.
|
basically, i learn from experience. i should've also mentioned that i have adhd so it takes me a while to understand things that are moderately complicated, which is why i'd prefer if it was explained to me.
edit: so im reading through the library that gpe posted but i don't see what im looking for. im thinking of something like, if(src.rank equals "knight") (check list code here) src.rank equals "paladin" (i don't have an equals sign on my keyboard im using. this code is if the list comes back where paladin is empty.) |
Glad you're finally ready to help yourself here. I just so happen to have done exactly what you're asking for in the past and I'm gonna have to go ahead and say that FKI is right on point.
First step, make a global list. This is a list that can be accessed by any proc / verb / whatever at any time, no matter if it's a mob, obj, or anything else. Pretty simple stuff. var/list/Ranks = new() Then you just need a way to compare the player that is current leveling up or whatever to whoever the currently ranked player is. I believe I used datums to store all the relevant information - character name, level, etc. So if the current player's level is higher than the person you're comparing from the list, you just make a new datum for the new player and replace the old one in the list. Any time the server shuts down, make sure the list is saved in a savefile (or be pro-active and just save it every time you make changes to it). Every time it starts up, make sure it loads. Boom! Rank system. If you need anything clarified, let me know. I won't spoon-feed you code, but I'd be happy to elaborate on any concepts you're having trouble with. |
Tbh I'm having trouble understanding the concept of DATUM, lol. Probably seems really dumb.
|
In response to Narutogx2
|
|
Narutogx2 wrote:
Tbh I'm having trouble understanding the concept of DATUM, lol. Probably seems really dumb. A datum is simply the most basic object type in the language. Mobs, turfs, and objs are just more use-specific versions of a datum. When you need to dial it back and create your own types for your own needs, you would use a datum. |
1
2
Don't limit yourself to the first solution that comes to mind. Once you break down what you need to do into key information and know the steps required to reach an "end", you are halfway there. The other half is applying that information and creating what it is you want made. Note how I broke down your requirements and applied them to another method of getting to the end.
Edit: Also, next time try to avoid making two topics. I nearly nuked my response because the topic was deleted.