var
tmp
Tourney_Status
Round
Order_Num=0
list
Players=list()
Order=list(50,100,150,200,250,300,350,400,450,500)
proc
Start_Tourney()
Order_Num++
if(Order_Num>10)
Order_Num=1
Tourney_Status="Recruiting"
sleep(10)
world <<output("<Center>Tournement Recruitments are now being held for [Order[Order_Num]-50]-[Order[Order_Num]].","output")
Round=1
sleep(300)
world<<output("<Center>Tournement Recruitments are now over.","output")
Pick_Fight()
Pick_Fight()
var/list/L=Players["Round [Round]"]
if(!length(L))
Round++
if(length(Players["Round [Round]"])>1)
world<<output("<Center>1.","output")
Pick_Fight()
else
if(!length(Players["Round [Round]"]))
world<<output("<Center>2.","output")
return
if(length(Players["Round [Round]"]==1))
world<<output("<Center>3.","output")
for(var/mob/M in Players["Round [Round]"])
M.Level=100//Prize
world<<output("<Center>Winner [M].","output")
break
return
Players["Fighting"]=new/list()
if(length(L)>1)
var/mob/A=L[1]
var/mob/B=L[2]
var/mob/C
if(length(L)==3)
C=L[3]
var/list/D=Players["Fighting"]
D.Add(A,B,C)
A.loc=locate(6,168,1)
B.loc=locate(17,168,1)
if(D[3])
C.loc=locate(17,168,1)
End_Fight(mob/Winner)
for(var/mob/M in Players["Fighting"])
if(M!=Winner)
Players["Round [Round]"]-=M
Pick_Fight()
Players["Round [Round++]"]+=Winner
End_Tourney()
Players=list()
Tourney_Status=null
Round=null
mob
var
Level=1
verb
Join()
if(Players["Round [Round]"])
src <<output("You have already entered tournament.","output")
return
if(Tourney_Status=="Recruiting"&&Level>Order[Order_Num]-50&&Level<Order[Order_Num])
Players["Round [Round]"]+=src
src <<output("You have entered tournament.","output")
else
src <<output("You do not meet the requirements.","output")
return
View_Entries()
for(var/mob/M in world)
var/tmp/C = 0
if(M ==Players["Round [Round]"])
C ++
src <<output("[C].[M]","output")
Add_Entries(mob/M in world)
Players["Round [Round]"]+=M
proc
Check_Fighter(mob/Fighter)
for(var/mob/M in Players["Fighting"])
if(M==Fighter)
Players["Fighting"]-=Fighter
if(length(Players["Fighting"])==1)
for(var/mob/A in Players["Fighting"])
End_Fight(A)
break
break
Death proc:
mob
proc
Death(mob/M)
if(health <= 0)
M.Check_Fighter(src)
Problem description:
ok the code about is suppose to start a tourny and then give u a levels options between like 0-50 0r 50-100.. ok it does thats but the part that messes with me is the part when it picks the fights and winner..
When i tested it the 1st round was good. it picked players amd then sent them to arena. Whne i beat the player and theres only us 2 in the tounry it doesnt do anything.. i wanted it to say if there is only 1 person lef then it should say the winner and end tourny. This code is from a coder that i knew and he didnt explain it very well. I would like it if you could tell me whats wrong with it