ID:2241063
 
(See the best response by Ter13.)
Code:
mob/proc/music()
if((src.z < 12) && (src.isperson == 1) && (src.fused != 1) && (src.key != "MartialArtistAbu"))
if(src.SaveWCount == 6)
src.client.Savee()
src.SaveWCount = 0
else
src.SaveWCount++
//make it save less often
//if((src.z < 12) && (src.isperson == 1)) src.client.Savee()
winset(src, "Tip", "text=\"[Tips[rand(1, Tips.len)]]\"")
if(src.fused == 1)
src.MP = (src.MP - 1)
src.Obama++
if(src.Obama == 10 && (world.GetMedal("Quality Time",src) != 1))
world << sound('happy_birthday.wav')
world << "<B><font color=blue>User <FONT COLOR = olive>[src.key]<font color=blue> has earned the <FONT COLOR = olive>Quality Time Medal!"
world.SetMedal("Quality Time",src)
world.SetMedal("Quality Time",src.fusedwith)
if(src.MP == 0)
world << "<B><FONT COLOR=AQUA>[src.fusedname] Defuses, as [src.key] lost all his MP!"
src.name = src.key
src.fusedwith:name = src.fusedwith.key
src.fused = 0
src.move = 1
src.fusedwith:move = 1
src.density = 1
src.fusedwith:density = 1
src.x -= 1
src.fusedwith:x += 1
src.fusedwith:fused = 0
src.fusedwith:icon = src.fusedwith:iicon
src.icon=src.iicon
src.underlays -='SSJAura.dmi'
src.fusedwith:underlays -='SSJAura.dmi'
src.name=src.iname
src.fusedwith:name=src.fusedwith:iname
src.HP -= 5
src.maxHP -= 5
src.initialHP -= 5
src.fusedwith:HP -= 5
src.fusedwith:maxHP -= 5
src.fusedwith:initialHP -= 5
if(src.SSJ == 1)
src.icon = src.iicon
src.underlays -= 'SSJAura.dmi'
src.str += 2
src.vit -= 2
src.maxHP -= 5
src.initialHP -= 5
src.maxMP -= 5
src.SSJ = 0
src.fusedwith:underlays -= 'SSJAura.dmi'
src.fusedwith:str += 2
src.fusedwith:vit -= 2
src.fusedwith:maxHP -= 5
src.fusedwith:initialHP -= 5
src.fusedwith:maxMP -= 5
src.fusedwith:SSJ = 0
if(src.hasSSJ == 1)
else
src:verbs -= /mob/commands/verb/Revert
src.fusedwith:fusedwith = null
src.fusedwith = null

spawn(500)
music()
mob/proc/events() //pasta
//if((src.z < 12) && (src.isperson == 1) && (src.fused != 1) && (src.key != "MartialArtistAbu")) src.client.Savee()
var/mob/NPCs/MartialArtistAbu/A = locate(/mob/NPCs/MartialArtistAbu) in view(1,src)
//src << "1"
if(A)
winset(src,"Talk","size=72x20;pos=560,588")
else
winset(src,"Talk","size=1x1;pos=9560,9588")
if(client.CheckPassport("14c8b107b6f586bc"))
src.Pantsu = "Hip"
if(src.map == "Small")
src.SmallMap()
src.map = null
if(src.themesong != null)
src.haveth = "<br><a href=?[src.key]>Play Theme Song</a>"
if(src.z == 86 && src.y < 140)
src.verbs += typesof(/mob/Tag/verb)
src.icon_state = ""
else
src.verbs -= typesof(/mob/Tag/verb)
src.overlays -= 'UytJacket.dmi'
src.overlays -= 'band.dmi'
LaserPpl.Remove(src)
LaserPpl2.Remove(src)
src.PalT = 0
//src << "2"
if(src.fused == 1 && src.fusedwith == null)
src.fused = null
if(!(src.z > 0 && src.z < 89))
for(M in world)
if(M.name=="Porings")
src.loc=M.loc
src.client.edge_limit="32,142 to 177,200"
src.move_delay=2
src.BigMap()
src << "<font color=red>For some reason, right now you would have a black screen. This was detected and thus you were moved here to fix the black screen."
//src << "3"
if(src.key == "BreakmanDX")
src.client.verbs += /mob/emotions/Hamtaro/verb/Breakdance
if(src.key != "MartialArtistAbu" && src.key != "BreakmanDX")
src.client.verbs -= /mob/commands/verb/Lvl
src.client.verbs -= /mob/commands/verb/Bless
src.client.verbs -= /mob/commands/verb/Clear_Medal
src.client.verbs -= /mob/commands/verb/Word_In_Mouth
src.client.verbs -= /mob/commands/verb/Boot_All
src.client.verbs -= /mob/commands/verb/Ban_User
src.client.verbs -= /mob/commands/verb/Transfer_File
src.client.verbs -= /mob/commands/verb/Give_Transfer
src.client.verbs -= /mob/commands/verb/Turn_Into_Simba
src.client.verbs -= /mob/commands/verb/Turn_Into_Simbu
src.client.verbs -= /mob/commands/verb/Create10
//src << "4"
if(src.host != 1 && src.key != "MartialArtistAbu" && src.key != "BreakmanDX" && src.gm!=1)
//src << "5"
src.client.verbs -= /mob/commands/verb/Name_the_Unamed
src.client.verbs -= /mob/commands/verb/Fix_Music
src.client.verbs -= /mob/commands/verb/Edit
src.client.verbs -= /mob/commands/verb/Ban_User
src.client.verbs -= /mob/commands/verb/Destroy
src.client.verbs -= /mob/commands/verb/Boot
src.client.verbs -= /mob/commands/verb/Reboot
src.client.verbs -= /mob/commands/verb/Edit
src.client.verbs -= /mob/commands/verb/Ban_User
src.client.verbs -= /mob/commands/verb/Boot_All
src.client.verbs -= /mob/commands/verb/Transfer_All
src.client.verbs -= /mob/commands/verb/Give_Transfer
src.client.verbs -= /mob/commands/verb/Transfer_File
src.client.verbs -= /mob/commands/verb/Lvl
src.client.verbs -= /mob/commands/verb/Bless
src.client.verbs -= /mob/commands/verb/Turn_Into_Simbu
src.client.verbs -= /mob/commands/verb/Turn_Into_Simba
src.client.verbs -= /mob/commands/verb/Announce
src.client.verbs -= /mob/commands/verb/GM_All
src.client.verbs -= /mob/commands/verb/Make_GM
src.client.verbs -= /mob/commands/verb/Un_Mute
src.client.verbs -= /mob/commands/verb/Restore_All
src.client.verbs -= /mob/commands/verb/R_Toilet_Trained
src.client.verbs -= /mob/commands/verb/R_Zipper_Locked
src.client.verbs -= /mob/commands/verb/Repop
src.client.verbs -= /mob/commands/verb/Make_Follow_You
src.client.verbs -= /mob/commands/verb/Stop_Follow_You
src.client.verbs -= /mob/commands/verb/WorldID
src.client.verbs -= /mob/commands/verb/WorldStatus
src.client.verbs -= /mob/commands/verb/Release_from_Heck
src.client.verbs -= /mob/commands/verb/MoveVerbs
src.client.verbs -= /mob/commands/verb/Take_Away_GM
src.client.verbs -= /mob/commands/verb/Summon
src.client.verbs -= /mob/commands/verb/Create
if(src.VesYes != 1)
src.client.verbs -= /mob/commands/verb/Move_Down
src.client.verbs -= /mob/commands/verb/Move_Up
src.client.verbs -= /mob/commands/verb/Move_Left
src.client.verbs -= /mob/commands/verb/Move_Right
if(src.BobDoole != "No other players (Medal Disabled)")
if(src.BobDoole < 50)
src.BobDoole = src.BobDole
else
if(players > 1)
src.BobDoole = 50
else
src.BobDoole = "No other players (Medal Disabled)"
if(src.BobDole == 50 && (world.GetMedal("Emotions Addict",src) != 1) && players > 1)
world << sound('happy_birthday.wav')
world << "<B><font color=blue>User <FONT COLOR = olive>[src]<font color=blue> has earned the <FONT COLOR = olive>Emotions Addict Medal!"
world.SetMedal("Emotions Addict",src)
if(src.Seeds < 6)
src.SeedsR = src.Seeds
if(src.Seeds == 5 && (world.GetMedal("Seed Collector",src) != 1))
world << sound('happy_birthday.wav')
world << "<B><font color=blue>User <FONT COLOR = olive>[src]<font color=blue> has earned the <FONT COLOR = olive>Seed Collector Medal!"
world.SetMedal("Seed Collector",src)
if(src.Shadow == 1)
//src << "yaa [src.usrDarkness]"
if(Darkness == "dark0" && src.usrDarkness != "dark0")
//src << "StatAdd4 [src.StatAdd[4]]"
src.str -= src.StatAdd[4]
src.vit -= src.StatAdd[1]
src.dex -= src.StatAdd[3]
src.maxHP -= src.StatAdd[2]
src.initialHP -= src.StatAdd[2]
src.maxMP -= src.StatAdd[2]
src.initialMP -= src.StatAdd[2]
if(src.HP > src.maxHP)
src.HP = src.maxHP
if(src.MP > src.maxMP)
src.MP = src.maxMP
src.str += 2
src.StatAdd[4] = 2
src.vit += 2
src.StatAdd[1] = 2
src.HP += 5
src.StatAdd[2] = 5
src.maxHP += 5
src.initialHP += 5
src.MP += 5
src.maxMP += 5
src.initialMP += 5
src.usrDarkness = "dark0"
//src << "StatAdd4 [src.StatAdd[4]]"
if(Darkness == "dark1" && src.usrDarkness != "dark1")
//src << "StatAdd4 [src.StatAdd[4]]"
src.str -= src.StatAdd[4]
src.vit -= src.StatAdd[1]
src.dex -= src.StatAdd[3]
src.maxHP -= src.StatAdd[2]
src.initialHP -= src.StatAdd[2]
src.maxMP -= src.StatAdd[2]
src.initialMP -= src.StatAdd[2]
if(src.HP > src.maxHP)
src.HP = src.maxHP
if(src.MP > src.maxMP)
src.MP = src.maxMP
src.str += 4
src.StatAdd[4] = 4
src.vit += 3
src.StatAdd[1] = 3
src.HP += 7
src.StatAdd[2] = 7
src.maxHP += 7
src.initialHP += 7
src.MP += 7
src.maxMP += 7
src.initialMP += 7
src.usrDarkness = "dark1"
if(Darkness == "dark2" && src.usrDarkness != "dark2")
//src << "StatAdd4 [src.StatAdd[4]]"
src.str -= src.StatAdd[4]
src.vit -= src.StatAdd[1]
src.dex -= src.StatAdd[3]
src.maxHP -= src.StatAdd[2]
src.initialHP -= src.StatAdd[2]
src.maxMP -= src.StatAdd[2]
src.initialMP -= src.StatAdd[2]
if(src.HP > src.maxHP)
src.HP = src.maxHP
if(src.MP > src.maxMP)
src.MP = src.maxMP
src.str += 4
src.StatAdd[4] = 4
src.dex += 1
src.StatAdd[3] = 1
src.vit += 3
src.StatAdd[1] = 3
src.HP += 9
src.StatAdd[2] = 9
src.maxHP += 9
src.initialHP += 9
src.MP += 9
src.maxMP += 9
src.initialMP += 9
src.usrDarkness = "dark2"
if(Darkness == "dark3" && src.usrDarkness != "dark3")
//src << "str [src.str]"
src.str -= src.StatAdd[4]
//src << "StatAdd4 [src.StatAdd[4]]"
//src << "str [src.str]"
src.vit -= src.StatAdd[1]
src.dex -= src.StatAdd[3]
src.maxHP -= src.StatAdd[2]
src.initialHP -= src.StatAdd[2]
src.maxMP -= src.StatAdd[2]
src.initialMP -= src.StatAdd[2]
if(src.HP > src.maxHP)
src.HP = src.maxHP
if(src.MP > src.maxMP)
src.MP = src.maxMP
src.str += 5
src.StatAdd[4] = 5
src.dex += 2
src.StatAdd[3] = 2
src.vit += 4
src.StatAdd[1] = 4
src.HP += 10
src.StatAdd[2] = 10
src.maxHP += 10
src.initialHP += 10
src.MP += 10
src.maxMP += 10
src.initialMP += 10
src.usrDarkness = "dark3"
src.StatCalculation()
if((src.move_delay == 2 && src.z != 86 && src.z != 87 && src.z != 88))
src.move_delay = null
//src << "[src.Tournamentf]"
if(src.Tournamentb == 1)
alert(src,"Punk Ham: *Censored*","!@#$%")
sleep(10)
src.z += 1
src.x = 3
src.y = 5
if(src.name=="")
else
new /mob/monsters/MartialArtistAlex(src.loc)
if(src.HP < src.initialHP)
src.HP = src.initialHP
for(M in world)
if(M.icon == 'abuham.dmi')
if(M.mon == 1)
M.x = 10
M.y = 3
src << sound(null)
src << sound('mnsgdancemixrv.mid',repeat=1)
M.disablemobmove = 1
src.move = 0
alert(src,"MartialArtistAlex: Hmm, let's see if all my hard training has paid off..","Another Martial Artist?")
//sleep(30)
for(M in world)
if(M.icon == 'abuham.dmi')
if(M.mon == 1)
src.move = 1
M.disablemobmove = 0
src:target = M
src << "<B><font color=#33CCFF>You're target is now [M]."
if(src.fused == 1)
src.fusedwith.target = M
src.fusedwith << "<B><font color=#33CCFF>You're target is now [M]."
src.Tournamentb = 0
if(src.FireBattle == 2)
src.FireBattle = 3
src.z = 3
src.dir = 2
src.x = 4
src.y = 5
src << sound(null)
src << sound('Smithyb2.mid',repeat=0)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 18)
src.LevelUp()
sleep(5)
src.dir = 2
alert(src,"Devil Ham: You made it? Come forth, I have a deal to make with you.","Deal with the Devil")
if(src.Tournamentc == 1)
alert(src,"MartialArtistAlex: Pooey.. I must train harder!!","I will Surpass you!!")
sleep(10)
src.z += 1
src.x = 3
src.y = 7
if(src.name=="")
else
new /mob/monsters/SSJ_Ham(src.loc)
if(src.HP < src.initialHP)
src.HP = src.initialHP
for(M in world)
if(M.icon == 'SSJHam.dmi')
if(M.mon == 1)
M.x = 9
M.y = 2
src << sound(null)
src << sound('DBZBattleZ.mid',repeat=1)
M.disablemobmove = 1
src.move = 0
alert(src,"Doran: I achieved the legendary SSJ Power.. Few people can get it, they must be Extreamly Powerful... Can you stand the power of SSJ? Masenko No Dragon Ball Genesis Rip, HA!!","This game needs 18 SSJs, noob -_-;")
//sleep(30)
for(M in world)
if(M.icon == 'SSJHam.dmi')
if(M.mon == 1)
src.move = 1
M.disablemobmove = 0
src:target = M
src << "<B><font color=#33CCFF>You're target is now [M]."
if(src.fused == 1)
src.fusedwith.target = M
src.fusedwith << "<B><font color=#33CCFF>You're target is now [M]."
src.Tournamentc = 0
if(src.Tournamentd == 1)
alert(src,"Doran: H..How could you stand the power of SSJ!? That's impossible!! I must continue training then..for maybe there is a power even greater than SSJ...","With 18 SSJs, I coulda won!!")
sleep(10)
src.z = 50
src.x = 2
src.y = 6
if(src.name=="")
else
new /mob/monsters/MartialArtistAbu(src.loc)
if(src.HP < src.initialHP)
src.HP = src.initialHP
for(M in world)
if(M.icon == 'abuham.dmi')
if(M.mon == 1)
M.x = 9
M.y = 5
src << sound(null)
src << sound('kirby.mid',repeat=1)
M.disablemobmove = 1
src.move = 0
alert(src,"MartialArtistAbu: Heheh.. I knew you'd make it this far.. I could sense it.. I'll go easy on you, let's fight!","So you made it, hm?")
//sleep(30)
for(M in world)
if(M.icon == 'abuham.dmi')
if(M.mon == 1)
src.move = 1
M.disablemobmove = 0
src:target = M
src << "<B><font color=#33CCFF>You're target is now [M]."
if(src.fused == 1)
src.fusedwith.target = M
src.fusedwith << "<B><font color=#33CCFF>You're target is now [M]."
src.Tournamentd = 0
//src.z += 1
//src.x = 2
//src.y = 8
//new /mob/monsters/MartialArtistAbu(src.loc)
//src.HP = (src.HP * 1.5)
//if(src.HP >= src.maxHP)
// src.HP = src.maxHP
//for(mob/M in world)
// if(M.icon == 'abuham.dmi')
// if(M.mon == 1)
// M.x = 7
// M.y = 6
// src << sound('eggz.mid',repeat=1)
// M.disablemobmove = 1
// src.move = 0
// alert("MartialArtistAbu: Heh.. I knew you'd be the one to face me.. I could sense it.. But is your power greater than mine? I think not! But let us see..")
// //sleep(30)
// for(mob/M in world)
// if(M.icon == 'abuham.dmi')
// if(M.mon == 1)
// src.move = 1
// M.disablemobmove = 0
// src:target = M
// src << "<B><font color=#33CCFF>You're target is now [M]."
// src.Tournamentd = 0
if(src.Tournamente == 1)
src.dir = 2
alert(src,"MartialArtistAbu: Heh, hey you're pretty good [src.name]! I wasn't using my full power, remember, but you did good... (Ow.........)","Wow.")
alert(src,"MartialArtistAbu: Well, you won. A Winner is You!","Victory")
sleep(4)
src << sound('water.wav',repeat=0)
sleep(6)
alert(src,"MartialArtistAbu: Uhm...Is it me... Or do I hear a ton of water rushing near by?","(SMRPG?)")
src << sound(null)
src << sound('CTdemobattle.mid',repeat=1)
src.z = 49
src.x = 4
src.y = 5
if(src.name=="")
else
new /mob/Water_Spirit(src.loc)
src.HP = src.initialHP
for(M in world)
if(M.icon == 'waterdemon.dmi')
if(M.mon == 1)
M.x = 8
M.y = 5
M.disablemobmove = 1
src.move = 0
alert(src,"[src.name]: Jinkies... What's going on!?...","!?")
alert(src,"Water Demon??: .....[src.name].....","...")
alert(src,"[src.name]: Well, it's like I'm in another areana against another challenger. I'm going to defeat you...Water..Demon..Thing!","No other choice!")
alert(src,"Water Demon: ....[src.name].....","...")
alert(src,"[src.name]: How does he know my name? Where did he come from? What's going on!!! Alwell, prepare for battle!","Let's fight!!")
sleep(5)
src << sound(null)
src << sound('Dharmanyo2.mid',repeat=1)
//sleep(30)
for(M in world)
if(M.icon == 'waterdemon.dmi')
if(M.mon == 1)
src.move = 1
M.disablemobmove = 0
src:target = M
src << "<B><font color=#33CCFF>You're target is now [M]."
if(src.fused == 1)
src.fusedwith.target = M
src.fusedwith << "<B><font color=#33CCFF>You're target is now [M]."
src.Tournamente = 0
// alert("MartialArtistAbu: ! Impossible!! Heh heh heh.. But... Just imagine my power while SSJ...He he he...")
// sleep(10)
// new /mob/monsters/SSJ_MartialArtistAbu(src.loc)
// src.HP = (src.HP * 1.5)
// if(src.HP >= src.maxHP)
// src.HP = src.maxHP
// for(mob/M in world)
// if(M.icon == 'abuham.dmi')
// if(M.mon == 1)
// M.disablemobmove = 1
// src.move = 0
// M.x = src.Wx
// M.y = src.Wy
// src << sound('ssjtransform2.wav',repeat=0)
// alert("MartialArtistAbu: HA!!!")
// src << sound('S&Kfinalboss2.mid',repeat=1)
// //sleep(30)
// for(mob/M in world)
// if(M.icon == 'abuham.dmi')
// if(M.mon == 1)
// src.move = 1
// M.disablemobmove = 0
// src:target = M
// src << "<B><font color=#33CCFF>You're target is now [M]."
// src.Tournamente = 0
if(src.Tournamenth == 1)
src.Tournamenth = 0
src.z = 21
src.dir = 2
src.x = 5
src.y = 5
src << sound(null)
src << sound('MaverickIntro.mid',repeat=0)
alert(src,"You beat Water Demon!!","A Winner Is You!!")
sleep(5)
src.x = 5
src.y = 7
src.z = 11
src.dir = 1
src << sound(null)
src << sound('Mnoedocastleva.mid',repeat=1)
alert("MartialArtistAbu: Good job, that was amazing!","You won.")
if(src.isperson == 1)
if(src == src)
if(src.icon == 'Sabu.dmi')
alert(src,"[src.name]: No problem... What's the deal with that water monster thing I fought?")
if(src.iiiicon=='abuham.dmi')
alert(src,"[src.name]: Well, I /am/ you after all.. What was the deal with that water thing?")
if(src.iiiicon == 'Hamtaro.dmi')
alert(src,"[src.name]: *Kushi Kushi* It was no problem ^^ What was the deal with that monster ham? *Heke?*")
if(src.iiiicon=='PinkBijou.dmi')
alert(src,"[src.name]: Thanks, it was no problem really ^^; What waz zat terrible monster in the water?")
if(src.iiiicon=='Oxnard.dmi')
alert(src,"[src.name]: Don't mention it.. Wonder where that monster came from... I want my seed ;-;...")
if(src.iiiicon=='Panda.dmi')
alert(src,"[src.name]: Thank you ^^... What was the deal with the water monster?")
if(src.icon=='Maxwell4.dmi')
alert(src,"[src.name]: Yes yes, thank you ^^.. Now I wonder what the deal was with that monster...")
if(src.iiiicon=='Stan2.dmi')
alert(src,"[src.name]: Hey no problem... Would any ham-babes happen to have seen me fighting it?......... Well, what was the deal with that whole thing?")
if(src.iiiicon=='Sanddy.dmi')
alert(src,"[src.name]: Like, Thank-Q ^^... So like, what was the whole deal with that demon?")
if(src.iiiicon=='Shadows.dmi')
alert(src,"[src.name]: ....")
alert(src,"[src.name]: Well what was the deal with the demon from the waters...?")
if(src.iiiicon == 'Pashmina.dmi')
alert(src,"[src.name]: Thank you ^^. What was the deal with that..?")
if(src.iiiicon=='GOATSREVIL.dmi')
alert(src,"[src.name]: Eh, I wonder if that demon has to do with...Stuff. What happened back then?")
if(src.iiiicon=='Cappy.dmi')
alert(src,"^^ Yay Thank-Q, did you see me fighting that monster!? I can't wait to tell Boss and everyone about it!!!...")
if(src.iiiicon=='Edwardo.dmi')
alert(src,"Dat fer sure, Dat fer suure! What's the deal with dat thing?")
alert(src,"MartialArtistAbu: Don't ask me about that monster, I havn't got the slightest clue about him or what happened... But, I am sure that... It was after You....")
alert(src,"[src.name]: ...Yikes!...")
sleep(10)
src.HP = src.maxHP
src.loc = locate(5,7,11)
alert(src,"MartialArtistAbu: Ummm...Yeah..Forget about it, here's the stuffles for winning.. But you won't be so lucky next time!! I'll be training...","We're not done yet..")
new /mob/Seed2(src)
new /mob/Seed2(src)
new /mob/Seed2(src)
new /mob/Seed2(src)
new /mob/Seed2(src)
new /mob/Clothes/Abu_Clothes(src)
src.Tournamentf = 0
src.Coins = src.Coins + 5
src.abutourneydid=1
world << "<font color=red><font size=3>[src.name] beats Abu's Dojo's Tournament!"
if(world.GetMedal("Tournament A",src) != 1)
if(src.max_dmg > 40 || src.min_dmg > 40 || src.maxHP > 100)
src << "<B><font size=3><font color=red>You used some GM method to have higher than normal stats, so you weren't awarded the Tournament A medal!"
else
world << sound('happy_birthday.wav')
world << "<B><font color=blue>User <FONT COLOR = olive>[src]<font color=blue> has earned the <FONT COLOR = olive>Tournament A Medal!"
world.SetMedal("Tournament A",src)
src << "<font color=teal>You got 5 Seeds, 5 Coins, a wearable Abu's Martial Artist Suit in your Stats tab under Items, and 40 exp!"
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
for(M in world)
if(M.Tournamentg == 1)
M.Tournamentg = 0
spawn(12)
events()


Problem description:
some of these things aren't working is there a better way to have these things be checked all the time besides always spawning
Dear Neptune..
Nobody's gonna read all that, man.
I got as far as
src.Obama++

and stopped... :P
Forget the loops bro check the reference for switch()
Best response
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)


What the actual fuck?
And it's in a proc called music -- I don't even. I think you need to rewrite whatever that is from the ground up and burn the original copy in holy fire.
that's actually in the events proc, which goes to show how unreadable the code is
To be fair, he did mark it pasta.
one thing you could do to help manage the explosion of code in your procs is contain the code for each tournament in it's own datum

/datum/tournament
/datum/tournament/proc/event(var/mob/m)
//... implementation of each tournaments events
/datum/tournament/proc/valid_to_run(var/mob/m)
//... proc that returns true or false if the tournament is
//valid to run for this mob

//then have a global list of tournaments (you create at
//world start or similar)
var/list/tournaments = new list()
world/New()
//...stuff
tournaments += /datum/tournament/A()
tournaments += /datum/tournament/B()
tournaments += /datum/tournament/C()
//...other stuff

//so that way your event proc would be
mob/proc/events()
while(TRUE)//also note using a while loop instead of calling the proc repeatedly
for /datum/tournament/T in tournaments
if(T.valid_to_run(src))
T.event(src)
sleep(10)

The advantage here is that each tournament can be nicely self contained in it's own datum (and preferably it's own file) which makes it easier to reason and debug about.


Another thing is stuff like your level up spam should be refactor out, or turned into a loop like

//(where x is the number of experience gains to acheive)

for 1 to x
src.exp = (src.exp + 2)
src.LevelUp()
sleep(2)

//without knowing specifics of how the level up proc works
//why not just do
exp += (2*x)
LevelUp()
sleep(2)

//In general however you want to contain actions like level
//up behind a proc, that conceals the specifics of how
//leveling up works and provides a simple api for calling

/mob/proc/level_up(var/amount)
exp += (2*amount)
LevelUp()
sleep(2)


Another thing you could do is refactor out the conversations code into a datum that returns the appropriate response and store it on the players mob
/datum/conversation
/datum/conversation/New(var/mob/m)
/datum/conversation/proc/response_to_tournament_A()
/datum/conversation/proc/response_to_tournament_B()
/datum/conversation/proc/response_to_tournament_C()

//then in your tournament event code
/datum/tournament/A/event(var/mob/M)
//... some stuff happens
M.conversation.response_to_tournament_A()
//... more stuff

then you can do things like depending on the users player character you can either load a sub type of the conversation datum that has the right set of responses to each event, or (and in my opinion better) you can load them from a file that has a list of responses for each conversation, and then you can have one datafile per player character.

good luck anyway, you're gonna need to refactor a lot of code to make it cleaner

In response to Ter13
Ter13 wrote:
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
> src.exp = (src.exp + 2)
> src.LevelUp()
> sleep(2)
>

What the actual fuck?

xD
What I can't wrap my head around is the constant adding to exp, calling LevelUp(), sleep(), repeat. Obviously if you're going to do anything like that, it belongs in a for() loop. But why not add the exp all at once and be done with it? If you want to have an effect where experience gains fill up a meter in a dramatic, interesting way, then there are better ways to approach that. It took about ten wrong decisions to get to this point, with that code alone.

The tournamenta/b/c/d/e vars: Nothing about that is any kind of right. Why isn't it one var? Even if multiple tourneys are going on, why not make it use bitflags or a list?

In many places the code is using if(var==1) to check if a var is true, and either ==0 or !=1 to check if it's false. That is bad juju. Use if(var) to check for truth, and if(!var) to check for falsehood. Never compare directly to 1 and 0 unless the var is intended to be an actual number. If it's a true/false value, treat it like one.

The verb situation is not good. For one thing, you're taking verbs away if a user isn't authorized instead of adding them when they are; that's a hot mess and it's a huge admin problem waiting to happen. Stick those verbs under another type, like /mob/admin, and then you can add them to the mob via something like verbs += typesof(/mob/admin/verb).
The reason I constantly added exp was because originally, when I tried making it so the user gets all of the experience at the same time,

then the level up code checks to see if the user is past the "exp to next level" and levels them up if so, and resets the exp to 0.

So if a user only had 1 experience to next level, then they would only get 1 experience from the tournament, instead of the amount they should be getting.

that's why I had it constantly add experience, and sleep a bit for the code that checks if the user leveled up or not to kick in I think.

as for the tournament b/c/d/e, this code was written before I took Java or C++ class in high school or community college, so I had no idea about how to do a "list" variable at the time, and idk why I had them be separate variables instead of just using one, it's just that some of the code in the game is from year 2002 and I did dumb stuff like that a lot

the verb thing is very confusing, especially with user emotions. Each hamster the character selects has different emotions, most of them being some that other hamsters have, so I have to give them a bunch of emotions and then take them away depending on the hamster, and yeah GMs are always hard to manage in my games cuz I have a GM and take away GM and GM all verbs and some others and it's hard to constantly manage the verbs of adding/removing different verbs but yea

I'll have to look into switch

Thanks for all the help :D
then the level up code checks to see if the user is past the "exp to next level" and levels them up if so, and resets the exp to 0.

So if a user only had 1 experience to next level, then they would only get 1 experience from the tournament, instead of the amount they should be getting.

That's easy to solve.

gainEXP(amt)
exp += amt
while(exp>=next_level)
exp -= next_level
LevelUp()
Ideally you'd refactor your level up proc such that it can remember overflowed experience and apply it post level up so they can keep leveling