Help please? Uhhh heres the problem...
I have this code here....
world
name = "Dragonball Destiny"
view = 6
New()
spawn
while(1)
sleep(300)
for(var/obj in world)
for(var/mob/M in world)
sleep(4000)
Repop()
world << "* Repop *"
mob
var
powerlevel = 500
maxpowerlevel = 500
level = 1
experience = 0
experiencetolevel = 100
align = -1
zenni = 0
ki = 10
defense = 10
strength = 10
stamina = 100
flying = 0
usr.dead = 0
race
npc = 0
Stat()
statpanel("Statistics")
stat(src)
stat("","")
stat("Name:", "[name]")
stat("Gender:", "[gender]")
stat("Powerlevel:", "[powerlevel] / [maxpowerlevel]")
stat("Strength:","[strength]")
stat("Defense:","[defense]")
stat("Ki:","[ki]")
stat("Stamina:","[stamina]")
stat("Level:","[level]")
stat("Experience:","[experience]")
stat("Ex To Level:","[experiencetolevel]")
stat("","")
stat("Zenni:", "[zenni]")
statpanel("Inventory")
stat(src.contents)
icon = 'mobs.dmi'
icon_state = ""
verb
Who()
for(var/mob/M in world)
if (M.client)
usr << "[M.name] (Key: [M.key])"
WorldTalk(msg as text)
world << "(WorldTalk) \icon[usr] [usr.name]: [msg]"
Attack(mob/M in oview(1)) // Make it so you can only attack a mob that's within one tile of your character.
damage(M)
proc
die(mob/M in world)
world << "[M] has been killed by [usr]!"
if (!M.client) // ! is a universal programming character that means "NOT", anotherwards if NOT M.client (to make sure it's not a player)
del(M) // Indentation is the key to BYOND programming
else
M.loc = locate(1,1,3) // Relocate the player. Locate's format is like this: locate(x,y,z). X/Y are the coordinates and Z is the map number.
M.powerlevel = 10 // Give the player a small portion of their health upon death.
usr.experience += rand(1,10) // gain some experience
checklevel(usr) // see if the player raises a level
checklevel(mob/M in world) // The process that makes the character gain a level, etc.
if (M.experience >= M.experiencetolevel)
M.experience = 0
M.experiencetolevel *= 2
M << "You gain a level!"
M.level += 1
var/plgain = rand(1,100)
M << "You gain [src.powerlevel]!"
M.powerlevel += plgain
M.maxpowerlevel += plgain
damage(mob/M in world) // This isn't gonna be really advanced... just a simple damage doer. No advanced stuff here like calculating defense into it, etc.
var/dam = rand(1,usr.strength) // dam is a variable and is now defined with a random number between 1 through 10
dam -= rand(1,M.defense) // small algorithm. ;)
if (dam > 0)
M.powerlevel -= dam
view(6) << "[usr] attacks [M] for [dam] health!"
else
view(6) << "[usr] attacks [M] but MISSES!"
if (M.powerlevel <= 0)
die(M)
Login() // Called whenever a character logs in.
if (usr.key == "Majinveku" || usr.key == "YourkeyHere")
usr.verbs += /mob/Admin/verb/InstantKill
usr.verbs += /mob/Admin/verb/RestoreAll
usr.verbs += /mob/Admin/verb/Boot
..()
Admin
verb
InstantKill(mob/M in world)
set name = "Instant Kill"
set desc = "Instantly kill someone"
set category = "GM"
world << "The gods grin mischiviously from above... [M] suddenly clutches their chest, and falls down... dead." // Roleplayish enough? :D Well... my spelling isn't the best...
die(M)
RestoreAll()
set name = "Restore All"
set desc = "Restores everyone in the game."
set category = "GM"
world << "The gods smile down upon your soul... You feel your as though your body is lighter."
for(var/mob/M in world)
if (M.client)
M.powerlevel = M.maxpowerlevel
Boot(mob/M in world)
set name = "Boot"
set desc = "Kick someone from the game"
set category = "GM"
if (M.client)
M << "The gods decided to kick you from the realms..."
usr << "[M] has been booted from the game."
del(M)
else
usr << "Why boot an NPC?"
return
This is from a demo somewhere I found sometime ago I think its because of my login screen is the reason it wont work heres the code for that...
EX:
switch(input("What race would you like to choose?") in list ("Saiyan","Earthling","Namekian","Halfling","Human Base Android", "Mechanical Android"))
if ("Saiyan")
switch(input("Which Saiyan do you want to be?","DBD Login") in list ("Goku", "Vegeta", "Bardock", "Broly", "Nappa", "King Vegeta", "Toma", "Panboukin", "Celipa", "Totepo", "Raditz"))
if("Goku")
character = new /mob/characters/Saiyan/Goku()
Like ok heres how im codid the chars...
mob/characters/Saiyan/Goku
icon = 'Goku.dmi'
name = "Goku"
gender = "male"
anyone know how to make the gm code work? Thanks for any Help.
ID:173272
Jan 27 2004, 1:17 pm
|
|
Jan 27 2004, 2:02 pm
|
|
Why are you showing us all this irrelevent crap when your problem is within a very small portion of it?
|
In response to Garthor
|
|
because I dont know which pat has the problem?
|
In response to Garthor
|
|
Phew, quite harsh there. He's probably just new.
I remember making my very first post, back when I wasn't used to it. Nadrew had to post with a reply similar to yours here. If I hadn't gotten a nasty response myself, I would probably think yours is just fine, but I can feel for this person. Maybe it is about time there was a posting tutorial. That might seem rediculous, but it would probably be easier on everyone if people read it. (edit) I will agree though, it does get annoying to see all the junk code that is irrelevent. When I see it though, I usually just don't bother helping out with it. If the poster can't sift through their own code then I won't bother either. |
In response to Majinveku
|
|
Well, first you should close your html tags, so it doesn't appear all over the post. Also, you should post your code inside <dm> tags, so that it is formatted more nicely for the forums. Lastly, please try to explain, in as great detail as possible, exactly what the problem you're running into is.
|
In response to Majinveku
|
|
So you admit to not writing "your" program yourself?
|
In response to Garthor
|
|
Garthor wrote:
So you admit to not writing "your" program yourself? My actual game coding.. I am making my own self. The Gm code is the only part I didnt write and I said in the first post that I used a gm tutorial. Anyways... Heres the problem, the reason I posted all that is because I have no coding errors that the compiler finds but when I run the game I dont get GM commands. And thats why I posted the whole code. Since I dont know which part has the error I will ask someone else or something sometime... Because I dont want to have replying to all my posts with negative comments. Sorry for even wasting your time. |