ID:171323
![]() Oct 13 2004, 12:11 am
|
|
hi i need help in coding guild doors in the zeta coding plz help me sum1 i keep bugging it up thankz
|
Tripodentertainment wrote:
hi i need help in coding guild doors in the zeta coding plz help me sum1 i keep bugging it up thankz You'll find very few people are willing to help you when you're writing a rip. You'd be a lot better off abandoning the Zeta code and using what you've learned on your own to start over. If for no other reason, you should do it because the Zeta code is absolute crap and full of bugs. That said, guild/team doors are a topic that has been covered many times on the forums. Just search and you'll find lots of posts that can help you. Lummox JR |
Green Lime wrote:
Not sure how the zeta coding is since Ive never viewed it before or even thought about viewing it. But a guild door only gives access to people in the guild. And the people in the guild are usally helled in a list. Hmm, I would have used just a normal guild = "Uberdog" variable, not a list. Would have thought it would be cleaner? |
I'm guessing players would have a variable, "guild", and it's set to whatever guild they're in? That's good, but not good. What if you wanted to loop all the members in a certain guild? You wouldn't be able to because you'd have to loop through the world, and find whatever players ONLINE. Meaning all offline players are counted as *not* in the guild. Best way to do it is:
var/list/Guilds=list() Giving a list of guilds; giving the mob a variable "guild". Guild That's defining your Guild datum, now it gets even more simple. mob/verb/CreateGuild() Pretty simple, huh? Now to recruit members. mob/verb/Recruit(mob/M in view()) That's basically what you can do when creating such guilds, having it supported by simple variables and lists is the key. |
You should not be using the : operator anywhere in that code. It was completely avoidable if you'd just given the Guild var the correct type.
var/Guild/Guild
Of course, by standard naming conventions those should be lowercase.
var/guild/guild
Lummox JR |
Crashed wrote:
: has its purposes, and I intend to use them when I'm lazy. It does have purposes, but it should never be used to cover something you could just as easily fix by adding a single word to your code. At worst, it could be a crutch in your own code, but you shouldn't go putting it in examples intended for newbies. Lummox JR |
Not sure how the zeta coding is since Ive never viewed it before or even thought about viewing it. But a guild door only gives access to people in the guild. And the people in the guild are usally helled in a list.
So Im guessing you have a way to create your guild. Which makes a list for the guild. So then just use a for list loop and get all the people in the guild and check it with the person that is trying to gain access.
Uhh if you want more info maybe you could provide a .... example of what is getting bugged?